Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/test
Modified Files:
ewl_test.c
Log Message:
Fix a buffer size problem for the test program reading in the test code files.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_test.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- ewl_test.c 9 Jul 2004 13:24:50 -0000 1.65
+++ ewl_test.c 29 Jul 2004 20:00:34 -0000 1.66
@@ -45,9 +45,10 @@
if (file)
{
stat (filename, &buf);
- str = (char*)malloc (sizeof (char)*buf.st_size);
+ str = (char*)malloc (sizeof (char)*buf.st_size + 1);
fread(str, buf.st_size, 1, file);
+ str[buf.st_size] = '\0';
ewl_text_text_set (EWL_TEXT (main_text), str);
}
free (filename);
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs