Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_fm.c
Log Message:
copy string bytes back safely
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- e_fm.c 29 Jul 2006 09:26:18 -0000 1.20
+++ e_fm.c 29 Jul 2006 09:47:54 -0000 1.21
@@ -474,7 +474,7 @@
static const char *
_e_fm2_dev_path_map(const char *dev, const char *path)
{
- char buf[4096] = "", *s;
+ char buf[4096] = "", *s, *ss;
int len;
/* map a device name to a mount point/path on the os (and append path) */
@@ -529,7 +529,16 @@
s = buf;
while (*s)
{
- if ((s[0] == '/') && (s[1] == '/')) strcpy(s, s + 1);
+ if ((s[0] == '/') && (s[1] == '/'))
+ {
+ ss = s;
+ do
+ {
+ ss[0] = ss[1];
+ ss++;
+ }
+ while (*ss);
+ }
s++;
}
/* strip out slashes at the end - unless its just "/" */
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs