From 56c12aa69875010d3493bb2e74c261e71ad8dcf3 Mon Sep 17 00:00:00 2001 From: Urvang Joshi Date: Tue, 29 Jan 2013 10:53:52 -0800 Subject: [PATCH] Demuxer creation fix: If it's not a partial file and parser returns PARSE_NEED_MORE_DATA, then consider it to be PARSE_ERROR. Change-Id: Id652a345bd2a9f574970272dd0a00517de113215 --- src/demux/demux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/demux/demux.c b/src/demux/demux.c index 64235217..40dbb291 100644 --- a/src/demux/demux.c +++ b/src/demux/demux.c @@ -643,6 +643,7 @@ WebPDemuxer* WebPDemuxInternal(const WebPData* data, int allow_partial, if (!memcmp(parser->id, GetBuffer(&dmux->mem_), TAG_SIZE)) { status = parser->parse(dmux); if (status == PARSE_OK) dmux->state_ = WEBP_DEMUX_DONE; + if (status == PARSE_NEED_MORE_DATA && !partial) status = PARSE_ERROR; if (status != PARSE_ERROR && !parser->valid(dmux)) status = PARSE_ERROR; break; }