mirror of
https://github.com/curl/curl.git
synced 2026-01-18 17:21:26 +01:00
checksrc: ban strcpy
No longer used in the codebase. Replacement is `curlx_strcopy()`, possibly `memcpy()` or dynbuf. Also: - OS400: allow three calls. Closes #20088
This commit is contained in:
@@ -711,6 +711,7 @@ char *Curl_ldap_get_dn_a(void *ld, LDAPMessage *entry)
|
||||
ldap_memfree() and ldap_memalloc() does not exist. The solution is to
|
||||
overwrite the EBCDIC buffer with ASCII to return it. */
|
||||
|
||||
/* !checksrc! disable BANNEDFUNC 1 */
|
||||
strcpy(cp, cp2);
|
||||
free(cp2);
|
||||
return cp;
|
||||
@@ -741,6 +742,7 @@ char *Curl_ldap_first_attribute_a(void *ld, LDAPMessage *entry,
|
||||
ldap_memfree() and ldap_memalloc() does not exist. The solution is to
|
||||
overwrite the EBCDIC buffer with ASCII to return it. */
|
||||
|
||||
/* !checksrc! disable BANNEDFUNC 1 */
|
||||
strcpy(cp, cp2);
|
||||
free(cp2);
|
||||
return cp;
|
||||
@@ -771,6 +773,7 @@ char *Curl_ldap_next_attribute_a(void *ld, LDAPMessage *entry,
|
||||
ldap_memfree() and ldap_memalloc() does not exist. The solution is to
|
||||
overwrite the EBCDIC buffer with ASCII to return it. */
|
||||
|
||||
/* !checksrc! disable BANNEDFUNC 1 */
|
||||
strcpy(cp, cp2);
|
||||
free(cp2);
|
||||
return cp;
|
||||
|
||||
@@ -110,6 +110,7 @@ my %banfunc = (
|
||||
"sscanf" => 1,
|
||||
"stat" => 1,
|
||||
"strcat" => 1,
|
||||
"strcpy" => 1,
|
||||
"strdup" => 1,
|
||||
"strerror" => 1,
|
||||
"strncat" => 1,
|
||||
|
||||
Reference in New Issue
Block a user