diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2023-01-28 11:42:56 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2023-01-28 11:51:07 +0100 |
commit | d5142e3b82bf482bf75f1d3fd27fb4d31fd51e66 (patch) | |
tree | 966191616d399505ea2d329dcb903f47ed7c6b10 | |
parent | aa322e21c8a2077036d72a07d993f37a39986572 (diff) | |
download | tcpdump-d5142e3b82bf482bf75f1d3fd27fb4d31fd51e66.tar.gz |
smbutil.c: Fix the strftime buffer size
tm_year is an int, thus 'yyyy' for '%Y' is not enough.
This avoids a stack buffer overflow in some cases.
(cherry picked from commit 5caf4211264afa7d98820c6cbb6a03c27a388fec)
-rw-r--r-- | smbutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -770,7 +770,7 @@ smb_fdata1(netdissect_options *ndo, time_t t; struct tm *lt; const char *tstring; - char buffer[sizeof("Www Mmm dd hh:mm:ss yyyy\n")]; + char buffer[sizeof("Www Mmm dd hh:mm:ss yyyyy\n")]; uint32_t x; switch (atoi(fmt + 1)) { |