summaryrefslogtreecommitdiff
path: root/ext/odbc
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2001-05-02 23:20:04 +0000
committerAndi Gutmans <andi@php.net>2001-05-02 23:20:04 +0000
commiteb4d840a40eb2ca2736a0d2026bd5d5f247b39f4 (patch)
treed1a76075a699f7390c5cc3ad9f4179a65ad2bb03 /ext/odbc
parent7c5a45d69ae43c5d3e54cfb2bfefbb7d6f751961 (diff)
downloadphp-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.c8
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);