#include "util_cstring.h"
+#ifdef UNIT_TEST
+#include "catch/snort_catch.h"
+#endif
+
using namespace snort;
/****************************************************************************
t = time(nullptr);
struct tm gmt;
- gmtime_r(&t, &gmt);
+ struct tm* lt = gmtime_r(&t, &gmt);
+ if (lt == nullptr)
+ return 0;
struct tm loc;
localtime_r(&t, &loc);
}
-
+#ifdef UNIT_TEST
+TEST_CASE("gmt2local_time_out_of_range", "[util]")
+{
+ REQUIRE((gmt2local(0xffffffff1fff2f)==0));
+}
+#endif