]> granicus.if.org Git - php/commitdiff
(PHP ifx_errormsg) Fixed Informix bug where ifx_errormsg() would Segfault
authorCorne' Cornelius <nobbie@php.net>
Mon, 24 Feb 2003 06:34:37 +0000 (06:34 +0000)
committerCorne' Cornelius <nobbie@php.net>
Mon, 24 Feb 2003 06:34:37 +0000 (06:34 +0000)
                   on an unopened connecection and with an errorcode supplied

ext/informix/ifx.ec

index 1de8632de254a6190fe8d44e6e2d9b856aec9076..c7182a82c4d7355dee9cc90b129f4395a6d931bf 100644 (file)
@@ -1650,6 +1650,7 @@ PHP_FUNCTION(ifx_errormsg)
        }
 
        maxmsglen = 255;
+       msglen = maxmsglen;     // Some bug fix, rgetlmsg doesnt always set the value
        ifx_errmsg = (char *)malloc(maxmsglen + 1);
        if (ifx_errorcode != 0) {
                rgetlmsg(ifx_errorcode, ifx_errmsg, maxmsglen, &msglen);