commit | d4f7ecd334cb666d2b58d80b40fe95d9b89f6716 | [log] [tgz] |
---|---|---|
author | Eivind Uggedal <eivind@uggedal.com> | Fri Mar 11 15:06:18 2016 +0000 |
committer | sin <sin@2f30.org> | Fri Mar 11 15:38:36 2016 +0000 |
tree | 397f4641b0148b0ab39ca7d774467010b35f855d | |
parent | 515525997c634c1abd6ec3e661a02f5c11858c00 [diff] |
uniq: always store previous line length A bug was introduced in the NUL support refactor leading to the length of the previous line only being saved if the previous line was shorter than the current line. If triggered this lead to copying too much data into the previous line buffer. Behavior before: printf '1234\na\n' | ./uniq 1234 a 4 Behavior after: printf '1234\na\n' | ./uniq 1234 a