2 Commits

Author SHA1 Message Date
Copilot
a049fddcea Fix stray null write from sizeof(pointer) bug in var_subst() (#190)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: welcor <357770+welcor@users.noreply.github.com>
2026-04-25 23:28:40 +02:00
Copilot
af06fa0621 Fix stack buffer overflow in perform_complex_alias() via unbounded alias expansion (#180)
* Fix stack buffer overflow in perform_complex_alias() - add bounds checks
* Refactor: use return value instead of char_data param in perform_complex_alias()
* Add unit tests for perform_complex_alias() via perform_alias()

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: welcor <357770+welcor@users.noreply.github.com>
2026-04-25 20:59:04 +02:00

View File

@@ -1722,5 +1722,5 @@ void var_subst(void *go, struct script_data *sc, trig_data *trig,
left -= len;
} /* else if *p .. */
} /* while *p .. */
buf[sizeof(buf) - 1] = '\0';
*buf = '\0';
}