php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9380 HAVE_TZNAME not being checked
Submitted: 2001-02-21 14:22 UTC Modified: 2001-02-24 16:20 UTC
From: amra at us dot ibm dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.4pl1 OS: OS400
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: amra at us dot ibm dot com
New email:
PHP Version: OS:

 

 [2001-02-21 14:22 UTC] amra at us dot ibm dot com
OS/400 does not have tzname.  Code in ext/standard/datetime.c does not check to see if HAVE_TZNAME is defined before accessing the field.  Here is the code:

#if HAVE_TM_ZONE
                                size += strlen(ta->tm_zone);
#else
                                size += strlen(tzname[0]);
#endif

and

#if HAVE_TM_ZONE
                                strcat(return_value->value.str.val, ta->tm_zone);
#else
                                strcat(return_value->value.str.val, tzname[0]);
#endif

It may be that for OS/400 we may need to do something different, but in the meantime HAVE_TZNAME needs to be checked prior to accessing tzname.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-24 16:20 UTC] sas@php.net
Thanks, fixed in CVS. 
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu May 08 07:01:27 2025 UTC