Actions
Bug #14215
opensort(1) gets confused by junk character sequences
Status:
New
Priority:
Normal
Assignee:
-
Category:
cmd - userland programs
Start date:
Due date:
% Done:
0%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
I fed some input to sort, about which it said:
sort: insufficient memory; use -S option to increase allocation
This seemed suspicious, so I used GNU sort, which instead said:
sort: The strings compared were ‘Z"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\bA"\005\b\215"\005\b\215"\005\b8"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\bQ"\005\b\215"\005\b\215"\005\b\215"\005\b\215"\005\b\035"\005\b/"\005\b\t"\005\b&"\005\b’ and ‘cat: cannot stat %s: %s’.
(my locale is en_US.UTF-8)
It seems likely that if fed an illegal byte sequence, sort(1) gets weird. It should not get weird, and should probably output a useful error as GNU do.
No data to display
Actions