diff options
author | Ron Yorston <rmy@pobox.com> | 2023-01-31 08:22:10 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-01-31 08:22:10 +0000 |
commit | f3aae6b7c256b1d9faff96f957f32886643bbaa8 (patch) | |
tree | 18d08897a507cb7866f309ec996268cb4cf0b2dd /scripts | |
parent | b9a1b02dee2b82e4e4a580c446a1e022aa96166d (diff) | |
download | busybox-w32-f3aae6b7c256b1d9faff96f957f32886643bbaa8.tar.gz busybox-w32-f3aae6b7c256b1d9faff96f957f32886643bbaa8.tar.bz2 busybox-w32-f3aae6b7c256b1d9faff96f957f32886643bbaa8.zip |
libbb: fix CRLF handling
Ensure a trailing CR is only removed if it precedes a LF.
The two cases at issue are intended to read complete lines and remove
the line terminator. In the normal case a trailing LF will be present
so removing the CR unconditionally worked. However, if the last line
of a file was missing its LF or if a NUL was detected (in the case of
xmalloc_fgetline()) the CR might have been removed without justification.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions