projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
403098f
)
ecore_con: fix non initialized use of buf with strncpy.
author
Cedric Bail
<cedric.bail@samsung.com>
Wed, 27 Nov 2013 05:27:00 +0000
(14:27 +0900)
committer
Cedric Bail
<cedric.bail@samsung.com>
Wed, 27 Nov 2013 05:27:00 +0000
(14:27 +0900)
This fix CID 1039723.
src/lib/ecore_con/ecore_con_socks.c
patch
|
blob
|
history
diff --git
a/src/lib/ecore_con/ecore_con_socks.c
b/src/lib/ecore_con/ecore_con_socks.c
index
8ea64a9
..
d4adfdc
100644
(file)
--- a/
src/lib/ecore_con/ecore_con_socks.c
+++ b/
src/lib/ecore_con/ecore_con_socks.c
@@
-578,8
+578,8
@@
ecore_con_socks_init(void)
socks = getenv("ECORE_CON_SOCKS_V5");
v5 = EINA_TRUE;
}
- if ((!socks) || (!socks[0]) || (strlen(socks) > 512)) return;
-
strncpy(buf, socks, sizeof(buf)
);
+ if ((!socks) || (!socks[0]) || (strlen(socks)
+ 1
> 512)) return;
+
memcpy(buf, socks, strlen(socks) + 1
);
h = strchr(buf, '@');
/* username */
if (h && (h - buf > 0)) *h++ = 0, u = buf;