Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 462666 | Differences between
and this patch

Collapse All | Expand All

(-)vmblock-only/linux/control.c (-1 / +7 lines)
Lines 279-289 Link Here
279
   int i;
279
   int i;
280
   int retval;
280
   int retval;
281
281
282
   name = getname(buf);
282
   name = __getname();
283
   if (IS_ERR(name)) {
283
   if (IS_ERR(name)) {
284
      return PTR_ERR(name);
284
      return PTR_ERR(name);
285
   }
285
   }
286
286
287
   i = strncpy_from_user(name, buf, PATH_MAX);
288
   if (i < 0 || i == PATH_MAX) {
289
      __putname(name);
290
      return -EINVAL;
291
   }
292
287
   for (i = strlen(name) - 1; i >= 0 && name[i] == '/'; i--) {
293
   for (i = strlen(name) - 1; i >= 0 && name[i] == '/'; i--) {
288
      name[i] = '\0';
294
      name[i] = '\0';
289
   }
295
   }

Return to bug 462666