diff options
author | Robert de Bath <rdebath@poboxes.com> | 1996-03-24 17:45:55 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2013-10-23 23:29:43 +0200 |
commit | fe22c37817ce338fbbc90b239320248c270957fa (patch) | |
tree | d9550410c4a20bdd382fcc58d2d3d7c5e04e5245 /libc-0.0.4/regexp/patch.1 | |
parent | a7aba15e8efffb1c5d3097656f1a93955a64f01f (diff) | |
parent | 42192453ea219b80d0bf9f41e51e36d3d4d0740b (diff) | |
download | dev86-fe22c37817ce338fbbc90b239320248c270957fa.tar.gz |
Import Dev86-0.0.4.tar.gzv0.0.4
Diffstat (limited to 'libc-0.0.4/regexp/patch.1')
-rw-r--r-- | libc-0.0.4/regexp/patch.1 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libc-0.0.4/regexp/patch.1 b/libc-0.0.4/regexp/patch.1 new file mode 100644 index 0000000..6126592 --- /dev/null +++ b/libc-0.0.4/regexp/patch.1 @@ -0,0 +1,32 @@ +Subject: bug in regexp(3), and fix +Newsgroups: mod.sources +Approved: jpn@panda.UUCP + +Mod.sources: Volume 3, Issue 105 +Submitted by: genrad!decvax!utzoo!henry + +Drat! Chris Siebenmann at CSRI just found a bug in my regexp(3) routines. +The problem is that the code for character classes does not check properly +for the possibility that it might be looking at the end of the string. By +simple bad luck none of my test cases hit this. To fix it, make the +following two changes to regexp.c: + +848c848 +< if (strchr(OPERAND(scan), *reginput) == NULL) +--- +> if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) == NULL) +853c853 +< if (strchr(OPERAND(scan), *reginput) != NULL) +--- +> if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) != NULL) + +and recompile. Also, add the following line to the "tests" file: + +[k] ab n - - + +My thanks to Chris for finding this. + + Henry Spencer @ U of Toronto Zoology + {allegra,ihnp4,linus,decvax}!utzoo!henry + + |