diff options
author | Ralph Giles <giles@mozilla.com> | 2011-11-30 11:54:20 -0800 |
---|---|---|
committer | Ralph Giles <giles@mozilla.com> | 2012-03-05 17:09:54 -0800 |
commit | a855a1f0ff5e96a22c5ccce4276891e749cb3955 (patch) | |
tree | 96aed23934b7ce36c541a6a2f113959cc79473a4 /celt/fixed_debug.h | |
parent | 9357ae976e41a1418655e285a1988df808aa47a4 (diff) | |
download | opus-a855a1f0ff5e96a22c5ccce4276891e749cb3955.tar.gz |
Check for underflow in the debug USUB32.
Diffstat (limited to 'celt/fixed_debug.h')
-rw-r--r-- | celt/fixed_debug.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/celt/fixed_debug.h b/celt/fixed_debug.h index 7b3df645..0a1adf4c 100644 --- a/celt/fixed_debug.h +++ b/celt/fixed_debug.h @@ -271,6 +271,10 @@ static inline unsigned int USUB32_(unsigned long long a, unsigned long long b, c { fprintf (stderr, "USUB32: inputs are not uint32: %llu %llu in %s: line %d\n", a, b, file, line); } + if (a<b) + { + fprintf (stderr, "USUB32: inputs underflow: %llu < %llu in %s: line %d\n", a, b, file, line); + } res = a-b; if (!VERIFY_UINT(res)) { |