diff options
author | Marcel Raad <Marcel.Raad@teamviewer.com> | 2021-02-06 10:26:38 +0100 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2021-02-10 16:46:52 +0100 |
commit | a3f93a62a2f53ea0f8b88cedefdaa4ee1bc4baea (patch) | |
tree | 0afe93bba97aafc06d1f55b0c31e134582a4cc6d /lib | |
parent | ec5d9b44a2e837fc7b82d1c60d5fae3f851620dc (diff) | |
download | curl-a3f93a62a2f53ea0f8b88cedefdaa4ee1bc4baea.tar.gz |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ftp.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2482,7 +2482,8 @@ static CURLcode ftp_state_get_resp(struct Curl_easy *data, bytes--; } /* if we have nothing but digits: */ - if(bytes++) { + if(bytes) { + ++bytes; /* get the number! */ (void)curlx_strtoofft(bytes, NULL, 0, &size); } |