gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-24-g44881e1
Date: Wed, 09 Feb 2011 15:20:25 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  44881e1778eb9e056d2564105b7fb4555cc197e9 (commit)
       via  18229cf345a49b12108d6148988823a0c382d1e8 (commit)
      from  d3635dda7b1a13910c960f76511a221e05cd5d58 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=44881e1778eb9e056d2564105b7fb4555cc197e9


commit 44881e1778eb9e056d2564105b7fb4555cc197e9
Merge: 18229cf d3635dd
Author: Benjamin Wolsey <address@hidden>
Date:   Wed Feb 9 16:21:18 2011 +0100

    Merge branch 'master' of git.sv.gnu.org:/srv/git/gnash


http://git.savannah.gnu.org/cgit//commit/?id=18229cf345a49b12108d6148988823a0c382d1e8


commit 18229cf345a49b12108d6148988823a0c382d1e8
Author: Benjamin Wolsey <address@hidden>
Date:   Wed Feb 9 16:14:17 2011 +0100

    Check number of bytes read, fix illegal access,
    explicitly construct string to avoid future bugs.
    Thanks to Sandro for noticing the access bug!

diff --git a/libcore/ExternalInterface.cpp b/libcore/ExternalInterface.cpp
index b25e2cf..f45b5da 100644
--- a/libcore/ExternalInterface.cpp
+++ b/libcore/ExternalInterface.cpp
@@ -151,14 +151,14 @@ ExternalInterface::ExternalEventCheck(int fd)
             return error;
         }
         log_debug("There are %d bytes in the network buffer", bytes);
-        boost::scoped_array<char> buffer(new char[bytes+1]);
+        boost::scoped_array<char> buffer(new char[bytes + 1]);
         // Since we know how bytes are in the network buffer, allocate
         // some memory to read the data.
         // terminate incase we want to treat the data like a string.
-        buffer[bytes+1] = 0;
+        buffer[bytes] = 0;
         const int ret = ::read(fd, buffer.get(), bytes);
-        if (ret) {
-            return parseInvoke(buffer.get());
+        if (ret > 0) {
+            return parseInvoke(std::string(buffer.get(), ret));
         }
     }
 

-----------------------------------------------------------------------

Summary of changes:
 libcore/ExternalInterface.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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