mirror of
https://github.com/moparisthebest/curl
synced 2024-11-16 06:25:03 -05:00
ftp: fix Codacy/cppcheck warning about null pointer arithmetic
Increment `bytes` only if it is non-null. Closes https://github.com/curl/curl/pull/6576
This commit is contained in:
parent
ec5d9b44a2
commit
a3f93a62a2
@ -2482,7 +2482,8 @@ static CURLcode ftp_state_get_resp(struct Curl_easy *data,
|
|||||||
bytes--;
|
bytes--;
|
||||||
}
|
}
|
||||||
/* if we have nothing but digits: */
|
/* if we have nothing but digits: */
|
||||||
if(bytes++) {
|
if(bytes) {
|
||||||
|
++bytes;
|
||||||
/* get the number! */
|
/* get the number! */
|
||||||
(void)curlx_strtoofft(bytes, NULL, 0, &size);
|
(void)curlx_strtoofft(bytes, NULL, 0, &size);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user