mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
wavpack: Fix possible underflow of unsigned integer variable
This commit is contained in:
parent
9d5e5ea553
commit
4101f87d17
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue