A little patch to fix a possible warning - and overflow.
'buf' is PATH_MAX, but PATH_MAX is not necessary 1024. If
PATH_MAX < 1024 -> overflow.
Also, fgets() fills the buffer and nullterminate it, so we
don't need to buff[0] = '\0'.
--- e_acpi.c 2012-12-15 12:54:15.107749981 +0100
+++ e_acpi.c 2012-12-15 12:53:30.923450394 +0100
@@ -345,8 +344,7 @@
}
/* read the line from state file */
- buff[0] = '\0';
- ret = fgets(buff, 1024, f);
+ ret = fgets(buff, sizeof(buff), f);
fclose(f);
/* parse out state file */
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel