pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/51010: editors/nano-2.5.3 segfaults when filename outside of current working directory given as argument
The following reply was made to PR pkg/51010; it has been noted by GNATS.
From: Kamil Rytarowski <n54%gmx.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: pkg/51010: editors/nano-2.5.3 segfaults when filename outside of
current working directory given as argument
Date: Sat, 26 Mar 2016 18:48:45 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
There might still be a memory leak. Are you OK with this patch:
$NetBSD$
- --- src/files.c.orig 2016-02-25 20:47:10.000000000 +0000
+++ src/files.c
@@ -43,7 +43,7 @@ bool has_valid_path(const char *filename
if (strrchr(filename, '/') == NULL)
parentdir = mallocstrcpy(NULL, ".");
else
- - parentdir = dirname(mallocstrcpy(NULL, filename));
+ parentdir = strdup(dirname(filename));
if (stat(parentdir, &parentinfo) == -1) {
if (errno == ENOENT)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJW9st9AAoJEEuzCOmwLnZsGwMQAIsll+SWPHgf+KVwp0PN6+74
GK9lIkZC4wiePjcA9UIQKYm2pcJ0RAKzyELWjALSH0ikLem4rKnHs8s2+slNR4A9
KC06mi4sKT01CkPCz3Ov2t1SQLwY8lhwKpKWXRDkJDZutTHZBTRBUxH6IK4AjnsO
jXnp7Wtw6RmXsU2Jkw9lLzT24Y5SK3LADcSLdpdr+NkXvSjll3namT7Ed7OXNpmV
b1VycxXqWhLyNnUZ70CLE5WwihXVXD0fmUcP9fNR8nfy72m5UbFHU1DzBBXTZ8Sx
16SscgUmswV05GCypbWfHruFx456AQDnfcF6thO4UOB/WauFSPkK/0aa9LYFcrcf
BfhHnCjiRK+AjXNNx5JdtpViVM8zpUx7+siVG1eAZl36hMVCDPy0Clt4vL4jXuVs
Tmhzi1o9YkIlAlL8LkKPCzzDd+lpOyPnzRK7jJ20YIyMMFEv37Piw7L6g8RbNa57
npl2p/iA2lSklYbhTSLWl9qmysti+3G/LHGqe/Mw4qlSqICPXW470ZhaZBx6A0W+
AAO8WN71/DHAs8ntG56lJ00/+GQ9W4EPIDwTHgfZsa3kGZEFDROPOKtfAT6RIFv3
msTTgIuaOjuQLOtFLaNvGX6ChWGZQTnAMu6jItOqYNBM9VQsfMjliihp6WgR6NXT
kInGZneGSafHkRtTTSUF
=C0ZD
-----END PGP SIGNATURE-----
Home |
Main Index |
Thread Index |
Old Index