projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbed78c
)
check and handle
author
Christian Grothoff
<christian@grothoff.org>
Wed, 21 Jul 2010 08:05:57 +0000
(08:05 +0000)
committer
Christian Grothoff
<christian@grothoff.org>
Wed, 21 Jul 2010 08:05:57 +0000
(08:05 +0000)
src/util/server_mst.c
patch
|
blob
|
history
diff --git
a/src/util/server_mst.c
b/src/util/server_mst.c
index 0856ba57623b50db4a7c5fccdfe48336624e5070..835d8eebaaa0a874f8857f43d7abf368c10cc6ef 100644
(file)
--- a/
src/util/server_mst.c
+++ b/
src/util/server_mst.c
@@
-251,6
+251,12
@@
GNUNET_SERVER_mst_receive (struct GNUNET_SERVER_MessageStreamTokenizer *mst,
/* can try to do zero-copy and process directly from original buffer */
hdr = (const struct GNUNET_MessageHeader *) buf;
want = ntohs (hdr->size);
+ if (want < sizeof (struct GNUNET_MessageHeader))
+ {
+ GNUNET_break_op (0);
+ mst->off = 0;
+ return GNUNET_SYSERR;
+ }
if (size < want)
break; /* or not, buffer incomplete, so copy to private buffer... */
if (one_shot == GNUNET_SYSERR)