projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a87a71f
)
fix edge case (partial write of LV2 worker message size)
author
Robin Gareus
<robin@gareus.org>
Sat, 22 Mar 2014 23:04:46 +0000
(
00:04
+0100)
committer
Robin Gareus
<robin@gareus.org>
Sat, 22 Mar 2014 23:04:46 +0000
(
00:04
+0100)
libs/ardour/worker.cc
patch
|
blob
|
history
diff --git
a/libs/ardour/worker.cc
b/libs/ardour/worker.cc
index d5238adb60e49377e95810c5b3e1451b28e688a6..b110dc286f875454f272cfef6735267a5f7d6407 100644
(file)
--- a/
libs/ardour/worker.cc
+++ b/
libs/ardour/worker.cc
@@
-82,6
+82,9
@@
Worker::verify_message_completeness(RingBuffer<uint8_t>* rb)
uint32_t size;
RingBuffer<uint8_t>::rw_vector vec;
rb->get_read_vector (&vec);
+ if (vec.len[0] + vec.len[1] < sizeof(size)) {
+ return false;
+ }
if (vec.len[0] >= sizeof(size)) {
memcpy (&size, vec.buf[0], sizeof (size));
} else {