Task #118746 - fixed.err
back to task #118746download
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/cookie.c: scope_hint: In function 'bad_domain'
curl-8.18.0/lib/cookie.c:334:17: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 334 | char *dot = memchr(domain, '.', len);
# | ^~~~~~
# 332| else {
# 333| /* there must be a dot present, but that dot must not be a trailing dot */
# 334|-> char *dot = memchr(domain, '.', len);
# 335| if(dot) {
# 336| size_t i = dot - domain;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/cookie.c:334:17: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 332| else {
# 333| /* there must be a dot present, but that dot must not be a trailing dot */
# 334|-> char *dot = memchr(domain, '.', len);
# 335| if(dot) {
# 336| size_t i = dot - domain;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/doh.c: scope_hint: In function 'doh_req_encode'
curl-8.18.0/lib/doh.c:132:17: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 132 | char *dot = strchr(hostp, '.');
# | ^~~~~~
# 130| while(*hostp) {
# 131| size_t labellen;
# 132|-> char *dot = strchr(hostp, '.');
# 133| if(dot)
# 134| labellen = dot - hostp;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/doh.c:132:17: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 130| while(*hostp) {
# 131| size_t labellen;
# 132|-> char *dot = strchr(hostp, '.');
# 133| if(dot)
# 134| labellen = dot - hostp;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/http.c: scope_hint: In function 'verify_header'
curl-8.18.0/lib/http.c:3753:15: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 3753 | char *ptr = memchr(hd, 0x00, hdlen);
# | ^~~~~~
# 3751| {
# 3752| struct SingleRequest *k = &data->req;
# 3753|-> char *ptr = memchr(hd, 0x00, hdlen);
# 3754| if(ptr) {
# 3755| /* this is bad, bail out */
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/http.c:3753:15: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 3751| {
# 3752| struct SingleRequest *k = &data->req;
# 3753|-> char *ptr = memchr(hd, 0x00, hdlen);
# 3754| if(ptr) {
# 3755| /* this is bad, bail out */
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/http.c:3766:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 3766 | ptr = memchr(hd, ':', hdlen);
# | ^
# 3764| ;
# 3765| else {
# 3766|-> ptr = memchr(hd, ':', hdlen);
# 3767| if(!ptr) {
# 3768| /* this is bad, bail out */
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/http.c:3766:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 3764| ;
# 3765| else {
# 3766|-> ptr = memchr(hd, ':', hdlen);
# 3767| if(!ptr) {
# 3768| /* this is bad, bail out */
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/http.c: scope_hint: In function 'http_parse_headers'
curl-8.18.0/lib/http.c:4367:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 4367 | end_ptr = memchr(buf, '\n', blen);
# | ^
# 4365| }
# 4366|
# 4367|-> end_ptr = memchr(buf, '\n', blen);
# 4368| if(!end_ptr) {
# 4369| /* Not a complete header line within buffer, append the data to
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/http.c:4367:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 4365| }
# 4366|
# 4367|-> end_ptr = memchr(buf, '\n', blen);
# 4368| if(!end_ptr) {
# 4369| /* Not a complete header line within buffer, append the data to
Error: GCC_ANALYZER_WARNING (CWE-476):
curl-8.18.0/lib/http2.c:400:7: warning[-Wanalyzer-null-dereference]: dereference of NULL 'data'
curl-8.18.0/lib/http2.c:2361:17: enter_function: entry to 'cf_h2_send'
curl-8.18.0/lib/http2.c:2366:34: branch_false: following 'false' branch (when 'data' is NULL)...
curl-8.18.0/lib/http2.c:2366:25: branch_false: ...to here
curl-8.18.0/lib/http2.c:2366:25: release_memory: 'data' is NULL
curl-8.18.0/lib/http2.c:2373:5: branch_true: following 'true' branch...
curl-8.18.0/lib/http2.c:2374:14: branch_true: ...to here
curl-8.18.0/lib/http2.c:2374:14: call_function: calling 'h2_submit' from 'cf_h2_send'
# 398| return CURLE_OUT_OF_MEMORY;
# 399|
# 400|-> if(!Curl_uint32_hash_set(&ctx->streams, data->mid, stream)) {
# 401| h2_stream_ctx_free(stream);
# 402| return CURLE_OUT_OF_MEMORY;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/http_digest.c: scope_hint: In function 'Curl_output_digest'
curl-8.18.0/lib/http_digest.c:142:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 142 | tmp = strchr((const char *)uripath, '?');
# | ^
# 140|
# 141| if(authp->iestyle) {
# 142|-> tmp = strchr((const char *)uripath, '?');
# 143| if(tmp) {
# 144| size_t urilen = tmp - (const char *)uripath;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/http_digest.c:142:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 140|
# 141| if(authp->iestyle) {
# 142|-> tmp = strchr((const char *)uripath, '?');
# 143| if(tmp) {
# 144| size_t urilen = tmp - (const char *)uripath;
Error: GCC_ANALYZER_WARNING (CWE-835):
curl-8.18.0/lib/mime.c:985:9: warning[-Wanalyzer-infinite-loop]: infinite loop
# 983| (void)size; /* Always 1 */
# 984|
# 985|-> while(nitems) {
# 986| size_t sz = 0;
# 987| curl_mimepart *part = mime->state.ptr;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/netrc.c: scope_hint: In function 'parsenetrc'
curl-8.18.0/lib/netrc.c:331:12: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 331 | nl = strchr(tok, '\n');
# | ^
# 329| char *nl = NULL;
# 330| if(tok)
# 331|-> nl = strchr(tok, '\n');
# 332| if(!nl)
# 333| break;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/netrc.c:331:12: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 329| char *nl = NULL;
# 330| if(tok)
# 331|-> nl = strchr(tok, '\n');
# 332| if(!nl)
# 333| break;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/noproxy.c: scope_hint: In function 'match_ip'
curl-8.18.0/lib/noproxy.c:163:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 163 | slash = strchr(check, '/');
# | ^
# 161| check = checkip;
# 162|
# 163|-> slash = strchr(check, '/');
# 164| /* if the slash is part of this token, use it */
# 165| if(slash) {
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/noproxy.c:163:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 161| check = checkip;
# 162|
# 163|-> slash = strchr(check, '/');
# 164| /* if the slash is part of this token, use it */
# 165| if(slash) {
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/pop3.c: scope_hint: In function 'pop3_state_servergreet_resp'
curl-8.18.0/lib/pop3.c:823:8: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 823 | lt = memchr(line, '<', len);
# | ^
# 821|
# 822| /* Look for the APOP timestamp */
# 823|-> lt = memchr(line, '<', len);
# 824| if(lt)
# 825| /* search the remainder for '>' */
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/pop3.c:823:8: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 821|
# 822| /* Look for the APOP timestamp */
# 823|-> lt = memchr(line, '<', len);
# 824| if(lt)
# 825| /* search the remainder for '>' */
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/url.c: scope_hint: In function 'parse_connect_to_string'
curl-8.18.0/lib/url.c:2971:24: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 2971 | char *ptr_next = strchr(ptr, ':');
# | ^~~~~~
# 2969| else {
# 2970| /* check whether the URL's port matches */
# 2971|-> char *ptr_next = strchr(ptr, ':');
# 2972| if(ptr_next) {
# 2973| curl_off_t port_to_match;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/url.c:2971:24: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 2969| else {
# 2970| /* check whether the URL's port matches */
# 2971|-> char *ptr_next = strchr(ptr, ':');
# 2972| if(ptr_next) {
# 2973| curl_off_t port_to_match;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/urlapi.c: scope_hint: In function 'parse_hostname_login'
curl-8.18.0/lib/urlapi.c:351:7: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 351 | ptr = memchr(login, '@', len);
# | ^
# 349|
# 350| *offset = 0;
# 351|-> ptr = memchr(login, '@', len);
# 352| if(!ptr)
# 353| goto out;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/urlapi.c:351:7: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 349|
# 350| *offset = 0;
# 351|-> ptr = memchr(login, '@', len);
# 352| if(!ptr)
# 353| goto out;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/urlapi.c: scope_hint: In function 'urldecode_host'
curl-8.18.0/lib/urlapi.c:660:7: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 660 | per = strchr(hostname, '%');
# | ^
# 658| char *per = NULL;
# 659| const char *hostname = curlx_dyn_ptr(host);
# 660|-> per = strchr(hostname, '%');
# 661| if(!per)
# 662| /* nothing to decode */
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/urlapi.c:660:7: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 658| char *per = NULL;
# 659| const char *hostname = curlx_dyn_ptr(host);
# 660|-> per = strchr(hostname, '%');
# 661| if(!per)
# 662| /* nothing to decode */
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/urlapi.c: scope_hint: In function 'parseurl'
curl-8.18.0/lib/urlapi.c:1143:12: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1143 | fragment = strchr(path, '#');
# | ^
# 1141| }
# 1142|
# 1143|-> fragment = strchr(path, '#');
# 1144| if(fragment) {
# 1145| fraglen = pathlen - (fragment - path);
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/urlapi.c:1143:12: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1141| }
# 1142|
# 1143|-> fragment = strchr(path, '#');
# 1144| if(fragment) {
# 1145| fraglen = pathlen - (fragment - path);
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/urlapi.c:1169:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1169 | query = memchr(path, '?', pathlen);
# | ^
# 1167| }
# 1168|
# 1169|-> query = memchr(path, '?', pathlen);
# 1170| if(query) {
# 1171| size_t qlen = fragment ? (size_t)(fragment - query) :
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/urlapi.c:1169:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1167| }
# 1168|
# 1169|-> query = memchr(path, '?', pathlen);
# 1170| if(query) {
# 1171| size_t qlen = fragment ? (size_t)(fragment - query) :
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/vauth/vauth.c: scope_hint: In function 'Curl_auth_user_contains_domain'
curl-8.18.0/lib/vauth/vauth.c:120:15: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 120 | char *p = strpbrk(user, "\\/@");
# | ^~~~~~~
# 118| if(user && *user) {
# 119| /* Check we have a domain name or UPN present */
# 120|-> char *p = strpbrk(user, "\\/@");
# 121|
# 122| valid = (p != NULL && p > user && p < user + strlen(user) - 1);
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/vauth/vauth.c:120:15: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 118| if(user && *user) {
# 119| /* Check we have a domain name or UPN present */
# 120|-> char *p = strpbrk(user, "\\/@");
# 121|
# 122| valid = (p != NULL && p > user && p < user + strlen(user) - 1);
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/vtls/vtls.c: scope_hint: In function 'pubkey_pem_to_der'
curl-8.18.0/lib/vtls/vtls.c:703:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 703 | begin_pos = strstr(pem, "-----BEGIN PUBLIC KEY-----");
# | ^
# 701| curlx_dyn_init(&pbuf, MAX_PINNED_PUBKEY_SIZE);
# 702|
# 703|-> begin_pos = strstr(pem, "-----BEGIN PUBLIC KEY-----");
# 704| if(!begin_pos)
# 705| return CURLE_BAD_CONTENT_ENCODING;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/vtls/vtls.c:703:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 701| curlx_dyn_init(&pbuf, MAX_PINNED_PUBKEY_SIZE);
# 702|
# 703|-> begin_pos = strstr(pem, "-----BEGIN PUBLIC KEY-----");
# 704| if(!begin_pos)
# 705| return CURLE_BAD_CONTENT_ENCODING;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/vtls/vtls.c:716:11: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 716 | end_pos = strstr(pem + pem_count, "\n-----END PUBLIC KEY-----");
# | ^
# 714|
# 715| /* Invalid if not directly following \n */
# 716|-> end_pos = strstr(pem + pem_count, "\n-----END PUBLIC KEY-----");
# 717| if(!end_pos)
# 718| return CURLE_BAD_CONTENT_ENCODING;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/lib/vtls/vtls.c:716:11: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 714|
# 715| /* Invalid if not directly following \n */
# 716|-> end_pos = strstr(pem + pem_count, "\n-----END PUBLIC KEY-----");
# 717| if(!end_pos)
# 718| return CURLE_BAD_CONTENT_ENCODING;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_getparam.c: scope_hint: In function 'parse_upload_flags'
curl-8.18.0/src/tool_getparam.c:1638:18: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 1638 | char *next = strchr(flag, ','); /* Find next comma or end */
# | ^~~~~~
# 1636| const struct flagmap *map;
# 1637| size_t len;
# 1638|-> char *next = strchr(flag, ','); /* Find next comma or end */
# 1639| if(next)
# 1640| len = next - flag;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_getparam.c:1638:18: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 1636| const struct flagmap *map;
# 1637| size_t len;
# 1638|-> char *next = strchr(flag, ','); /* Find next comma or end */
# 1639| if(next)
# 1640| len = next - flag;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_getparam.c: scope_hint: In function ‘parse_upload_flags’
curl-8.18.0/src/tool_getparam.c:1638:18: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 1638 | char *next = strchr(flag, ','); /* Find next comma or end */
# | ^~~~~~
# 1636| const struct flagmap *map;
# 1637| size_t len;
# 1638|-> char *next = strchr(flag, ','); /* Find next comma or end */
# 1639| if(next)
# 1640| len = next - flag;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_getparam.c:1638:18: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 1636| const struct flagmap *map;
# 1637| size_t len;
# 1638|-> char *next = strchr(flag, ','); /* Find next comma or end */
# 1639| if(next)
# 1640| len = next - flag;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_operhlp.c: scope_hint: In function 'add_file_name_to_url'
curl-8.18.0/src/tool_operhlp.c:119:21: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 119 | char *file2 = strrchr(filep ? filep : filename, '\\');
# | ^~~~~~~
# 117| side of the rightmost slash and backslash. */
# 118| const char *filep = strrchr(filename, '/');
# 119|-> char *file2 = strrchr(filep ? filep : filename, '\\');
# 120| char *encfile;
# 121|
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_operhlp.c:119:21: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 117| side of the rightmost slash and backslash. */
# 118| const char *filep = strrchr(filename, '/');
# 119|-> char *file2 = strrchr(filep ? filep : filename, '\\');
# 120| char *encfile;
# 121|
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_operhlp.c: scope_hint: In function ‘add_file_name_to_url’
curl-8.18.0/src/tool_operhlp.c:119:21: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 119 | char *file2 = strrchr(filep ? filep : filename, '\\');
# | ^~~~~~~
# 117| side of the rightmost slash and backslash. */
# 118| const char *filep = strrchr(filename, '/');
# 119|-> char *file2 = strrchr(filep ? filep : filename, '\\');
# 120| char *encfile;
# 121|
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_operhlp.c:119:21: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 117| side of the rightmost slash and backslash. */
# 118| const char *filep = strrchr(filename, '/');
# 119|-> char *file2 = strrchr(filep ? filep : filename, '\\');
# 120| char *encfile;
# 121|
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_urlglob.c: scope_hint: In function 'peek_ipv6'
curl-8.18.0/src/tool_urlglob.c:355:17: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 355 | char *endbr = strchr(str, ']');
# | ^~~~~~
# 353| char hostname[MAX_IP6LEN];
# 354| CURLU *u;
# 355|-> char *endbr = strchr(str, ']');
# 356| size_t hlen;
# 357| CURLUcode rc;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_urlglob.c:355:17: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 353| char hostname[MAX_IP6LEN];
# 354| CURLU *u;
# 355|-> char *endbr = strchr(str, ']');
# 356| size_t hlen;
# 357| CURLUcode rc;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_urlglob.c: scope_hint: In function ‘peek_ipv6’
curl-8.18.0/src/tool_urlglob.c:355:17: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 355 | char *endbr = strchr(str, ']');
# | ^~~~~~
# 353| char hostname[MAX_IP6LEN];
# 354| CURLU *u;
# 355|-> char *endbr = strchr(str, ']');
# 356| size_t hlen;
# 357| CURLUcode rc;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_urlglob.c:355:17: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 353| char hostname[MAX_IP6LEN];
# 354| CURLU *u;
# 355|-> char *endbr = strchr(str, ']');
# 356| size_t hlen;
# 357| CURLUcode rc;
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_writeout.c: scope_hint: In function 'ourWriteOut'
curl-8.18.0/src/tool_writeout.c:751:15: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 751 | end = strchr(ptr, '}');
# | ^
# 749| struct writeoutvar *wv = NULL;
# 750| struct writeoutvar find = { 0 };
# 751|-> end = strchr(ptr, '}');
# 752| ptr += 2; /* pass the % and the { */
# 753| if(!end) {
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_writeout.c:751:15: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 749| struct writeoutvar *wv = NULL;
# 750| struct writeoutvar find = { 0 };
# 751|-> end = strchr(ptr, '}');
# 752| ptr += 2; /* pass the % and the { */
# 753| if(!end) {
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_writeout.c: scope_hint: In function ‘ourWriteOut’
curl-8.18.0/src/tool_writeout.c:751:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 751 | end = strchr(ptr, '}');
# | ^
# 749| struct writeoutvar *wv = NULL;
# 750| struct writeoutvar find = { 0 };
# 751|-> end = strchr(ptr, '}');
# 752| ptr += 2; /* pass the % and the { */
# 753| if(!end) {
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_writeout.c:751:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 749| struct writeoutvar *wv = NULL;
# 750| struct writeoutvar find = { 0 };
# 751|-> end = strchr(ptr, '}');
# 752| ptr += 2; /* pass the % and the { */
# 753| if(!end) {
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_writeout.c:762:16: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 762 | wv = bsearch(&find,
# | ^
# 760| if(!curlx_dyn_addn(&name, ptr, vlen)) {
# 761| find.name = curlx_dyn_ptr(&name);
# 762|-> wv = bsearch(&find,
# 763| variables, CURL_ARRAYSIZE(variables),
# 764| sizeof(variables[0]), matchvar);
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_writeout.c:762:16: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 760| if(!curlx_dyn_addn(&name, ptr, vlen)) {
# 761| find.name = curlx_dyn_ptr(&name);
# 762|-> wv = bsearch(&find,
# 763| variables, CURL_ARRAYSIZE(variables),
# 764| sizeof(variables[0]), matchvar);
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_writeout.c:762:16: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 762 | wv = bsearch(&find,
# | ^
# 760| if(!curlx_dyn_addn(&name, ptr, vlen)) {
# 761| find.name = curlx_dyn_ptr(&name);
# 762|-> wv = bsearch(&find,
# 763| variables, CURL_ARRAYSIZE(variables),
# 764| sizeof(variables[0]), matchvar);
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_writeout.c:762:16: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 760| if(!curlx_dyn_addn(&name, ptr, vlen)) {
# 761| find.name = curlx_dyn_ptr(&name);
# 762|-> wv = bsearch(&find,
# 763| variables, CURL_ARRAYSIZE(variables),
# 764| sizeof(variables[0]), matchvar);
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_writeout.c:821:15: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 821 | end = strchr(ptr, '}');
# | ^
# 819| ptr += 2;
# 820| }
# 821|-> end = strchr(ptr, '}');
# 822| if(end) {
# 823| char fname[512]; /* holds the longest filename */
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_writeout.c:821:15: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 819| ptr += 2;
# 820| }
# 821|-> end = strchr(ptr, '}');
# 822| if(end) {
# 823| char fname[512]; /* holds the longest filename */
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_writeout.c:821:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 821 | end = strchr(ptr, '}');
# | ^
# 819| ptr += 2;
# 820| }
# 821|-> end = strchr(ptr, '}');
# 822| if(end) {
# 823| char fname[512]; /* holds the longest filename */
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/tool_writeout.c:821:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 819| ptr += 2;
# 820| }
# 821|-> end = strchr(ptr, '}');
# 822| if(end) {
# 823| char fname[512]; /* holds the longest filename */
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/var.c: scope_hint: In function 'varexpand'
curl-8.18.0/src/var.c:216:10: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 216 | envp = strstr(line, "{{");
# | ^
# 214| curlx_dyn_init(out, MAX_EXPAND_CONTENT);
# 215| do {
# 216|-> envp = strstr(line, "{{");
# 217| if((envp > line) && envp[-1] == '\\') {
# 218| /* preceding backslash, we want this verbatim */
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/var.c:216:10: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 214| curlx_dyn_init(out, MAX_EXPAND_CONTENT);
# 215| do {
# 216|-> envp = strstr(line, "{{");
# 217| if((envp > line) && envp[-1] == '\\') {
# 218| /* preceding backslash, we want this verbatim */
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/var.c: scope_hint: In function ‘varexpand’
curl-8.18.0/src/var.c:216:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 216 | envp = strstr(line, "{{");
# | ^
# 214| curlx_dyn_init(out, MAX_EXPAND_CONTENT);
# 215| do {
# 216|-> envp = strstr(line, "{{");
# 217| if((envp > line) && envp[-1] == '\\') {
# 218| /* preceding backslash, we want this verbatim */
Error: COMPILER_WARNING (CWE-704):
curl-8.18.0/src/var.c:216:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 214| curlx_dyn_init(out, MAX_EXPAND_CONTENT);
# 215| do {
# 216|-> envp = strstr(line, "{{");
# 217| if((envp > line) && envp[-1] == '\\') {
# 218| /* preceding backslash, we want this verbatim */
Error: GCC_ANALYZER_WARNING (CWE-476):
curl-8.18.0/src/var.c:217:25: warning[-Wanalyzer-null-dereference]: dereference of NULL 'envp'
curl-8.18.0/src/var.c:217:7: branch_true: following 'true' branch (when 'line < envp')...
curl-8.18.0/src/var.c:217:25: branch_true: ...to here
curl-8.18.0/src/var.c:217:25: danger: dereference of NULL 'envp'
# 215| do {
# 216| envp = strstr(line, "{{");
# 217|-> if((envp > line) && envp[-1] == '\\') {
# 218| /* preceding backslash, we want this verbatim */
# 219|
Error: GCC_ANALYZER_WARNING (CWE-476):
curl-8.18.0/src/var.c:217:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘envp’
curl-8.18.0/src/var.c:217:7: branch_true: following ‘true’ branch (when ‘line < envp’)...
curl-8.18.0/src/var.c:217:25: branch_true: ...to here
curl-8.18.0/src/var.c:217:25: danger: dereference of NULL ‘envp’
# 215| do {
# 216| envp = strstr(line, "{{");
# 217|-> if((envp > line) && envp[-1] == '\\') {
# 218| /* preceding backslash, we want this verbatim */
# 219|