diff options
author | Andi Gutmans <andi@php.net> | 2001-05-02 23:20:04 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2001-05-02 23:20:04 +0000 |
commit | eb4d840a40eb2ca2736a0d2026bd5d5f247b39f4 (patch) | |
tree | d1a76075a699f7390c5cc3ad9f4179a65ad2bb03 /ext/odbc | |
parent | 7c5a45d69ae43c5d3e54cfb2bfefbb7d6f751961 (diff) | |
download | php-git-eb4d840a40eb2ca2736a0d2026bd5d5f247b39f4.tar.gz |
- More strncpy() -> strlcpy() changes. Am I getting bored yet? :)
Diffstat (limited to 'ext/odbc')
-rw-r--r-- | ext/odbc/php_odbc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 15220393d4..94a6cb11f3 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -2498,17 +2498,17 @@ static void php_odbc_lasterror(INTERNAL_FUNCTION_PARAMETERS, int mode) if (argc == 1) { ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_handle, -1, "ODBC-Link", le_conn, le_pconn); if (mode == 0) { - strncpy(ptr, conn->laststate, len); + strlcpy(ptr, conn->laststate, len+1); } else { - strncpy(ptr, conn->lasterrormsg, len); + strlcpy(ptr, conn->lasterrormsg, len+1); } } else { ODBCLS_FETCH(); if (mode == 0) { - strncpy(ptr, ODBCG(laststate), len); + strlcpy(ptr, ODBCG(laststate), len+1); } else { - strncpy(ptr, ODBCG(lasterrormsg), len); + strlcpy(ptr, ODBCG(lasterrormsg), len+1); } } RETVAL_STRING(ptr, 0); |