Explorar o código

dpkg-deb: Check for error on lstat

Guillem Jover %!s(int64=16) %!d(string=hai) anos
pai
achega
51e84d96db
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      dpkg-deb/build.c

+ 2 - 1
dpkg-deb/build.c

@@ -168,7 +168,8 @@ getfi(const char *root, int fd)
   }
   }
 
 
   fi = file_info_new(fn + rl + 1);
   fi = file_info_new(fn + rl + 1);
-  lstat(fn, &(fi->st));
+  if (lstat(fn, &(fi->st)) != 0)
+    ohshite(_("unable to stat file name '%.250s'"), fn);
 
 
   return fi;
   return fi;
 }
 }