Commit d8bc0ae0 authored by Ralph Giles's avatar Ralph Giles
Browse files

fixed buffer underflow handling in utf-8 conversion code. Thanks to Zinx for tracking this down.

svn path=/trunk/vorbis-tools/; revision=2242
parent da6e689f
......@@ -118,7 +118,7 @@ int iconvert(const char *fromcode, const char *tocode,
if (!newbuf)
goto fail;
ob = (ob - utfbuf) + newbuf;
obl = utflen - (ob - utfbuf);
obl = utflen - (ob - newbuf);
utfbuf = newbuf;
else {
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