]> granicus.if.org Git - mutt/commit
Fix right justify buffer-truncated pad calculation in mutt_FormatString()
authorKevin McCarthy <kevin@8t8.us>
Thu, 14 Apr 2016 19:35:53 +0000 (12:35 -0700)
committerKevin McCarthy <kevin@8t8.us>
Thu, 14 Apr 2016 19:35:53 +0000 (12:35 -0700)
commitb55540e6bd06f37c7be90d7fdb9c6f9068c0c209
treef807520011f3fa808966219da2e82f7ce13a463c
parent88a81b9491f9cb838fa5ae8a5bfd54f3e2670fb7
Fix right justify buffer-truncated pad calculation in mutt_FormatString()

Vincent Lefèvre noted that the computation had implementation defined
behavior and was potentially incorrect.

Change to make sure the subtraction won't lead to a wrap-around, and
set pad to 0 in that case.
muttlib.c