From: Ralph Dolmans Date: Tue, 24 Apr 2018 10:10:11 +0000 (+0000) Subject: strcpy to memmove, to please analysers X-Git-Tag: release-1.7.1rc1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=127759b160e88893ee4ddd855914a4a86ea0b857;p=thirdparty%2Funbound.git strcpy to memmove, to please analysers git-svn-id: file:///svn/unbound/trunk@4656 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/validator/validator.c b/validator/validator.c index a06b676af..5777b2932 100644 --- a/validator/validator.c +++ b/validator/validator.c @@ -492,7 +492,7 @@ sentinel_get_keytag(char* start, uint16_t* keytag) { keytag_str = calloc(1, SENTINEL_KEYTAG_LEN + 1 /* null byte */); if(!keytag_str) return 0; - strncpy(keytag_str, start, SENTINEL_KEYTAG_LEN); + memmove(keytag_str, start, SENTINEL_KEYTAG_LEN); keytag_str[SENTINEL_KEYTAG_LEN] = '\0'; *keytag = (uint16_t)strtol(keytag_str, &e, 10); if(!e || *e != '\0') {