diff options
author | Richard Yao <ryao@gentoo.org> | 2012-05-24 13:10:40 +0000 |
---|---|---|
committer | Richard Yao <ryao@gentoo.org> | 2012-05-24 13:10:40 +0000 |
commit | 31fd937ac42ea0d6f9d65e26063fe876a3a69802 (patch) | |
tree | 9b03f2765ab083405dabc3a0aafc73c8ea1ba8ce /sys-process/pidof-bsd/files/pidof-bsd-20050501-pname.patch | |
parent | Version bump to the latest. Make tests work. Per bug#417257. Patch done by Ia... (diff) | |
download | gentoo-2-31fd937ac42ea0d6f9d65e26063fe876a3a69802.tar.gz gentoo-2-31fd937ac42ea0d6f9d65e26063fe876a3a69802.tar.bz2 gentoo-2-31fd937ac42ea0d6f9d65e26063fe876a3a69802.zip |
Fix patch to avoid undefined behavior, bug \#417181
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Diffstat (limited to 'sys-process/pidof-bsd/files/pidof-bsd-20050501-pname.patch')
-rw-r--r-- | sys-process/pidof-bsd/files/pidof-bsd-20050501-pname.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-process/pidof-bsd/files/pidof-bsd-20050501-pname.patch b/sys-process/pidof-bsd/files/pidof-bsd-20050501-pname.patch index 66095f51e637..13e890c6a37c 100644 --- a/sys-process/pidof-bsd/files/pidof-bsd-20050501-pname.patch +++ b/sys-process/pidof-bsd/files/pidof-bsd-20050501-pname.patch @@ -7,10 +7,10 @@ + char *pname = NULL; + + if (process_name == NULL) -+ return; ++ return 0; + + if ((pname = strdup(basename(process_name))) == NULL) -+ return; ++ return 0; - if ((kd = kvm_open("/dev/null", "/dev/null", "/dev/null", O_RDONLY, "kvm_open")) == NULL) - (void)errx(1, "%s", kvm_geterr(kd)); |