[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep branch, master, updated. v2.20-90-ga07a473
From: |
Jim Meyering |
Subject: |
grep branch, master, updated. v2.20-90-ga07a473 |
Date: |
Sun, 16 Nov 2014 15:46:27 +0000 |
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 "grep".
The branch, master has been updated
via a07a473b558709741ef9a39a97a65ddcedc41eb3 (commit)
from 37d90d5ae4c4a42f59fa655529483827f687d91c (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.savannah.gnu.org/cgit/grep.git/commit/?id=a07a473b558709741ef9a39a97a65ddcedc41eb3
commit a07a473b558709741ef9a39a97a65ddcedc41eb3
Author: Norihiro Tanaka <address@hidden>
Date: Sat Nov 15 22:21:34 2014 -0800
dfa: avoid undefined behavior
* src/dfa.c (dfassbuild): Don't call memcpy with a second
argument of NULL, even when the size (3rd argument) is 0.
diff --git a/src/dfa.c b/src/dfa.c
index e0fc120..65862e8 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3660,8 +3660,11 @@ dfassbuild (struct dfa *d)
sup->musts = NULL;
sup->charclasses = xnmalloc (sup->calloc, sizeof *sup->charclasses);
- memcpy (sup->charclasses, d->charclasses,
- d->cindex * sizeof *sup->charclasses);
+ if (d->cindex)
+ {
+ memcpy (sup->charclasses, d->charclasses,
+ d->cindex * sizeof *sup->charclasses);
+ }
sup->tokens = xnmalloc (d->tindex, 2 * sizeof *sup->tokens);
sup->talloc = d->tindex * 2;
-----------------------------------------------------------------------
Summary of changes:
src/dfa.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
hooks/post-receive
--
grep
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep branch, master, updated. v2.20-90-ga07a473,
Jim Meyering <=