From 029556a8bcb053e9ff46bdb7e76ff7154f8a7db1 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Thu, 3 Feb 2011 01:43:07 +0000 Subject: [PATCH] stop processing if the length is 0 --- src/cdf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cdf.c b/src/cdf.c index 6533273e..638f2680 100644 --- a/src/cdf.c +++ b/src/cdf.c @@ -35,7 +35,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: cdf.c,v 1.38 2010/07/21 16:47:17 christos Exp $") +FILE_RCSID("@(#)$File: cdf.c,v 1.39 2010/07/22 21:59:42 christos Exp $") #endif #include @@ -747,6 +747,8 @@ cdf_read_property_info(const cdf_stream_t *sst, uint32_t offs, goto out; DPRINTF(("section len: %u properties %u\n", sh.sh_len, sh.sh_properties)); + if (sh.sh_len == 0 || sh.sh_properties == 0) + return 0; if (*maxcount) { if (*maxcount > CDF_PROP_LIMIT) goto out; -- 2.40.0