Return NULL if file doesnt open in deb_extract
authorGlenn L McGrath <bug1@ihug.co.nz>
Fri, 13 Jul 2001 18:16:57 +0000 (18:16 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Fri, 13 Jul 2001 18:16:57 +0000 (18:16 -0000)
libbb/unarchive.c

index 852bd06a8529d42daef720c2958cd3c69863aec4..d10e60cbb22601d37b1dd47f27115df1da0c62fc 100644 (file)
@@ -568,7 +568,9 @@ char *deb_extract(const char *package_filename, FILE *out_stream,
 
        /* open the debian package to be worked on */
        deb_stream = wfopen(package_filename, "r");
-
+       if (deb_stream == NULL) {
+               return(NULL);
+       }
        /* set the buffer size */
        setvbuf(deb_stream, NULL, _IOFBF, 0x8000);