[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 159/178: smb: reject negative file sizes
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 159/178: smb: reject negative file sizes |
Date: |
Wed, 23 May 2018 12:26:34 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 9cacc24630e55ea54803458f37fadfe9d4beb52c
Author: Daniel Stenberg <address@hidden>
AuthorDate: Sat May 12 22:24:25 2018 +0200
smb: reject negative file sizes
Assisted-by: Max Dymond
Detected by OSS-Fuzz
Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8245
---
lib/smb.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/lib/smb.c b/lib/smb.c
index b4326341e..9ac61505c 100644
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -790,10 +790,16 @@ static CURLcode smb_request_state(struct connectdata
*conn, bool *done)
else {
smb_m = (const struct smb_nt_create_response*) msg;
conn->data->req.size = smb_swap64(smb_m->end_of_file);
- Curl_pgrsSetDownloadSize(conn->data, conn->data->req.size);
- if(conn->data->set.get_filetime)
- get_posix_time(&conn->data->info.filetime, smb_m->last_change_time);
- next_state = SMB_DOWNLOAD;
+ if(conn->data->req.size < 0) {
+ req->result = CURLE_WEIRD_SERVER_REPLY;
+ next_state = SMB_CLOSE;
+ }
+ else {
+ Curl_pgrsSetDownloadSize(conn->data, conn->data->req.size);
+ if(conn->data->set.get_filetime)
+ get_posix_time(&conn->data->info.filetime, smb_m->last_change_time);
+ next_state = SMB_DOWNLOAD;
+ }
}
break;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 128/178: TODO: CLOEXEC, (continued)
- [GNUnet-SVN] [gnurl] 128/178: TODO: CLOEXEC, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 118/178: os400.c: fix ASSIGNWITHINCONDITION checksrc warnings, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 137/178: TODO: remove configure --disable-pthreads, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 148/178: transfer: don't unset writesockfd on setup of multiplexed conns, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 151/178: github/lock: auto-lock closed issues after 90 days of inactivity, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 154/178: RELEASE-NOTES: typo, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 144/178: configure: only check for CA bundle for file-using SSL backends, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 147/178: configure: put CURLDEBUG and DEBUGBUILD in lib/curl_config.h, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 143/178: ssh-libssh.c: fix left shift compiler warning, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 149/178: vtls: use unified "supports" bitfield member in backends, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 159/178: smb: reject negative file sizes,
gnunet <=
- [GNUnet-SVN] [gnurl] 177/178: RELEASE-NOTES: 7.60.0 release, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 155/178: travis: add a build using WolfSSL, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 146/178: http: don't set the "rewind" flag when not uploading anything, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 99/178: tool_help: clarify --max-time unit of time is seconds, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 90/178: schannel: add support for CURLOPT_CAINFO, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 88/178: docs: fix typos, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 157/178: travis: add build using NSS, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 150/178: vtls: fix missing commas, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 153/178: RELEASE-NOTES: synced, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 160/178: cookies: do not take cookie name as a parameter, gnunet, 2018/05/23