svn commit: r295247 - user/ngie/bsnmp_cleanup/contrib/bsnmp/lib
Garrett Cooper
ngie at FreeBSD.org
Thu Feb 4 09:08:38 UTC 2016
Author: ngie
Date: Thu Feb 4 09:08:36 2016
New Revision: 295247
URL: https://svnweb.freebsd.org/changeset/base/295247
Log:
Use mkstemp(3) instead of mktemp(3) when creating temporary files to fix
the security pragma
Modified:
user/ngie/bsnmp_cleanup/contrib/bsnmp/lib/snmpclient.c
Modified: user/ngie/bsnmp_cleanup/contrib/bsnmp/lib/snmpclient.c
==============================================================================
--- user/ngie/bsnmp_cleanup/contrib/bsnmp/lib/snmpclient.c Thu Feb 4 09:07:44 2016 (r295246)
+++ user/ngie/bsnmp_cleanup/contrib/bsnmp/lib/snmpclient.c Thu Feb 4 09:08:36 2016 (r295247)
@@ -1000,7 +1000,7 @@ open_client_local(const char *path)
snprintf(snmp_client.local_path, sizeof(snmp_client.local_path),
"%s", SNMP_LOCAL_PATH);
- if (mktemp(snmp_client.local_path) == NULL) {
+ if (mkstemp(snmp_client.local_path) == -1) {
seterr(&snmp_client, "%s", strerror(errno));
(void)close(snmp_client.fd);
snmp_client.fd = -1;
More information about the svn-src-user
mailing list