aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-01-31 08:22:10 +0000
committerRon Yorston <rmy@pobox.com>2023-01-31 08:22:10 +0000
commitf3aae6b7c256b1d9faff96f957f32886643bbaa8 (patch)
tree18d08897a507cb7866f309ec996268cb4cf0b2dd /include
parentb9a1b02dee2b82e4e4a580c446a1e022aa96166d (diff)
downloadbusybox-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 'include')
0 files changed, 0 insertions, 0 deletions