Enlightenment CVS committal
Author : vacuum
Project : e17
Module : apps/examine
Dir : e17/apps/examine/src
Modified Files:
examine_client.c ecore_config_client.c
Log Message:
sprintf -> snprintf
===
RCS file: /cvsroot/enlightenment/e17/apps/examine/src/examine_client.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- examine_client.c20 Jul 2004 14:58:06 - 1.13
+++ examine_client.c25 Jul 2004 04:50:00 - 1.14
@@ -470,11 +470,11 @@
switch (target->type) {
case PT_INT:
valstr = malloc(1000); /* ### FIXME */
-sprintf(valstr, "%d", target->value.val);
+snprintf(valstr, sizeof(valstr)-1, "%d", target->value.val);
break;
case PT_FLT:
valstr = malloc(1000); /* ### FIXME */
-sprintf(valstr, "%f", target->value.fval);
+snprintf(valstr, sizeof(valstr)-1, "%f", target->value.fval);
break;
default: /* PT_STR, PT_RGB */
valstr = target->value.ptr;
===
RCS file: /cvsroot/enlightenment/e17/apps/examine/src/ecore_config_client.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ecore_config_client.c 10 May 2004 22:12:05 - 1.6
+++ ecore_config_client.c 25 Jul 2004 04:50:00 - 1.7
@@ -111,15 +111,15 @@
return ECORE_CONFIG_ERR_IGNORED;
if ((p = getenv("HOME"))) { /* debug-only ### FIXME */
-sprintf(str, "%s/.ecore/%s/.global", p, pipe_name);
+snprintf(str, PATH_MAX -1, "%s/.ecore/%s/.global", p, pipe_name);
if (stat(str, &st))
global = FALSE;
else
global = TRUE;
-sprintf(str, "%s/.ecore/%s/", p, pipe_name);
-snprintf(buf, PATH_MAX, str);
+snprintf(str, PATH_MAX -1, "%s/.ecore/%s/", p, pipe_name);
+snprintf(buf, PATH_MAX -1, str);
if ((dir = opendir(buf))) {
connected = 0;
---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
___
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs