gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, gawk-4.2-stable, updated. gawk-4.1.0-310


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, gawk-4.2-stable, updated. gawk-4.1.0-3108-gdc189dc
Date: Fri, 25 Jan 2019 04:55:24 -0500 (EST)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, gawk-4.2-stable has been updated
       via  dc189dc65b6c9b0f521beb4c6105130c6e33a274 (commit)
      from  fe85aef5cc3e31450c6850c996aa348a68c42ca7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=dc189dc65b6c9b0f521beb4c6105130c6e33a274

commit dc189dc65b6c9b0f521beb4c6105130c6e33a274
Author: Arnold D. Robbins <address@hidden>
Date:   Fri Jan 25 11:54:54 2019 +0200

    Bug fix in support/regexec.c.

diff --git a/support/ChangeLog b/support/ChangeLog
index a941f28..b006a67 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,10 @@
+2019-01-21         Paul Eggert           <address@hidden>
+
+       regex: fix read overrun
+       Problem found by AddressSanitizer, reported by Hongxu Chen in:
+       https://debbugs.gnu.org/cgi/34140
+       * regexec.c (proceed_next_node): Do not read past end of input buffer.
+
 2019-01-09         John E. Malmberg      <address@hidden>
 
        * cdefs.h, xalloc.h: For non GCC, have
diff --git a/support/regexec.c b/support/regexec.c
index ecb430d..ff6ab12 100644
--- a/support/regexec.c
+++ b/support/regexec.c
@@ -1293,8 +1293,10 @@ proceed_next_node (const re_match_context_t *mctx, Idx 
nregs, regmatch_t *regs,
              else if (naccepted)
                {
                  char *buf = (char *) re_string_get_buffer (&mctx->input);
-                 if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
-                             naccepted) != 0)
+                 if (mctx->input.valid_len - *pidx < naccepted
+                     || (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
+                                 naccepted)
+                         != 0))
                    return -1;
                }
            }

-----------------------------------------------------------------------

Summary of changes:
 support/ChangeLog | 7 +++++++
 support/regexec.c | 6 ++++--
 2 files changed, 11 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]