OBS-URL: https://build.opensuse.org/request/show/48644 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/w3c-libwww?expand=0&rev=19
58 lines
2.1 KiB
Diff
58 lines
2.1 KiB
Diff
Index: libwww-dev/Library/src/HTWWWStr.c
|
|
===================================================================
|
|
--- libwww-dev.orig/Library/src/HTWWWStr.c
|
|
+++ libwww-dev/Library/src/HTWWWStr.c
|
|
@@ -426,10 +426,10 @@ PUBLIC time_t HTParseTime (const char *
|
|
}
|
|
tm.tm_mday = strtol(s, &s, 10);
|
|
tm.tm_mon = make_month(s, &s);
|
|
- tm.tm_year = strtol(++s, &s, 10);
|
|
+ ++s; tm.tm_year = strtol(s, &s, 10);
|
|
tm.tm_hour = strtol(s, &s, 10);
|
|
- tm.tm_min = strtol(++s, &s, 10);
|
|
- tm.tm_sec = strtol(++s, &s, 10);
|
|
+ ++s; tm.tm_min = strtol(s, &s, 10);
|
|
+ ++s; tm.tm_sec = strtol(s, &s, 10);
|
|
|
|
} else { /* Second format */
|
|
HTTRACE(CORE_TRACE, "Format...... Wkd, 00 Mon 0000 00:00:00 GMT\n");
|
|
@@ -441,8 +441,8 @@ PUBLIC time_t HTParseTime (const char *
|
|
tm.tm_mon = make_month(s, &s);
|
|
tm.tm_year = strtol(s, &s, 10) - 1900;
|
|
tm.tm_hour = strtol(s, &s, 10);
|
|
- tm.tm_min = strtol(++s, &s, 10);
|
|
- tm.tm_sec = strtol(++s, &s, 10);
|
|
+ ++s; tm.tm_min = strtol(s, &s, 10);
|
|
+ ++s; tm.tm_sec = strtol(s, &s, 10);
|
|
}
|
|
} else if (isdigit((int) *str)) {
|
|
|
|
@@ -455,11 +455,11 @@ PUBLIC time_t HTParseTime (const char *
|
|
return 0;
|
|
}
|
|
tm.tm_year = strtol(s, &s, 10) - 1900;
|
|
- tm.tm_mon = strtol(++s, &s, 10);
|
|
- tm.tm_mday = strtol(++s, &s, 10);
|
|
- tm.tm_hour = strtol(++s, &s, 10);
|
|
- tm.tm_min = strtol(++s, &s, 10);
|
|
- tm.tm_sec = strtol(++s, &s, 10);
|
|
+ ++s; tm.tm_mon = strtol(s, &s, 10);
|
|
+ ++s; tm.tm_mday = strtol(s, &s, 10);
|
|
+ ++s; tm.tm_hour = strtol(s, &s, 10);
|
|
+ ++s; tm.tm_min = strtol(s, &s, 10);
|
|
+ ++s; tm.tm_sec = strtol(s, &s, 10);
|
|
|
|
} else { /* delta seconds */
|
|
t = expand ? time(NULL) + atol(str) : atol(str);
|
|
@@ -499,8 +499,8 @@ PUBLIC time_t HTParseTime (const char *
|
|
tm.tm_mon = make_month(s, &s);
|
|
tm.tm_mday = strtol(s, &s, 10);
|
|
tm.tm_hour = strtol(s, &s, 10);
|
|
- tm.tm_min = strtol(++s, &s, 10);
|
|
- tm.tm_sec = strtol(++s, &s, 10);
|
|
+ ++s; tm.tm_min = strtol(s, &s, 10);
|
|
+ ++s; tm.tm_sec = strtol(s, &s, 10);
|
|
tm.tm_year = strtol(s, &s, 10) - 1900;
|
|
}
|
|
if (tm.tm_sec < 0 || tm.tm_sec > 59 ||
|