ref: 329638626afb9a12763f7caa003b6d3564d391bf
parent: 5170dbf3eeff96b105062bf5ef14199afb148f8b
author: Gregory Maxwell <[email protected]>
date: Thu Feb 14 11:11:37 EST 2008
Fix from speex svn 14504.
--- a/tools/celtdec.c
+++ b/tools/celtdec.c
@@ -104,7 +104,7 @@
end = c+length;
len=readint(c, 0);
c+=4;
- if (c+len>end)
+ if (len < 0 || c+len>end)
{
fprintf (stderr, "Invalid/corrupted comments\n");
return;
@@ -128,7 +128,7 @@
}
len=readint(c, 0);
c+=4;
- if (c+len>end)
+ if (len < 0 || c+len>end)
{
fprintf (stderr, "Invalid/corrupted comments\n");
return;