Commit 3d24313c authored by minus's avatar minus

Fix name check out of bounds read

parent 7a9ba807
......@@ -66,6 +66,7 @@ struct siso_watch *siso_add_name(struct siso_watch_list *wl, const char* name) {
struct siso_watch *siso_get(struct siso_watch_list *wl, const char *name) {
for (struct siso_watch *w = wl->head; w != NULL; w = w->next) {
int offset = strlen(name) - strlen(w->name);
if (offset < 0) continue;
if (strcmp(w->name, name + offset) == 0) {
return w;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment