git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
997eb9e
)
tsocket: return EINVAL when tdgram_sendto_send() is used with len == 0
author
Stefan Metzmacher
<metze@samba.org>
Fri, 10 Apr 2009 18:35:12 +0000
(20:35 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Fri, 1 May 2009 15:38:23 +0000
(17:38 +0200)
metze
lib/tsocket/tsocket.c
patch
|
blob
|
history
diff --git
a/lib/tsocket/tsocket.c
b/lib/tsocket/tsocket.c
index 8e97997d8582c5aca0e370f86ffbc4f032a9ccf6..11ae6ce9ed194ec863ec0cf161fe8536fa889102 100644
(file)
--- a/
lib/tsocket/tsocket.c
+++ b/
lib/tsocket/tsocket.c
@@
-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)) {