1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-19 01:37:17 +01:00

porting patches from 2.1.17

This commit is contained in:
Vadim Kurland 2008-02-20 05:52:05 +00:00
parent 53088416db
commit 9aeea7e1b2
2 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2008-02-18 vadim <vadim@vk.crocodile.org>
* CircularQueue.hpp (antlr): fixed crash of the policy importer on
64-bit systems. This fixes bug #1886575: "Seg Fault on reading
vanilla Fedora iptables file". See comment in module
CircularQueue.hpp for details.
2008-02-10 vadim <vadim@vk.crocodile.org>
* pt_BR.po: updated Brazilian Portuguese translation by Rubens

View File

@ -40,7 +40,17 @@ public:
}
/// @todo this should use at or should have a check
inline T elementAt( size_t idx ) const
//
// -------------------- vk --------------------------------------------
// Fix for 64-bt systems. Originally argument was defined as
// size_t idx; size_t is defined as unsigned integral type. This leads
// to a crash when parser requests LT(0) at the very beginning of
// the circular buffer because TokenBuffer::LT calls elementAt
// with argument markerOffset+i-1, which is at that point equal
// to -1. If idx is defined as size_t, it ends up equal to
// 4294967295, which means we are looking past the end of the buffer.
// -------------------- vk --------------------------------------------
inline T elementAt( int idx ) const
{
return storage[idx+m_offset];
}