imatix/zguide — Issue #152: malloc of string withouth space for '\0'
Author: ZeeD
Created: 2012-01-08 09:26:57+00:00
State: open

Hi.
I'm reading zguide / examples / C / zhelpers.h and in function `s_console` (row 179) I see a `malloc(20);` but the `strftime` should use all of them for the resulting string (10 for y-m-d, 8 for h:m:s, 2 for spaces), so the `malloc`'d buffer has no space for the trailing `'\0'`.