Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6de4365

Browse files
committed
trailing NUL
1 parent 1bf0fb9 commit 6de4365

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ct/ct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ rmtree(char *path)
194194
continue;
195195
}
196196
int n = strlen(path) + 1 + strlen(ent->d_name);
197-
char s[n];
197+
char s[n+1];
198198
sprintf(s, "%s/%s", path, ent->d_name);
199199
rmtree(s);
200200
}

0 commit comments

Comments
 (0)