From 7afe50fc5cf178babedbc0b823e18daf752f81eb Mon Sep 17 00:00:00 2001 From: Corne' Cornelius Date: Mon, 24 Feb 2003 06:34:37 +0000 Subject: [PATCH] (PHP ifx_errormsg) Fixed Informix bug where ifx_errormsg() would Segfault on an unopened connecection and with an errorcode supplied --- ext/informix/ifx.ec | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/informix/ifx.ec b/ext/informix/ifx.ec index 1de8632de25..c7182a82c4d 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);