Commit 8fe3d7c9 authored by Jeff Smith's avatar Jeff Smith Committed by Alexandre Julliard

msvcrt: Call invalid parameter handler for out-of-range integer.

parent eea87600
......@@ -996,9 +996,8 @@ static inline BOOL strftime_int(STRFTIME_CHAR *str, MSVCRT_size_t *pos, MSVCRT_s
#endif
MSVCRT_size_t len;
if(src<l || src>h) {
if(!MSVCRT_CHECK_PMT(src>=l && src<=h)) {
*str = 0;
*MSVCRT__errno() = MSVCRT_EINVAL;
return FALSE;
}
......
......@@ -937,10 +937,10 @@ static void test_strftime(void)
{"%C", "19", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
{"%C", "99", { 0, 0, 0, 1, 0, 8099, 4, 0, 0 }},
{"%C", "", { 0, 0, 0, 1, 0, 8100, 4, 0, 0 }},
{"%d", "", { 0, 0, 0, 0, 0, 70, 4, 0, 0 }, FALSE, TRUE},
{"%d", "", { 0, 0, 0, 0, 0, 70, 4, 0, 0 }},
{"%d", "01", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
{"%d", "31", { 0, 0, 0, 31, 0, 70, 4, 0, 0 }},
{"%d", "", { 0, 0, 0, 32, 0, 70, 4, 0, 0 }, FALSE, TRUE},
{"%d", "", { 0, 0, 0, 32, 0, 70, 4, 0, 0 }},
{"%D", "", { 0, 0, 0, 1, 0, -1901, 4, 0, 0 }},
{"%D", "01/01/00", { 0, 0, 0, 1, 0, -1900, 4, 0, 0 }},
{"%D", "01/01/99", { 0, 0, 0, 1, 0, -1, 4, 0, 0 }},
......@@ -948,10 +948,10 @@ static void test_strftime(void)
{"%D", "01/01/99", { 0, 0, 0, 1, 0, 8099, 4, 0, 0 }},
{"%D", "", { 0, 0, 0, 1, 0, 8100, 4, 0, 0 }},
{"%#D", "1/1/70", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
{"%e", "", { 0, 0, 0, 0, 0, 70, 4, 0, 0 }, FALSE, TRUE},
{"%e", "", { 0, 0, 0, 0, 0, 70, 4, 0, 0 }},
{"%e", " 1", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
{"%e", "31", { 0, 0, 0, 31, 0, 70, 4, 0, 0 }},
{"%e", "", { 0, 0, 0, 32, 0, 70, 4, 0, 0 }, FALSE, TRUE},
{"%e", "", { 0, 0, 0, 32, 0, 70, 4, 0, 0 }},
{"%#e", "1", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
{"%F", "1970-01-01", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
{"%#F", "1970-1-1", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment