]> granicus.if.org Git - php/commitdiff
Fixed pg_escape_typea()
authorYasuo Ohgaki <yohgaki@php.net>
Wed, 2 Oct 2002 06:30:40 +0000 (06:30 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Wed, 2 Oct 2002 06:30:40 +0000 (06:30 +0000)
ext/pgsql/pgsql.c

index 37137d258cef2a4e29f59217bd3f7ee4938d7902..0d591fff987c9252edf09801468671626b820698 100644 (file)
@@ -2732,11 +2732,11 @@ PHP_FUNCTION(pg_unescape_bytea)
                return;
        }
 
-       to = (char *)php_pgsql_unescape_bytea((unsigned char*)from, from_len);
+       to = (char *)php_pgsql_unescape_bytea((unsigned char*)from, &to_len);
        if (!to) {
                RETURN_FALSE;
        }
-       RETVAL_STRINGL(to, to_len-1, 1); /* to_len includes addtional '\0' */
+       RETVAL_STRINGL(to, to_len, 1);
        free(to);
 }
 /* }}} */