1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

fts: clear down the path stack with memset

https://github.com/warmcat/libwebsockets/issues/1445
This commit is contained in:
Andy Green 2018-11-06 07:04:12 +08:00
parent 175f2a2d18
commit 2312ee88fc

View file

@ -823,14 +823,11 @@ autocomp:
if (pos > (int)sizeof(s[sp].ch[0].name) - 1)
pos = (int)sizeof(s[sp].ch[0].name) - 1;
s[sp].child_count = 0;
memset(&s[sp], 0, sizeof(s[sp]));
s[sp].child = 1;
s[sp].once = 0;
s[sp].tifs = fileofs_tif_start;
s[sp].self = child_ofs;
s[sp].ch[0].name_length = 0;
s[sp].done_children = 0;
s[sp + 1].done_children = 0;
s[sp].ch[0].effpos = pos;
if (pos == nl)
@ -864,11 +861,8 @@ autocomp:
if (!s[sp].done_children && children) {
s[sp].done_children = 1;
sp++;
s[sp].child = 0;
memset(&s[sp], 0, sizeof(s[sp]));
s[sp].tifs = fileofs_tif_start;
s[sp].once = 0;
s[sp].child_count = 0;
s[sp].done_children = 0;
s[sp].self = child_ofs;
for (n = 0; n < (int)children && s[sp].child_count <