cvs: php4 /ext/odbc php_odbc.c

From: Date: Wed, 02 May 2001 23:20:05 +0000
Subject: cvs: php4 /ext/odbc php_odbc.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5480@lists.php.net to get a copy of this message
andi Wed May 2 16:20:05 2001 EDT Modified files: /php4/ext/odbc php_odbc.c Log: - More strncpy() -> strlcpy() changes. Am I getting bored yet? :) Index: php4/ext/odbc/php_odbc.c diff -u php4/ext/odbc/php_odbc.c:1.82 php4/ext/odbc/php_odbc.c:1.83 --- php4/ext/odbc/php_odbc.c:1.82 Thu Apr 19 14:42:45 2001 +++ php4/ext/odbc/php_odbc.c Wed May 2 16:20:04 2001 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.c,v 1.82 2001/04/19 21:42:45 andi Exp $ */ +/* $Id: php_odbc.c,v 1.83 2001/05/02 23:20:04 andi Exp $ */ #include "php.h" #include "php_globals.h" @@ -2498,17 +2498,17 @@ 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);

« previous php.cvs (#5480) next »