]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #23738 (ifx_copy_blob() crash). (Jani)
authorfoobar <sniper@php.net>
Wed, 21 May 2003 22:36:46 +0000 (22:36 +0000)
committerfoobar <sniper@php.net>
Wed, 21 May 2003 22:36:46 +0000 (22:36 +0000)
ext/informix/ifx.ec

index e2e1e7d1805e1911422c42a622b7667e2c3eeb28..752e25bd6eb151ff5a3d2d64d5914724e49e2d61 100644 (file)
@@ -3242,7 +3242,7 @@ static long php_intifx_copy_blob(long bid, HashTable *list TSRMLS_DC)
        if (Ifx_blob->BLOB.mode == BLMODE_INMEM) {
                char *content;
                if (locator_orig->loc_bufsize >= 0 && locator_orig->loc_buffer != NULL) {
-                       if ((content = emalloc(locator_orig->loc_size)) == NULL) {
+                       if ((content = emalloc(locator_orig->loc_bufsize)) == NULL) {
                                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't create blob-resource");
                                return -1;
                        }