[prev in list] [next in list] [prev in thread] [next in thread]
List: gnash-commit
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r9865: Another robustness fix.
From: Benjamin Wolsey <bwy () benjaminwolsey ! de>
Date: 2008-09-29 15:23:16
Message-ID: E1KkLBz-0007ij-AF () sv ! gnu ! org
[Download RAW message or body]
------------------------------------------------------------
revno: 9865
committer: Benjamin Wolsey <bwy@benjaminwolsey.de>
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 <bwy@benjaminwolsey.de>
branch nick: work
timestamp: Mon 2008-09-29 16:49:51 +0200
message:
Another abort in action_buffer.
modified:
libcore/parser/action_buffer.h
["r9865.diff" (r9865.diff)]
=== 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]);
}
_______________________________________________
Gnash-commit mailing list
Gnash-commit@gnu.org
http://lists.gnu.org/mailman/listinfo/gnash-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic