]> granicus.if.org Git - php/commitdiff
- MFH: Fixed ifx_errormsg() Segfault
authorCorne' Cornelius <nobbie@php.net>
Mon, 24 Feb 2003 07:45:59 +0000 (07:45 +0000)
committerCorne' Cornelius <nobbie@php.net>
Mon, 24 Feb 2003 07:45:59 +0000 (07:45 +0000)
ext/informix/ifx.ec

index 661bcf82123fccce3ee936046999bfacfbd7cbec..9bcc653e5b5c05d3f982045733c84dc112745e79 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);