Bugzilla – Attachment 3291 Details for
Bug 2977
misc.c convtime() LONG_MAX is no longer allowed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
unittest for LONG_MAX convtime conversions
bz2977.diff (text/plain), 478 bytes, created by
Damien Miller
on 2019-06-07 14:51:07 AEST
(
hide
)
Description:
unittest for LONG_MAX convtime conversions
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2019-06-07 14:51:07 AEST
Size:
478 bytes
patch
obsolete
>diff --git a/unittests/conversion/tests.c b/unittests/conversion/tests.c >index 6dd77ef4..06755fdc 100644 >--- a/unittests/conversion/tests.c >+++ b/unittests/conversion/tests.c >@@ -40,6 +40,8 @@ tests(void) > ASSERT_LONG_EQ(convtime("-9d"), -1); > > /* overflow */ >+ snprintf(buf, sizeof buf, "%llu", (unsigned long long)LONG_MAX); >+ ASSERT_LONG_EQ(convtime(buf), -1); > snprintf(buf, sizeof buf, "%llu", (unsigned long long)LONG_MAX + 1); > ASSERT_LONG_EQ(convtime(buf), -1); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2977
: 3291