php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #53007
Patch create-odbc-null-crash.patch revision 2010-10-07 07:22 UTC by crewone at gmail dot com

Patch create-odbc-null-crash.patch for ODBC related Bug #53007

Patch version 2010-10-07 07:22 UTC

Return to Bug #53007 | Download this patch
Patch Revisions:

Developer: crewone@gmail.com

--- php_odbc.c  2010-10-07 09:17:40.140555101 +0200
+++ php_odbc_new.c      2010-10-07 09:20:14.560449989 +0200
@@ -2104,7 +2104,8 @@
                        break;
 
                default:
-                       if (result->values[field_ind].vallen == SQL_NULL_DATA) {
+                       // Cast both sides to account for byte-size differences.
+                       if ((int)result->values[field_ind].vallen == (int)SQL_NULL_DATA) {
                                RETURN_NULL();
                        } else {
                                RETURN_STRINGL(result->values[field_ind].value, result->values[field_ind].vallen, 1);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 10:01:29 2024 UTC