gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/rtmp r9982: add room for the NULL string t


From: rob
Subject: [Gnash-commit] /srv/bzr/gnash/rtmp r9982: add room for the NULL string terminator when resizing a string element.
Date: Wed, 11 Feb 2009 10:27:20 +0100
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9982
committer: address@hidden
branch nick: rtmp
timestamp: Wed 2009-02-11 10:27:20 +0100
message:
  add room for the NULL string terminator when resizing a string element.
modified:
  libamf/element.cpp
=== modified file 'libamf/element.cpp'
--- a/libamf/element.cpp        2009-02-10 16:27:07 +0000
+++ b/libamf/element.cpp        2009-02-11 09:27:20 +0000
@@ -612,8 +612,8 @@
 
     // If there is an existing string, 
     if (_buffer) {
-       if (_buffer->size() > size) {
-           _buffer->resize(size);
+       if (_buffer->size() < size) {
+           _buffer->resize(size+1); // add room for the NULL terminator
        }
     } else {
        // Make room for an additional NULL terminator


reply via email to

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