forked from enlightenment/efl
ecore_con: fix non initialized use of buf with strncpy.
This fix CID 1039723.
This commit is contained in:
parent
403098fdb2
commit
d0837ee5f5
|
@ -578,8 +578,8 @@ ecore_con_socks_init(void)
|
||||||
socks = getenv("ECORE_CON_SOCKS_V5");
|
socks = getenv("ECORE_CON_SOCKS_V5");
|
||||||
v5 = EINA_TRUE;
|
v5 = EINA_TRUE;
|
||||||
}
|
}
|
||||||
if ((!socks) || (!socks[0]) || (strlen(socks) > 512)) return;
|
if ((!socks) || (!socks[0]) || (strlen(socks) + 1 > 512)) return;
|
||||||
strncpy(buf, socks, sizeof(buf));
|
memcpy(buf, socks, strlen(socks) + 1);
|
||||||
h = strchr(buf, '@');
|
h = strchr(buf, '@');
|
||||||
/* username */
|
/* username */
|
||||||
if (h && (h - buf > 0)) *h++ = 0, u = buf;
|
if (h && (h - buf > 0)) *h++ = 0, u = buf;
|
||||||
|
|
Loading…
Reference in New Issue