mirror of
https://github.com/samba-team/samba.git
synced 2025-02-24 13:57:43 +03:00
CVE-2013-4408:s3:util_tsock: add some overflow detection to tstream_read_packet_done()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
94b2641a53
commit
6e293891ca
@ -110,6 +110,11 @@ static void tstream_read_packet_done(struct tevent_req *subreq)
|
||||
return;
|
||||
}
|
||||
|
||||
if (total + more < total) {
|
||||
tevent_req_error(req, EMSGSIZE);
|
||||
return;
|
||||
}
|
||||
|
||||
tmp = talloc_realloc(state, state->buf, uint8_t, total+more);
|
||||
if (tevent_req_nomem(tmp, req)) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user