strfmon: Avoid an out-of-bounds access
(cherry picked from commit 9e03b903e377c75a60cbbb89ed78955769a1c804)