mirror of
https://github.com/php/php-src.git
synced 2026-10-29 02:07:35 +08:00
* ext/odbc: get exact length for quoted connection strings strlen has to scan the string until the end of the null terminator, we might as well do the same but scan for end quotes that need escaping. * ext/odbc: rename function now that it gets the exact length rather than an estimate
21 lines
1.1 KiB
C
21 lines
1.1 KiB
C
/*
|
|
+----------------------------------------------------------------------+
|
|
| Copyright © The PHP Group and Contributors. |
|
|
+----------------------------------------------------------------------+
|
|
| This source file is subject to the Modified BSD License that is |
|
|
| bundled with this package in the file LICENSE, and is available |
|
|
| through the World Wide Web at <https://www.php.net/license/>. |
|
|
| |
|
|
| SPDX-License-Identifier: BSD-3-Clause |
|
|
+----------------------------------------------------------------------+
|
|
| Authors: Calvin Buckley <calvin@cmpct.info> |
|
|
+----------------------------------------------------------------------+
|
|
*/
|
|
|
|
#include "php.h"
|
|
|
|
PHPAPI bool php_odbc_connstr_is_quoted(const char *str);
|
|
PHPAPI bool php_odbc_connstr_should_quote(const char *str);
|
|
PHPAPI size_t php_odbc_connstr_get_quoted_length(const char *in_str);
|
|
PHPAPI size_t php_odbc_connstr_quote(char *out_str, const char *in_str, size_t out_str_size);
|