pointer, do the appropriate error checking.
ticket: 2953
target_version: 1.4.1
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17118
dc483132-0cff-0310-8789-
dd5450dbe970
+2005-03-04 Ken Raeburn <raeburn@mit.edu>
+
+ * asn1_encode.c (asn1_encode_generaltime): If gmtime_r returns int
+ instead of pointer, do the appropriate error checking.
+
2004-12-28 Ezra Peisach <epeisach@mit.edu>
* asn1_decode.c (asn1_decode_generaltime): Fix memory leak when
* and some bogus implementations might overrun on the sprintf.
*/
#ifdef HAVE_GMTIME_R
+# ifdef GMTIME_R_RETURNS_INT
+ if (gmtime_r(&gmt_time, >imebuf) != 0)
+ return ASN1_BAD_GMTIME;
+# else
if (gmtime_r(&gmt_time, >imebuf) == NULL)
return ASN1_BAD_GMTIME;
+# endif
#else
gtime = gmtime(&gmt_time);
if (gtime == NULL)