gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r9865: Another robustness fix.


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r9865: Another robustness fix.
Date: Mon, 29 Sep 2008 17:23:16 +0200
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9865
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Mon 2008-09-29 17:23:16 +0200
message:
  Another robustness fix.
modified:
  libcore/parser/action_buffer.h
    ------------------------------------------------------------
    revno: 9860.1.2
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Mon 2008-09-29 16:49:51 +0200
    message:
      Another abort in action_buffer.
    modified:
      libcore/parser/action_buffer.h
=== modified file 'libcore/parser/action_buffer.h'
--- a/libcore/parser/action_buffer.h    2008-09-29 13:34:41 +0000
+++ b/libcore/parser/action_buffer.h    2008-09-29 14:49:51 +0000
@@ -74,7 +74,8 @@
        boost::uint8_t operator[] (size_t off) const
        {
                if (off >= m_buffer.size()) {
-                   throw ActionParserException (_("Attempt to read outside 
action buffer"));
+                   throw ActionParserException (_("Attempt to read outside "
+                                   "action buffer"));
                }
                return m_buffer[off];
        }
@@ -88,7 +89,12 @@
        ///
        const char* read_string(size_t pc) const
        {
-               assert(pc < m_buffer.size() );
+               assert(pc <= m_buffer.size() );
+        if (pc == m_buffer.size())
+        {
+            throw ActionParserException(_("Asked to read string when only "
+                "1 byte remains in the buffer"));
+        }
                return reinterpret_cast<const char*>(&m_buffer[pc]);
        }
 


reply via email to

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