Commit 6f50c78e authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

* regex.c (re_search_2): Use ssize_t to avoid integer overflow.

parent 60c6e448
......@@ -6,6 +6,8 @@
Use record_unwind_protect_int and avoid consing.
(syms_of_xmenu) [USE_X_TOOLKIT]: Declare WIDGET_ID_TICK_START.
* regex.c (re_search_2): Use ssize_t to avoid integer overflow.
2014-07-14 Paul Eggert <eggert@cs.ucla.edu>
Use binary-io module, O_BINARY, and "b" flag (Bug#18006).
......
......@@ -4342,8 +4342,7 @@ re_search_2 (struct re_pattern_buffer *bufp, const char *str1, size_t size1,
if (range > 0) /* Searching forwards. */
{
register int lim = 0;
ssize_t irange = range;
ssize_t irange = range, lim = 0;
if (startpos < size1 && startpos + range >= size1)
lim = range - (size1 - startpos);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment