diff options
author | Robert de Bath <rdebath@poboxes.com> | 1996-03-24 21:25:23 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2013-10-23 23:29:54 +0200 |
commit | dcc973ea3e31710429858c99d4f040334ac67c06 (patch) | |
tree | 8883b902eb18eba489957b7f03caa491fd7992a7 /libc/regexp/patch.2 | |
parent | fe22c37817ce338fbbc90b239320248c270957fa (diff) | |
download | dev86-dcc973ea3e31710429858c99d4f040334ac67c06.tar.gz |
Import Dev86-0.0.5.tar.gzv0.0.5
Diffstat (limited to 'libc/regexp/patch.2')
-rw-r--r-- | libc/regexp/patch.2 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libc/regexp/patch.2 b/libc/regexp/patch.2 new file mode 100644 index 0000000..fcf4778 --- /dev/null +++ b/libc/regexp/patch.2 @@ -0,0 +1,27 @@ +Subject: 2nd bug fix for regexp(3), in regsub() +Newsgroups: mod.sources +Approved: jpn@panda.UUCP + +Mod.sources: Volume 4, Issue 33 +Submitted by: genrad!decvax!utzoo!henry + +I cringe with embarrassment! Another bug in regexp! In regsub.c, the +following line (line 72 in the original distribution): + + if (*(dst-1) == '\0') { /* strncpy hit NUL. */ + +should read + + if (len != 0 && *(dst-1) == '\0') { /* strncpy hit NUL. */ + +This shows up as an occasional spurious complaint from regsub about +"damaged match string"... *if* the program invoking it, and the compiler +compiling it, happen to interact just right. It didn't show in any of +my tests because mine don't. + +My thanks to H}vard Eidnes for finding this. + + Henry Spencer @ U of Toronto Zoology + {allegra,ihnp4,linus,decvax}!utzoo!henry + + |