aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-08-21 09:29:09 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-08-21 11:02:19 -0700
commitf615e3fced100914b1ee4d690f380deb69a4be70 (patch)
treeac32f9d777b3d2df6e691b39befac8f3a38c617d
parent8a80ee5e2bab17a1f8e1e78fab5c33ac7efa8b29 (diff)
downloadglibc-f615e3fced100914b1ee4d690f380deb69a4be70.tar
glibc-f615e3fced100914b1ee4d690f380deb69a4be70.tar.gz
glibc-f615e3fced100914b1ee4d690f380deb69a4be70.tar.bz2
glibc-f615e3fced100914b1ee4d690f380deb69a4be70.zip
Remove dead regex code
* posix/regex_internal.c (re_node_set_insert): Remove unnecessary assignment. Reported by Tim Rühsen in: https://lists.gnu.org/r/bug-gnulib/2019-08/msg00026.html
-rw-r--r--ChangeLog5
-rw-r--r--posix/regex_internal.c1
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2db09d2f18..182aa13353 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2019-08-21 Paul Eggert <eggert@cs.ucla.edu>
+ Remove dead regex code
+ * posix/regex_internal.c (re_node_set_insert):
+ Remove unnecessary assignment. Reported by Tim Rühsen in:
+ https://lists.gnu.org/r/bug-gnulib/2019-08/msg00026.html
+
Fix bad pointer / leak in regex code
This was found by Coverity (CID 1484201). [BZ#24844]
* posix/regex_internal.c (create_cd_newstate): Fix use of bad
diff --git a/posix/regex_internal.c b/posix/regex_internal.c
index f53ded93a8..99fbb26ecb 100644
--- a/posix/regex_internal.c
+++ b/posix/regex_internal.c
@@ -1311,7 +1311,6 @@ re_node_set_insert (re_node_set *set, Idx elem)
first element separately to skip a check in the inner loop. */
if (elem < set->elems[0])
{
- idx = 0;
for (idx = set->nelem; idx > 0; idx--)
set->elems[idx] = set->elems[idx - 1];
}