wavpack: Fix possible underflow of unsigned integer variable

This commit is contained in:
Sebastian Dröge 2012-03-06 14:25:27 +01:00
parent 9d5e5ea553
commit 4101f87d17

View file

@ -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;
}