diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-30 13:59:40 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-30 13:59:40 +0300 |
| commit | dadd9f9cb076688f0377840dcc657484de773391 (patch) | |
| tree | 68d316cf22fba0ff284c87412f530b7a66b49023 /yhttpd/src | |
| parent | fed8e7b6d78c39b8a53af6f6c98188bc4d3c97c9 (diff) | |
Fix chat::get_user UB (fell off non-void function on a miss)
chat::get_user(string&, bool&) returned the user only when found and
fell off the end of the non-void function on a miss (undefined behavior;
compiler warns 'control reaches end of non-void function'). The 1-arg
overload inherits the same UB. All callers check b_found before using the
pointer, so add an explicit 'return NULL' on the not-found path to make
the return well-defined. (The 1-arg overload appears unused - left in
place, now safe via this fix.)
Verified: normal chat still works, no crash.
Diffstat (limited to 'yhttpd/src')
0 files changed, 0 insertions, 0 deletions
