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:
d0837ee
)
ecore_con: fix unitialized use of buffer from strncpy.
author
Cedric Bail
<cedric.bail@samsung.com>
Wed, 27 Nov 2013 05:30:03 +0000
(14:30 +0900)
committer
Cedric Bail
<cedric.bail@samsung.com>
Wed, 27 Nov 2013 05:30:03 +0000
(14:30 +0900)
Fix CID 1039725.
src/lib/ecore_con/ecore_con_local.c
patch
|
blob
|
history
diff --git
a/src/lib/ecore_con/ecore_con_local.c
b/src/lib/ecore_con/ecore_con_local.c
index
fc2063a
..
9dfea45
100644
(file)
--- a/
src/lib/ecore_con/ecore_con_local.c
+++ b/
src/lib/ecore_con/ecore_con_local.c
@@
-68,6
+68,8
@@
ecore_con_local_connect(Ecore_Con_Server *svr,
const char *homedir;
int socket_unix_len;
+ buf[0] = '\0';
+
if ((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_USER)
{
homedir = getenv("XDG_RUNTIME_DIR");
@@
-141,6
+143,7
@@
ecore_con_local_connect(Ecore_Con_Server *svr,
}
else
{
+ socket_unix.sun_path[0] = '\0';
strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path));
socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix);
}