pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/48207: pkg_info segfaults when querying a package file
The following reply was made to PR pkg/48207; it has been noted by GNATS.
From: Thomas Klausner <wiz%NetBSD.org@localhost>
To: NetBSD bugtracking <gnats-bugs%NetBSD.org@localhost>
Cc:
Subject: Re: pkg/48207: pkg_info segfaults when querying a package file
Date: Wed, 11 Sep 2013 23:30:47 +0200
--ZPt4rx8FFjLCG7dd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Wed, Sep 11, 2013 at 04:45:01PM +0000, Joerg Sonnenberger wrote:
> Don't like it. In the else part, it should be
>
> len = strlen(buf);
> next = buf + len;
Sure, that works for me too.
Thomas
--ZPt4rx8FFjLCG7dd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pkg_install.diff"
Index: files/lib/var.c
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkg_install/files/lib/var.c,v
retrieving revision 1.9
diff -u -r1.9 var.c
--- files/lib/var.c 17 May 2013 07:27:29 -0000 1.9
+++ files/lib/var.c 11 Sep 2013 21:30:25 -0000
@@ -60,7 +60,7 @@
static void var_print(FILE *, const char *, const char *);
/*
- * Copy the specified varibales from the file fname to stdout.
+ * Copy the specified variables from the file fname to stdout.
*/
int
var_copy_list(const char *buf, const char **variables)
@@ -74,8 +74,8 @@
next = eol + 1;
len = eol - buf;
} else {
- next = eol;
len = strlen(buf);
+ next = buf + len;
}
for (i=0; variables[i]; i++) {
--ZPt4rx8FFjLCG7dd--
Home |
Main Index |
Thread Index |
Old Index