From: Corne' Cornelius Date: Mon, 24 Feb 2003 06:34:37 +0000 (+0000) Subject: (PHP ifx_errormsg) Fixed Informix bug where ifx_errormsg() would Segfault X-Git-Tag: RELEASE_0_5~796 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7afe50fc5cf178babedbc0b823e18daf752f81eb;p=php (PHP ifx_errormsg) Fixed Informix bug where ifx_errormsg() would Segfault on an unopened connecection and with an errorcode supplied --- diff --git a/ext/informix/ifx.ec b/ext/informix/ifx.ec index 1de8632de2..c7182a82c4 100644 --- a/ext/informix/ifx.ec +++ b/ext/informix/ifx.ec @@ -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);