Sfoglia il codice sorgente

dpkg-deb: Check for error on lstat

Guillem Jover 16 anni fa
parent
commit
51e84d96db
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  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);
-  lstat(fn, &(fi->st));
+  if (lstat(fn, &(fi->st)) != 0)
+    ohshite(_("unable to stat file name '%.250s'"), fn);
 
   return fi;
 }