1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00
pacman/lib/libalpm
Dave Reisner ddbd36103d util: fix line length calc in _alpm_archive_fgets
74274b5dc3 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>
2012-08-01 08:53:10 -05:00
..
po Updates from Transifex 2012-04-07 10:13:37 -05:00
.gitignore libalpm: add pkg-config file 2012-04-25 20:02:36 -04:00
add.c Merge branch 'maint' 2012-05-20 17:41:21 -05:00
add.h Update copyright years 2012-02-20 16:54:34 -06:00
alpm_list.c Update copyright years 2012-02-20 16:54:34 -06:00
alpm_list.h Update copyright years 2012-02-20 16:54:34 -06:00
alpm.c Update copyright years 2012-02-20 16:54:34 -06:00
alpm.h Prefix alpm_pkgfrom_t members with ALPM_ 2012-04-07 11:29:55 -05:00
backup.c Update copyright years 2012-02-20 16:54:34 -06:00
backup.h Update copyright years 2012-02-20 16:54:34 -06:00
base64.c Use 32-bit wide integer type in PolarSSL code 2012-01-07 11:27:41 -06:00
base64.h base64: don't compile base64_encode() function 2011-10-17 12:03:02 -05:00
be_local.c lib/be_local: ensure local filelists are sorted 2012-08-01 08:53:10 -05:00
be_package.c lib/be_package: use qsort instead of our own msort 2012-08-01 08:53:10 -05:00
be_sync.c update comments referring to alpm_option_get_syncdbs 2012-07-10 08:37:59 -05:00
conflict.c lib/conflict: use a binary search within filelists 2012-08-01 08:53:10 -05:00
conflict.h Update copyright years 2012-02-20 16:54:34 -06:00
db.c update comments referring to alpm_option_get_syncdbs 2012-07-10 08:37:59 -05:00
db.h Update copyright years 2012-02-20 16:54:34 -06:00
delta.c Update copyright years 2012-02-20 16:54:34 -06:00
delta.h Update copyright years 2012-02-20 16:54:34 -06:00
deps.c fix -Wshadow warnings as reported by gcc 4.4.3 2012-05-20 17:54:42 -05:00
deps.h Update copyright years 2012-02-20 16:54:34 -06:00
diskspace.c diskspace: log errors when opening the mount table fails 2012-07-10 08:33:33 -05:00
diskspace.h diskspace: only load filesystem info on demand 2012-06-25 23:37:10 -05:00
dload.c fix -Wshadow warnings as reported by gcc 4.4.3 2012-05-20 17:54:42 -05:00
dload.h Update copyright years 2012-02-20 16:54:34 -06:00
error.c Return more useful error codes on package open failures 2012-04-07 11:29:11 -05:00
graph.c Update copyright years 2012-02-20 16:54:34 -06:00
graph.h Update copyright years 2012-02-20 16:54:34 -06:00
group.c Pointer coding style cleanups 2012-04-24 21:05:51 -05:00
group.h Update copyright years 2012-02-20 16:54:34 -06:00
handle.c Move short-lived realpath buffers to the stack 2012-04-29 20:14:10 -05:00
handle.h Update copyright years 2012-02-20 16:54:34 -06:00
libalpm.pc.in libalpm: add pkg-config file 2012-04-25 20:02:36 -04:00
log.c Update copyright years 2012-02-20 16:54:34 -06:00
log.h Update copyright years 2012-02-20 16:54:34 -06:00
Makefile.am libalpm: add pkg-config file 2012-04-25 20:02:36 -04:00
md5.c Use 32-bit wide integer type in PolarSSL code 2012-01-07 11:27:41 -06:00
md5.h Update MD5 routines with changes from PolarSSL 2011-08-11 20:17:21 -05:00
package.c Pointer coding style cleanups 2012-04-24 21:05:51 -05:00
package.h Pointer coding style cleanups 2012-04-24 21:05:51 -05:00
pkghash.c Update copyright years 2012-02-20 16:54:34 -06:00
pkghash.h Update copyright years 2012-02-20 16:54:34 -06:00
rawstr.c include util.h in rawstr.c 2011-07-05 22:36:40 -05:00
remove.c libalpm/remove.c - add doxygen 2012-05-21 00:03:20 -05:00
remove.h Update copyright years 2012-02-20 16:54:34 -06:00
sha2.c Use 32-bit wide integer type in PolarSSL code 2012-01-07 11:27:41 -06:00
sha2.h Add sha2 (sha256) routines from PolarSSL 2011-08-15 07:07:13 -05:00
signing.c Merge branch 'maint' 2012-04-12 08:57:26 -05:00
signing.h Update copyright years 2012-02-20 16:54:34 -06:00
sync.c Prefix alpm_pkgfrom_t members with ALPM_ 2012-04-07 11:29:55 -05:00
sync.h Update copyright years 2012-02-20 16:54:34 -06:00
trans.c Various tweaks to support building with excessive GCC warning flags 2012-04-08 22:28:45 -04:00
trans.h Update copyright years 2012-02-20 16:54:34 -06:00
util.c util: fix line length calc in _alpm_archive_fgets 2012-08-01 08:53:10 -05:00
util.h add real_line_size to alpm_read_buffer 2012-06-25 23:04:24 -05:00
version.c Update copyright years 2012-02-20 16:54:34 -06:00