gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_fi


From: Bastiaan Jacques
Subject: Re: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1982-g66b47f4
Date: Thu, 15 May 2014 10:22:13 +0200 (CEST)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

The point is more obvious with context from a few lines later:

     if (value & (1 << (bitcount - 1))) {

Bastiaan

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]