com php-src: Add warning to pg_unescape_bytea() when invalid parameter is passed: ext/pgsql/pgsql.c
| From: | Yasuo Ohgaki | Date: | Mon, 08 Jul 2013 09:51:37 +0000 |
| Subject: | com php-src: Add warning to pg_unescape_bytea() when invalid parameter is passed: ext/pgsql/pgsql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-72590@lists.php.net to get a copy of this message | ||
Commit: 2bc8271b29752e82eb0b9bb7f85e6f9dbaee9a78
Author: Yasuo Ohgaki <yohgaki@php.net> Mon, 8 Jul 2013 18:51:37 +0900
Parents: d1c261d7f890c037fdbd4f54cc3a43ff7473a2d2
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2bc8271b29752e82eb0b9bb7f85e6f9dbaee9a78
Log:
Add warning to pg_unescape_bytea() when invalid parameter is passed
Changed paths:
M ext/pgsql/pgsql.c
Diff:
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 0fa4031..1c78fff 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -4212,6 +4212,7 @@ PHP_FUNCTION(pg_unescape_bytea)
to = (char *)php_pgsql_unescape_bytea((unsigned char*)from, &to_len);
#endif
if (!to) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,"Failed to unescape");
RETURN_FALSE;
}
RETVAL_STRINGL(to, to_len, 0);