- 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)
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: