diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-03-06 14:25:27 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-03-06 14:25:27 +0100 |
commit | 4101f87d1767c2f8b87d099a6212c0a0317af8ca (patch) | |
tree | 438f039441ed541e982df95ee69afb29073b15d7 /ext | |
parent | 9d5e5ea55329748148a1cc16f08ade5376e5c02e (diff) |
wavpack: Fix possible underflow of unsigned integer variable
Diffstat (limited to 'ext')
-rw-r--r-- | ext/wavpack/gstwavpackstreamreader.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/wavpack/gstwavpackstreamreader.c b/ext/wavpack/gstwavpackstreamreader.c index 074a2e7d5..da1fdc27b 100644 --- a/ext/wavpack/gstwavpackstreamreader.c +++ b/ext/wavpack/gstwavpackstreamreader.c @@ -78,9 +78,10 @@ gst_wavpack_stream_reader_push_back_byte (void *id, int c) GST_DEBUG ("Pushing back one byte: 0x%x", c); + if (rid->position == 0) + return rid->position; + rid->position -= 1; - if (rid->position < 0) - rid->position = 0; return rid->position; } |