mirror of
https://github.com/tbamud/tbamud.git
synced 2026-04-30 04:41:51 +02:00
Fix stray null write: replace sizeof(buf) with *buf = '\0' in var_subst()
Agent-Logs-Url: https://github.com/tbamud/tbamud/sessions/339cbdde-5de4-4f33-aea6-82df3efbd9c4 Co-authored-by: welcor <357770+welcor@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
d627638f56
commit
d5c688188b
@@ -1722,5 +1722,5 @@ void var_subst(void *go, struct script_data *sc, trig_data *trig,
|
|||||||
left -= len;
|
left -= len;
|
||||||
} /* else if *p .. */
|
} /* else if *p .. */
|
||||||
} /* while *p .. */
|
} /* while *p .. */
|
||||||
buf[sizeof(buf) - 1] = '\0';
|
*buf = '\0';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user