]> Sergey Matveev's repositories - nnn.git/commit
Fix strftime() buffer overflow (#362)
authorSijmen J. Mulder <ik@sjmulder.nl>
Wed, 16 Oct 2019 01:31:19 +0000 (03:31 +0200)
committerMischievous Meerkat <engineerarun@gmail.com>
Wed, 16 Oct 2019 01:31:19 +0000 (07:01 +0530)
commit98042ad7d07dfa4f7d03d3f7b43bbd72cf3a05c6
tree747a2db1267d442b0c96e9e8530c7f06b074d48a
parent43c636d95c6ac835c1a92bcabe4297268fd41aa9
Fix strftime() buffer overflow (#362)

If the formatted string is longer than 17 characters the string won't
be null terminated, causing gibberish to be printed on the status line
and possibly worse.

This occurs with my current locale in which a date is printed as such:

  2019-okt.-15 19:26

Which is 18 characters.
src/nnn.c