[xiph-commits] r3610 - liboggz/trunk/src/tools/oggz-chop
conrad at svn.annodex.net
conrad at svn.annodex.net
Fri Jun 27 21:43:19 PDT 2008
Author: conrad
Date: 2008-06-27 21:43:19 -0700 (Fri, 27 Jun 2008)
New Revision: 3610
Modified:
liboggz/trunk/src/tools/oggz-chop/oggz-chop.c
Log:
oggz-chop: Fix bug in update of page accumulator, reported by j^
http://trac.annodex.net/ticket/404
This was triggered in instances where all pages in the page accumulator
were to be kept, eg. if all pages had no granulepos marked. The resulting
attempt to shift the contents of the page accumulator by an offset of 0
caused that table's indices to become invalid, which led to a NULL
dereference a few iterations later.
Closes ticket:404
Modified: liboggz/trunk/src/tools/oggz-chop/oggz-chop.c
===================================================================
--- liboggz/trunk/src/tools/oggz-chop/oggz-chop.c 2008-06-16 13:33:31 UTC (rev 3609)
+++ liboggz/trunk/src/tools/oggz-chop/oggz-chop.c 2008-06-28 04:43:19 UTC (rev 3610)
@@ -247,6 +247,9 @@
}
}
+ /* If all accumulated pages have no granulepos, keep them */
+ if (earliest_new == 0) return accum_size;
+
if (earliest_new > accum_size)
earliest_new = accum_size;
More information about the commits
mailing list