wavpack: Fix possible underflow of unsigned integer variable
This commit is contained in:
parent
9d5e5ea553
commit
4101f87d17
@ -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…
x
Reference in New Issue
Block a user