@@ -87,7 +87,6 @@ static int get_formatted_time_tz(pdo_stmt_t *stmt, const ISC_TIME_TZ* timeTz, zv
8787 struct tm t ;
8888 ISC_TIME time ;
8989 char timeBuf [80 ] = {0 };
90- char timeTzBuf [124 ] = {0 };
9190 if (fb_decode_time_tz (S -> H -> isc_status , timeTz , & hours , & minutes , & seconds , & fractions , sizeof (timeZoneBuffer ), timeZoneBuffer )) {
9291 return 1 ;
9392 }
@@ -100,8 +99,8 @@ static int get_formatted_time_tz(pdo_stmt_t *stmt, const ISC_TIME_TZ* timeTz, zv
10099 return 1 ;
101100 }
102101
103- size_t time_tz_len = sprintf ( timeTzBuf , "%s %s" , timeBuf , timeZoneBuffer );
104- ZVAL_STRINGL (result , timeTzBuf , time_tz_len );
102+ zend_string * time_tz_str = zend_strpprintf ( 0 , "%s %s" , timeBuf , timeZoneBuffer );
103+ ZVAL_NEW_STR (result , time_tz_str );
105104 return 0 ;
106105}
107106
@@ -115,7 +114,6 @@ static int get_formatted_timestamp_tz(pdo_stmt_t *stmt, const ISC_TIMESTAMP_TZ*
115114 struct tm t ;
116115 ISC_TIMESTAMP ts ;
117116 char timestampBuf [80 ] = {0 };
118- char timestampTzBuf [124 ] = {0 };
119117 if (fb_decode_timestamp_tz (S -> H -> isc_status , timestampTz , & year , & month , & day , & hours , & minutes , & seconds , & fractions , sizeof (timeZoneBuffer ), timeZoneBuffer )) {
120118 return 1 ;
121119 }
@@ -130,8 +128,8 @@ static int get_formatted_timestamp_tz(pdo_stmt_t *stmt, const ISC_TIMESTAMP_TZ*
130128 return 1 ;
131129 }
132130
133- size_t timestamp_tz_len = sprintf ( timestampTzBuf , "%s %s" , timestampBuf , timeZoneBuffer );
134- ZVAL_STRINGL (result , timestampTzBuf , timestamp_tz_len );
131+ zend_string * timestamp_tz_str = zend_strpprintf ( 0 , "%s %s" , timestampBuf , timeZoneBuffer );
132+ ZVAL_NEW_STR (result , timestamp_tz_str );
135133 return 0 ;
136134}
137135
0 commit comments