What is a Conditionally Uninitialized Variable? The return value of a function that is potentially used to initialize a local variable is not checked. Therefore, reading the local variable may result in undefined behavior.
6 instances of this defect were found in the following locations:
returned due to such an error, check for HTTP transient
errors to retry on. */
long protocol;
curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol); <------ HERE
if((protocol == CURLPROTO_HTTP) || (protocol == CURLPROTO_HTTPS)) {
/* This was HTTP(S) */
What is a Conditionally Uninitialized Variable? The return value of a function that is potentially used to initialize a local variable is not checked. Therefore, reading the local variable may result in undefined behavior.
6 instances of this defect were found in the following locations:
Instance 1 File :
src/tool_operate.c
Function:curl_easy_getinfo
https://github.com/siva-msft/curl/blob/91176082b1cf013b3510b7544b589973e541e8b4/src/tool_operate.c#L456 Code extract:Instance 2 File :
src/tool_operate.c
Function:curl_easy_getinfo
https://github.com/siva-msft/curl/blob/91176082b1cf013b3510b7544b589973e541e8b4/src/tool_operate.c#L467 Code extract:Instance 3 File :
src/tool_operate.c
Function:curl_easy_getinfo
https://github.com/siva-msft/curl/blob/91176082b1cf013b3510b7544b589973e541e8b4/src/tool_operate.c#L470 Code extract:Instance 4 File :
src/tool_operate.c
Function:curl_easy_getinfo
https://github.com/siva-msft/curl/blob/91176082b1cf013b3510b7544b589973e541e8b4/src/tool_operate.c#L496 Code extract:Instance 5 File :
src/tool_operate.c
Function:curl_easy_getinfo
https://github.com/siva-msft/curl/blob/91176082b1cf013b3510b7544b589973e541e8b4/src/tool_operate.c#L497 Code extract:Instance 6 File :
src/tool_operate.c
Function:curl_easy_getinfo
https://github.com/siva-msft/curl/blob/91176082b1cf013b3510b7544b589973e541e8b4/src/tool_operate.c#L596 Code extract: