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

Collapse All | Expand All

(-)file_not_specified_in_diff (-2 / +8 lines)
Line  Link Here
0
-- work/vmblock-only/linux/control.orig.c  2014-05-08 09:29:01.000000000 +0300                                                                                                                                                                
0
++ work/vmblock-only/linux/control.c 2014-05-08 09:41:02.000000000 +0300
Lines 279-289 Link Here
279
   int i;
279
   int i;
280
   int retval;
280
   int retval;
281
281
282
   name = (char*) getname(buf)->name;
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 504736