aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gunzip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gunzip.c b/src/gunzip.c
index ce3eeede36..1d641ed3a1 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;