]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove what we believe to be unnecessary alloc_strlen annotations (#4949)
authorJames Jones <jejones3141@gmail.com>
Thu, 30 Mar 2023 15:52:16 +0000 (10:52 -0500)
committerGitHub <noreply@github.com>
Thu, 30 Mar 2023 15:52:16 +0000 (09:52 -0600)
1. Either coverity has changed or pen_buffer_as_file() has,
   because an essentially identical use of it isn't annotated
   and doesn't register a defect, so the annotaion can go.
2. The curl_escape() call now just passes 0 and lets the
   function itself call strlen(), so that annotation should
   be unneccessary.

src/lib/util/pair_legacy_tests.c
src/modules/rlm_rest/rest.c

index 0e33f8639b2a827cec682fee19734d01a5a38c76..e4c1626f10348e99a3a9db9310df3528a19e4134 100644 (file)
@@ -166,7 +166,6 @@ static void test_fr_pair_list_move_op(void)
        fr_pair_list_t old_list, new_list;
        bool           pfiledone;
        char const     *fake_file = "Test-Uint32-0 = 123\nTest-String-0 = \"Testing123\"\n";
-       /* coverity[alloc_strlen] */
        FILE           *fp = open_buffer_as_file((uint8_t const *)fake_file, strlen(fake_file));
 
        fr_pair_list_init(&old_list);
index 0245aed69762db6c434a27161901e208fd0aeca4..9bf2faea9f3782d1a91f66786151e08f720e66ef 100644 (file)
@@ -2168,7 +2168,6 @@ size_t rest_uri_escape(UNUSED request_t *request, char *out, size_t outlen, char
 {
        char *escaped;
 
-       /* coverity[alloc_strlen] */
        escaped = curl_escape(raw, 0);
        strlcpy(out, escaped, outlen);
        curl_free(escaped);