Skip to content

Commit c9cc472

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: ext/pdo_odbc: Require non-empty string when building string buffer (#21652)
2 parents d341eb7 + 9b6f83e commit c9cc472

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/pdo_odbc/odbc_stmt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ static int odbc_stmt_get_col(pdo_stmt_t *stmt, int colno, zval *result, enum pdo
728728
str = zend_string_realloc(str, used + to_fetch_byte, 0);
729729
memcpy(ZSTR_VAL(str) + used, buf2, to_fetch_byte);
730730
used = used + to_fetch_len;
731-
} else if (rc==SQL_SUCCESS) {
731+
} else if (rc == SQL_SUCCESS && C->fetched_len != 0) {
732732
str = zend_string_realloc(str, used + C->fetched_len, 0);
733733
memcpy(ZSTR_VAL(str) + used, buf2, C->fetched_len);
734734
used = used + C->fetched_len;

0 commit comments

Comments
 (0)