]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Annotate strcpy() in make_vlog; log_keyword is always short (CID #1503899) (#4615)
authorJames Jones <jejones3141@gmail.com>
Fri, 15 Jul 2022 14:08:49 +0000 (09:08 -0500)
committerGitHub <noreply@github.com>
Fri, 15 Jul 2022 14:08:49 +0000 (10:08 -0400)
All calls to make_vlog are done via macros that pass one of
"error", "warning", or "info" as log_keyword, all much shorter
than the 256-byte buffer that accumulates the log entry.

scripts/build/log.c

index 0325b98bb215e7669feaf41754058e6cd64eebdf..5afafad3c5da3dc8769852d4f2eb2eae3758f18a 100644 (file)
@@ -38,6 +38,7 @@ void _make_vlog(char const *log_keyword, char const *file, int line, char const
        char    buffer[256];
        char    *p = buffer, *end = (p + (sizeof(buffer) - 1));
 
+       /* coverity[fixed_size_dest] */
        strcpy(p, log_keyword);
        p += strlen(p);
        *p++ = ' ';