ossp-pkg/uuid/php/uuid.c 1.9 -> 1.10
--- uuid.c 2007/01/01 18:14:58 1.9
+++ uuid.c 2007/01/01 18:39:52 1.10
@@ -458,6 +458,10 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, "uuid_export: %s", uuid_error(rc));
RETURN_LONG((long)rc);
}
+ if (fmt == UUID_FMT_SIV)
+ data_len = strlen((char *)data_ptr);
+ else if (fmt == UUID_FMT_STR || fmt == UUID_FMT_TXT)
+ data_len--; /* PHP doesn't wish NUL-termination on strings */
ZVAL_STRINGL(z_data, data_ptr, data_len, 1);
free(data_ptr);
|
|