[pacman-dev] [PATCH] util: fix line length calc in _alpm_archive_fgets
Dave Reisner
d at falconindy.com
Thu Jul 19 23:16:23 EDT 2012
Yes I mentioned this in IRC :P
On Jul 19, 2012 8:55 PM, "Allan McRae" <allan at archlinux.org> wrote:
> 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