wmtime: Fixed Debian bug #639626. Applied a patch by Andrew Deason.
commit2295cacec4c6ffbe7d31868d0d016abfb6899011
authorDoug Torrance <profzoom@hotmail.com>
Tue, 30 Oct 2012 20:49:42 +0000 (30 13:49 -0700)
committerCarlos R. Mafra <crmafra@gmail.com>
Tue, 30 Oct 2012 21:50:49 +0000 (30 21:50 +0000)
treeb479d44f5b3ce996cf540d04b83a7f5aa6ed3d40
parent168a691c807e0096a843e418b21331f8a9bda771
wmtime: Fixed Debian bug #639626. Applied a patch by Andrew Deason.

Package: wmtime
Version: 1.0b2-10
Tags: patch

wmtime draws a small amount of garbage to the screen when -noseconds is
given, because DrawTime reads beyond the given string buffer. This
doesn't trigger all the time for me (I assume due to the nondeterminism
of reading uninitialized memory or something), but it pretty clearly
happens if I switch VTs.

The attached patch limits the amount of the formatted string we try to
read, so we don't read beyond the end of the string. Fixes it for me.

--
Andrew Deason
adeason@dson.org
wmtime/wmtime/wmtime.c