]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
strcpy to memmove, to please analysers
authorRalph Dolmans <ralph@nlnetlabs.nl>
Tue, 24 Apr 2018 10:10:11 +0000 (10:10 +0000)
committerRalph Dolmans <ralph@nlnetlabs.nl>
Tue, 24 Apr 2018 10:10:11 +0000 (10:10 +0000)
git-svn-id: file:///svn/unbound/trunk@4656 be551aaa-1e26-0410-a405-d3ace91eadb9

validator/validator.c

index a06b676afdba3aeae654f1f3007867dfd1032111..5777b2932cb466abd59cae10645a18712a1ab1bb 100644 (file)
@@ -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') {