Commit dbd3537a authored by conrad's avatar conrad

Mozilla #499604, annodex #486: avoid uninitialized variable,

bail out of oggz_seek_end() immediatly if get_prev_start_page() fails.
parent 4cd81f99
......@@ -795,13 +795,13 @@ oggz_seek_end (OGGZ * oggz, ogg_int64_t unit_offset)
offset_end = oggz_get_prev_start_page (oggz, og, &granulepos, &serialno);
unit_end = oggz_get_unit (oggz, serialno, granulepos);
if (offset_end < 0) {
oggz_reset (oggz, offset_orig, -1, SEEK_SET);
return -1;
unit_end = oggz_get_unit (oggz, serialno, granulepos);
#ifdef DEBUG
printf ("*** oggz_seek_end: found packet (%lld) at @%" PRI_OGGZ_OFF_T "d [%lld]\n",
unit_end, offset_end, granulepos);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment