* lib/zip_source_*: Verify user-supplied data. --HG-- branch : HEAD
diff --git a/lib/zip_source_data.c b/lib/zip_source_data.c index 2ed3669..56bf512 100644 --- a/lib/zip_source_data.c +++ b/lib/zip_source_data.c
@@ -1,5 +1,5 @@ /* - $NiH: zip_source_data.c,v 1.17 2004/11/17 21:55:13 wiz Exp $ + $NiH: zip_source_data.c,v 1.1 2004/11/18 15:06:23 wiz Exp $ zip_source_data.c -- create zip data source from buffer Copyright (C) 1999, 2003, 2004 Dieter Baron and Thomas Klausner @@ -58,6 +58,9 @@ struct read_data *f; struct zip_source *zs; + if (za == NULL) + return NULL; + if (len < 0 || (data == NULL && len > 0)) { _zip_error_set(&za->error, ZIP_ER_INVAL, 0); return NULL;