mirror of
https://github.com/php/php-src.git
synced 2026-04-28 18:53:33 +02:00
MFB: Fixed bug #46798 (Crash in mssql extension when retrieving a NULL value
inside a binary or image column type)
This commit is contained in:
@@ -4,8 +4,10 @@ PHP NEWS
|
||||
- Fixed security issue in imagerotate(), background colour isn't validated
|
||||
correctly with a non truecolour image. (Scott)
|
||||
|
||||
- Fixed bug #46798 (Crash in mssql extension when retrieving a NULL value
|
||||
inside a binary or image column type). (Ilia)
|
||||
- Fixed bug #46782 (fastcgi.c parse error). (Matt)
|
||||
- Fixed bug #46748 (Segfault when an SSL error has more than one error.) (Scott)
|
||||
- Fixed bug #46748 (Segfault when an SSL error has more than one error). (Scott)
|
||||
- Fixed bug #46739 (array returned by curl_getinfo should contain content_type key).
|
||||
(Mikko)
|
||||
|
||||
|
||||
@@ -876,11 +876,14 @@ static void php_mssql_get_column_content_with_type(mssql_link *mssql_ptr,int off
|
||||
unsigned char *res_buf;
|
||||
int res_length = dbdatlen(mssql_ptr->link, offset);
|
||||
|
||||
res_buf = (unsigned char *) emalloc(res_length+1);
|
||||
bin = ((DBBINARY *)dbdata(mssql_ptr->link, offset));
|
||||
memcpy(res_buf,bin,res_length);
|
||||
res_buf[res_length] = '\0';
|
||||
ZVAL_STRINGL(result, res_buf, res_length, 0);
|
||||
if (!res_length) {
|
||||
ZVAL_NULL(result);
|
||||
} else {
|
||||
bin = ((DBBINARY *)dbdata(mssql_ptr->link, offset));
|
||||
res_buf = (unsigned char *) emalloc(res_length+1);
|
||||
memcpy(res_buf,bin,res_length);
|
||||
res_buf[res_length] = '\0';
|
||||
ZVAL_STRINGL(result, res_buf, res_length, 0);
|
||||
}
|
||||
break;
|
||||
case SQLNUMERIC:
|
||||
|
||||
Reference in New Issue
Block a user