On Thu, May 15, 2014 at 10:22:13AM +0200, Bastiaan Jacques wrote:
The point is more obvious with context from a few lines later:
if (value & (1 << (bitcount - 1))) {
So you meant > 1 rather than > 0 ?
--strk;
On Thu, 15 May 2014, Sandro Santilli wrote:
On Wed, May 14, 2014 at 11:49:24PM +0000, Bastiaan Jacques wrote:
commit 66b47f411a7f7151c55319a6a3d1782409404cc6
Author: Bastiaan Jacques <address@hidden>
Date: Thu May 15 01:47:08 2014 +0200
Don't call read_sint with a zero bit count, yielding a negative bit shift,
which is an undefined operation.
diff --git a/libcore/SWFStream.cpp b/libcore/SWFStream.cpp
index 2767fe2..f64ed43 100644
--- a/libcore/SWFStream.cpp
+++ b/libcore/SWFStream.cpp
@@ -191,7 +191,7 @@ unsigned SWFStream::read_uint(unsigned short bitcount)
int
SWFStream::read_sint(unsigned short bitcount)
{
- //assert(bitcount <= 32); // already asserted in read_uint
+ assert(bitcount > 0);
What's the point of this ? bitcount is unsigned...
--strk;
() ASCII ribbon campaign -- Keep it simple !
/\ http://strk.keybit.net/rants/ascii_mails.txt
--
() ASCII ribbon campaign -- Keep it simple !
/\ http://strk.keybit.net/rants/ascii_mails.txt