[Pommed-commits] r415 - trunk/client-common
jblache at alioth.debian.org
jblache at alioth.debian.org
Thu Dec 6 19:59:22 UTC 2007
Author: jblache
Date: 2007-12-06 19:59:22 +0000 (Thu, 06 Dec 2007)
New Revision: 415
Modified:
trunk/client-common/video-client.c
Log:
Fix snprintf() error checking.
Modified: trunk/client-common/video-client.c
===================================================================
--- trunk/client-common/video-client.c 2007-12-06 11:05:18 UTC (rev 414)
+++ trunk/client-common/video-client.c 2007-12-06 19:59:22 UTC (rev 415)
@@ -127,7 +127,7 @@
vt = mbp_get_x_vtnum(dpy);
ret = snprintf(buf, sizeof(buf), "/dev/tty%d", vt);
- if (ret >= sizeof(buf))
+ if ((ret < 0) || (ret >= sizeof(buf)))
return 1;
/* Try to open the VT our X session is running on */
More information about the Pommed-commits
mailing list