diff options
author | 2017-05-02 19:16:19 +0000 | |
---|---|---|
committer | 2017-05-02 19:16:19 +0000 | |
commit | 78c6fd5540a00eb6c285b806ebc47c5545cf311c (patch) | |
tree | e27896727dd5c65f6ed9139bd9b3265743b9052d | |
parent | Remove -P (warnings about paragraph problems). (diff) | |
download | wireguard-openbsd-78c6fd5540a00eb6c285b806ebc47c5545cf311c.tar.xz wireguard-openbsd-78c6fd5540a00eb6c285b806ebc47c5545cf311c.zip |
Update yy_buf_size after yyrealloc(). The fix has been merged
upstream as well.
-rw-r--r-- | usr.bin/lex/flex.skl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/lex/flex.skl b/usr.bin/lex/flex.skl index bb230208a7a..ca36c8fe3f7 100644 --- a/usr.bin/lex/flex.skl +++ b/usr.bin/lex/flex.skl @@ -1,4 +1,4 @@ -/* $OpenBSD: flex.skl,v 1.15 2015/11/22 19:55:22 tedu Exp $ */ +/* $OpenBSD: flex.skl,v 1.16 2017/05/02 19:16:19 millert Exp $ */ %# -*-C-*- vi: set ft=c: %# This file is processed in several stages. @@ -1748,6 +1748,8 @@ m4_ifdef( [[M4_YY_USES_REJECT]], (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, new_size M4_YY_CALL_LAST_ARG ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); } YY_G(yy_n_chars) += number_to_move; |