mirror of
https://github.com/boostorg/wave.git
synced 2026-02-22 03:42:24 +00:00
Fixed a rare memory corruption bug in the Wave Re2C scanner buffer management code.
[SVN r33831]
This commit is contained in:
@@ -194,7 +194,7 @@ uchar *fill(Scanner *s, uchar *cursor)
|
||||
{
|
||||
if (NULL == s->lim)
|
||||
s->lim = s->top;
|
||||
memcpy(s->bot, s->tok, s->lim - s->tok);
|
||||
memmove(s->bot, s->tok, s->lim - s->tok);
|
||||
s->tok = s->cur = s->bot;
|
||||
s->ptr -= cnt;
|
||||
cursor -= cnt;
|
||||
@@ -218,7 +218,7 @@ uchar *fill(Scanner *s, uchar *cursor)
|
||||
return cursor;
|
||||
}
|
||||
|
||||
memcpy(buf, s->tok, s->lim - s->tok);
|
||||
memmove(buf, s->tok, s->lim - s->tok);
|
||||
s->tok = s->cur = buf;
|
||||
s->ptr = &buf[s->ptr - s->bot];
|
||||
cursor = &buf[cursor - s->bot];
|
||||
@@ -238,7 +238,7 @@ uchar *fill(Scanner *s, uchar *cursor)
|
||||
cnt = s->last - s->act;
|
||||
if (cnt > BOOST_WAVE_BSIZE)
|
||||
cnt = BOOST_WAVE_BSIZE;
|
||||
memcpy(s->lim, s->act, cnt);
|
||||
memmove(s->lim, s->act, cnt);
|
||||
s->act += cnt;
|
||||
if (cnt != BOOST_WAVE_BSIZE)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by re2c 0.10.0 on Mon Mar 20 11:46:13 2006 */
|
||||
/* Generated by re2c 0.10.0 on Wed Apr 26 15:42:21 2006 */
|
||||
#line 1 "cpp.re"
|
||||
/*=============================================================================
|
||||
Boost.Wave: A Standard compliant C++ preprocessor library
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by re2c 0.10.0 on Mon Mar 20 11:46:13 2006 */
|
||||
/* Generated by re2c 0.10.0 on Wed Apr 26 15:42:21 2006 */
|
||||
#line 1 "strict_cpp.re"
|
||||
/*=============================================================================
|
||||
Boost.Wave: A Standard compliant C++ preprocessor library
|
||||
|
||||
Reference in New Issue
Block a user