diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util_tsock.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/util_tsock.c b/source3/lib/util_tsock.c index 35a97f5e692..03380ef244b 100644 --- a/source3/lib/util_tsock.c +++ b/source3/lib/util_tsock.c @@ -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; |