[pacman-dev] [PATCH] util: fix line length calc in _alpm_archive_fgets

Allan McRae allan at archlinux.org
Thu Jul 19 20:55:29 EDT 2012


On 20/07/12 10:47, Dave Reisner wrote:
> Not necessary If you zero out the line size in the !eol case when len == 0

Ah...  adding:

--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -1025,6 +1025,7 @@ int _alpm_archive_fgets(struct archive *a, struct
archive_
                         * returned on next call */
                        if(len == 0) {
                                b->line_offset[0] = '\0';
+                               b->real_line_size = 0;
                                return ARCHIVE_OK;
                        }
                }


all is good.



More information about the pacman-dev mailing list