diff options
author | Jim Meyering <jim@meyering.net> | 1997-03-14 03:59:21 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-03-14 03:59:21 +0000 |
commit | c127695e96f62f61a94e9f8227abd4b7e71c6088 (patch) | |
tree | b606b937809ffdaf7a9b7563af7c896265a29bd3 /src | |
parent | d7135088021d0ee8aed83407fae595d78c1f6aa1 (diff) | |
download | coreutils-c127695e96f62f61a94e9f8227abd4b7e71c6088.tar.xz |
(main): Make sure c1 is not -1 before using it as an
array index. Patch from Greg McGary. Although this is truly a
bug, I believe it would not cause tr to misbehave on most systems.
I could not construct a test case with which this bug causes tr
to generate invalid output.
Diffstat (limited to 'src')
-rw-r--r-- | src/tr.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2033,7 +2033,7 @@ construct in string1 must be aligned with a corresponding construct\n\ else { /* The following should have been checked by validate... */ - if (c2 == -1) + if (c1 == -1 || c2 == -1) break; xlate[c1] = c2; } |