Fix potential index-out-of-bounds and malformed strings
Size of the buffer was smaller then max size used in strftime
and alike function calls.
Moreover, according to man strftime contents of the buffer
is undefined in case in which actual string is longer than the
specified max size, therefore buffer is zeroed and last byte
left unused.
Signed-off-by: NRobert Drab <robert.drab@huawei.com>
Showing
想要评论请 注册 或 登录