OSSP CVS Repository

ossp - Ticket #147
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Attach]  [Edit]  [History

Ticket 147: uuid_export() in PHP module returns null byte at end of string

uuid_export() in the PHP module leaves a null byte at the end of the string placed into $data. The offending line is:

ZVAL_STRINGL(z_data, data_ptr, data_len, 1);

I replaced it with the following and everything now seems to work as expected.

ZVAL_STRING(z_data, data_ptr, 1);

I believe that the ZVAL_STRINGL approach would work if 1 is subtracted from the string length, but I haven't tested this.

[Add remarks]

Remarks:

Properties:

Type: code           Version: 1.5.1 
Status: closed          Created: 2006-Nov-28 23:40
Severity:          Last Change: 2007-Jan-01 19:40
Priority:          Subsystem: uuid 
Assigned To: rse           Derived From:  
Creator: anonymous 

Related Check-ins:

2007-Jan-01 19:39 Check-in [5680]: Fix "uuid_export" function in PHP bindings under UUID_FMT_SIV, UUID_FMT_STR and UUID_FMT_TXT where the NUL-termination character should be not passed back to PHP. (By rse)

CVSTrac 2.0.1