summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorGlenn L McGrath2001-07-13 18:16:57 +0000
committerGlenn L McGrath2001-07-13 18:16:57 +0000
commit3d46224b7866089a62a992333681c9a81030bb0b (patch)
treeb0a0a8643a63ff2ff60ab4ec5fd325d8adce835d /libbb
parentcfeb08a1932f970f8cc8c7b73f86001389a343dd (diff)
downloadbusybox-3d46224b7866089a62a992333681c9a81030bb0b.zip
busybox-3d46224b7866089a62a992333681c9a81030bb0b.tar.gz
Return NULL if file doesnt open in deb_extract
Diffstat (limited to 'libbb')
-rw-r--r--libbb/unarchive.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbb/unarchive.c b/libbb/unarchive.c
index 852bd06..d10e60c 100644
--- a/libbb/unarchive.c
+++ b/libbb/unarchive.c
@@ -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);