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:
99f5712
)
Don't transmit partial packets
author
LRN
<lrn1986@gmail.com>
Mon, 13 Jan 2014 21:10:15 +0000
(21:10 +0000)
committer
LRN
<lrn1986@gmail.com>
Mon, 13 Jan 2014 21:10:15 +0000
(21:10 +0000)
src/conversation/gnunet-helper-audio-record.c
patch
|
blob
|
history
diff --git
a/src/conversation/gnunet-helper-audio-record.c
b/src/conversation/gnunet-helper-audio-record.c
index 89031221343b2a729575259287e89f85645284ce..20812599f9f93d3a9f0a9befc7333dbce2baa53d 100644
(file)
--- a/
src/conversation/gnunet-helper-audio-record.c
+++ b/
src/conversation/gnunet-helper-audio-record.c
@@
-162,11
+162,14
@@
packetizer ()
len =
opus_encode_float (enc, pcm_buffer, frame_size, opus_data,
max_payload_bytes);
+
if (len > UINT16_MAX - sizeof (struct AudioMessage))
{
GNUNET_break (0);
-
len = UINT16_MAX - sizeof (struct AudioMessage)
;
+
continue
;
}
+
+
msg_size = sizeof (struct AudioMessage) + len;
audio_message->header.size = htons ((uint16_t) msg_size);
memcpy (&audio_message[1], opus_data, len);