Skip to contentSkip to conversation

cluster/cman/qdisk clulog.c disk.c

Cluster-devel [email protected] 1 participant 1 message Oct 29, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2007-10-29 17:54:25

Modified files:
cman/qdisk : clulog.c disk.c

Log message:
Fix format string bugs.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/clulog.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.4.1&r2=1.2.4.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/disk.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4&r2=1.4.4.1

cman/qdisk/clulog.c +1 -1
@@ -273,7 +273,7 @@
 		fprintf(stdout, "%s", printmsg);
 	}
 
-	syslog(severity, logmsg);
+	syslog(severity, "%s", logmsg);
 
 	pthread_mutex_unlock(&log_mutex);
 
cman/qdisk/disk.c +1 -1
@@ -679,7 +679,7 @@
 	}
 
 	/* Copy in the cluster/label name */
-	snprintf(qh.qh_cluster, sizeof(qh.qh_cluster)-1, label);
+	snprintf(qh.qh_cluster, sizeof(qh.qh_cluster)-1, "%s", label);
 
 	if ((qh.qh_timestamp = (uint64_t)time(NULL)) <= 0) {
 		perror("time");