From f9e9e5f9013cc2e9d238cbcad9a1dfaf3a529aac Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 10 Mar 2024 11:39:34 -0400 Subject: tests/xtime: Add tests for integer overflow --- src/xtime.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/xtime.c b/src/xtime.c index 8100f6c..05f0e1a 100644 --- a/src/xtime.c +++ b/src/xtime.c @@ -2,8 +2,9 @@ // SPDX-License-Identifier: 0BSD #include "xtime.h" -#include "atomic.h" +#include "bfstd.h" #include "config.h" +#include "diag.h" #include #include #include @@ -19,6 +20,7 @@ int xmktime(struct tm *tm, time_t *timep) { struct tm tmp; if (!localtime_r(timep, &tmp)) { + bfs_bug("localtime_r(-1): %s", xstrerror(errno)); return -1; } -- cgit v1.2.3