diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-07-19 10:37:56 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-08-01 08:53:10 -0500 |
commit | ddbd36103df95b3fbd199466f3203242ab9ed8f2 (patch) | |
tree | 8ead776c2c04483bc02ebc33e5e858831d7d75b4 /lib/libalpm/po/LINGUAS | |
parent | 35ac4e7ef31898b4d8a090c687aad63df1436083 (diff) |
util: fix line length calc in _alpm_archive_fgets
74274b5dc347ba70 which added the real_line_size to the buffer struct
didn't properly account for what happens when archive_fgets has to loop
more than once to find the end of a line. In most cases, this isn't a
problem, but could potentially cause a longer line such as PGP signature
to be improperly read.
This patch fixes the oversight and focuses on only calculating the line
length when we hit the end of line marker. The effective length is then
calculated via pointer arithmetic as:
(start_of_last_read + read_length) - start_of_line
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'lib/libalpm/po/LINGUAS')
0 files changed, 0 insertions, 0 deletions