diff options
author | urvang@google.com <urvang@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-24 07:00:38 +0000 |
---|---|---|
committer | urvang@google.com <urvang@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-24 07:00:38 +0000 |
commit | 6cc6a2be3bb3b6e6574f93481c2f92680e369d19 (patch) | |
tree | 99f182f97d52ab285c213dd53fbefbfaf31b3cb4 /third_party/libwebp/demux | |
parent | 0ba8af4ab7bc0b3cb96a2ca86ea83228051e2a92 (diff) | |
download | chromium_src-6cc6a2be3bb3b6e6574f93481c2f92680e369d19.zip chromium_src-6cc6a2be3bb3b6e6574f93481c2f92680e369d19.tar.gz chromium_src-6cc6a2be3bb3b6e6574f93481c2f92680e369d19.tar.bz2 |
libwebp: cherry-pick upstream format validation in demux
dde91fd Demux: Correct the extended format validation
Unit test for this being added in http://crrev.com/35893011
BUG=310257
R=fbarchard@chromium.org
Review URL: https://codereview.chromium.org/39183002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230666 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libwebp/demux')
-rw-r--r-- | third_party/libwebp/demux/demux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/third_party/libwebp/demux/demux.c b/third_party/libwebp/demux/demux.c index 1d765c7..9966399 100644 --- a/third_party/libwebp/demux/demux.c +++ b/third_party/libwebp/demux/demux.c @@ -619,7 +619,7 @@ static int CheckFrameBounds(const Frame* const frame, int exact, static int IsValidExtendedFormat(const WebPDemuxer* const dmux) { const int has_fragments = !!(dmux->feature_flags_ & FRAGMENTS_FLAG); const int has_frames = !!(dmux->feature_flags_ & ANIMATION_FLAG); - const Frame* f; + const Frame* f = dmux->frames_; if (dmux->state_ == WEBP_DEMUX_PARSING_HEADER) return 1; @@ -627,7 +627,7 @@ static int IsValidExtendedFormat(const WebPDemuxer* const dmux) { if (dmux->loop_count_ < 0) return 0; if (dmux->state_ == WEBP_DEMUX_DONE && dmux->frames_ == NULL) return 0; - for (f = dmux->frames_; f != NULL; f = f->next_) { + while (f != NULL) { const int cur_frame_set = f->frame_num_; int frame_count = 0, fragment_count = 0; |