mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
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' a
This commit is contained in:
parent
d20d37559f
commit
ed43806c3b
@ -202,9 +202,9 @@ extern int tr_main(int argc, char **argv)
|
|||||||
map(input, input_length, output, output_length);
|
map(input, input_length, output, output_length);
|
||||||
}
|
}
|
||||||
for (i = 0; i < input_length; i++)
|
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++)
|
for (i = 0; i < output_length; i++)
|
||||||
outvec[(int)output[i]] = TRUE;
|
outvec[(unsigned char)output[i]] = TRUE;
|
||||||
}
|
}
|
||||||
convert();
|
convert();
|
||||||
return (0);
|
return (0);
|
||||||
|
Loading…
Reference in New Issue
Block a user