Files
lotherk 4f7255548d time: an unrepresentable time is "?", not an uninitialised struct tm
Four places formatted a time with strftime(localtime_r(&tt, &tm)) and
threw the NULL away. When localtime_r cannot represent the value - a
cooldown file can hold anything - tm is untouched and strftime formats
whatever the stack held: the operator read a limit that lifts at
"219250468--1414812756--1414812757", and a NULL deref in the die-hard case.

agent.c, engine.c, session.c and plugins/cli now check the return and fall
back to "?", the answer the foreign plugin already gives for a time it does
not know.

Found by review; the strftime call site is the same shape in all four.
2026-11-23 10:23:29 +00:00
..