mirror of https://github.com/mirror/busybox.git
Hideki IWAMOTO writes:
Current `tr' implementation has a problem, if `plain char' is signed. [current cvs version] >echo a | _install/usr/bin/tr '\0' '\377' Segmentation fault (core dumped) [patched version] >echo a | _install/usr/bin/tr '\0' '\377' a1_00_stable_10817
parent
d20d37559f
commit
ed43806c3b
|
@ -202,9 +202,9 @@ extern int tr_main(int argc, char **argv)
|
|||
map(input, input_length, output, output_length);
|
||||
}
|
||||
for (i = 0; i < input_length; i++)
|
||||
invec[(int)input[i]] = TRUE;
|
||||
invec[(unsigned char)input[i]] = TRUE;
|
||||
for (i = 0; i < output_length; i++)
|
||||
outvec[(int)output[i]] = TRUE;
|
||||
outvec[(unsigned char)output[i]] = TRUE;
|
||||
}
|
||||
convert();
|
||||
return (0);
|
||||
|
|
Loading…
Reference in New Issue