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.
3 instances of this defect were found in the following locations:
}
else if(result & CURL_CSELECT_IN) {
infof(data, "Ctrl conn has data while waiting for data conn\n");
Curl_GetFTPResponse(&nread, conn, &ftpcode); <------ HERE
if(ftpcode/100 > 3)
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.
3 instances of this defect were found in the following locations:
Instance 1 File :
lib/ftp.c
Function:Curl_GetFTPResponse
https://github.com/siva-msft/curl/blob/0eda1cffe4f39fe489cd0e859817213df27aecf5/lib/ftp.c#L411 Code extract:How can I fix it? Correct reference usage found in
lib/ftp.c
at line3377
. https://github.com/siva-msft/curl/blob/0eda1cffe4f39fe489cd0e859817213df27aecf5/lib/ftp.c#L3377 Code extract:Instance 2 File :
lib/ftp.c
Function:Curl_inet_ntop
https://github.com/siva-msft/curl/blob/0eda1cffe4f39fe489cd0e859817213df27aecf5/lib/ftp.c#L1057 Code extract:How can I fix it? Correct reference usage found in
lib/connect.c
at line650
. https://github.com/siva-msft/curl/blob/0eda1cffe4f39fe489cd0e859817213df27aecf5/lib/connect.c#L650 Code extract:Instance 3 File :
lib/ftp.c
Function:Curl_printable_address
https://github.com/siva-msft/curl/blob/0eda1cffe4f39fe489cd0e859817213df27aecf5/lib/ftp.c#L3450 Code extract:How can I fix it? Correct reference usage found in
lib/socks.c
at line785
. https://github.com/siva-msft/curl/blob/0eda1cffe4f39fe489cd0e859817213df27aecf5/lib/socks.c#L785 Code extract: