openbsd-ports/net/xmlrpc-c/patches/patch-src_xmlrpc_datetime_c
benoit 17b2238c53 - update xmlrpc-c to 1.06.35
- regen patch

ok ajacoutot@
2009-05-31 15:54:18 +00:00

25 lines
732 B
Plaintext

$OpenBSD: patch-src_xmlrpc_datetime_c,v 1.2 2009/05/31 15:54:20 benoit Exp $
--- src/xmlrpc_datetime.c.orig Wed Apr 22 00:42:03 2009
+++ src/xmlrpc_datetime.c Tue May 26 01:12:35 2009
@@ -251,7 +251,11 @@ static void
restoreTimezone(const char * const oldTz) {
if (haveSetenv) {
- setenv("TZ", oldTz, 1);
+ if (oldTz) {
+ setenv("TZ", oldTz, 1);
+ } else {
+ unsetenv("TZ");
+ }
free((char*)oldTz);
}
}
@@ -397,6 +401,7 @@ parseDatetime(xmlrpc_env * const envP,
else {
struct tm brokenTime;
+ memset(&brokenTime, 0, sizeof(struct tm));
brokenTime.tm_sec = s;
brokenTime.tm_min = m;
brokenTime.tm_hour = h;