1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

tsocket: return EINVAL when tdgram_sendto_send() is used with len == 0

metze
This commit is contained in:
Stefan Metzmacher 2009-04-10 20:35:12 +02:00
parent 997eb9eb43
commit 66a2cd36c6

View File

@ -219,6 +219,11 @@ struct tevent_req *tdgram_sendto_send(TALLOC_CTX *mem_ctx,
state->ops = dgram->ops;
state->ret = -1;
if (len == 0) {
tevent_req_error(req, EINVAL);
goto post;
}
subreq = state->ops->sendto_send(state, ev, dgram,
buf, len, dst);
if (tevent_req_nomem(subreq, req)) {