summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-01-06 19:20:22 +0200
committerTimo Teras <timo.teras@iki.fi>2009-01-06 21:23:26 +0200
commita3769b22380e98547937a8c00feeaef2ed2af8bc (patch)
treee98ba7b07e9cd7be79bd28cd5f27f8c4e5b896af /src
parentfb911432cbe4e0976c017622c1a57dd0aa964be0 (diff)
downloadapk-tools-a3769b22380e98547937a8c00feeaef2ed2af8bc.tar.gz
apk-tools-a3769b22380e98547937a8c00feeaef2ed2af8bc.tar.bz2
apk-tools-a3769b22380e98547937a8c00feeaef2ed2af8bc.tar.xz
apk-tools-a3769b22380e98547937a8c00feeaef2ed2af8bc.zip
io: check inner stream existance before creating gunzip stream
Diffstat (limited to 'src')
-rw-r--r--src/gunzip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gunzip.c b/src/gunzip.c
index ce3eeed..1d641ed 100644
--- a/src/gunzip.c
+++ b/src/gunzip.c
@@ -71,6 +71,9 @@ struct apk_istream *apk_bstream_gunzip(struct apk_bstream *bs)
{
struct apk_gzip_istream *gis;
+ if (bs == NULL)
+ return NULL;
+
gis = malloc(sizeof(struct apk_gzip_istream));
if (gis == NULL)
return NULL;