Skip to content

Commit f25f824

Browse files
authored
Remove bad check during buffer write. (proxy-wasm#27)
Signed-off-by: John Plevyak <jplevyak@gmail.com>
1 parent a6b0f83 commit f25f824

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/exports.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,10 +514,6 @@ Word set_buffer_bytes(void *raw_context, Word type, Word start, Word length, Wor
514514
if (!data) {
515515
return WasmResult::InvalidMemoryAccess;
516516
}
517-
// check for overflow.
518-
if (buffer->size() < start + length || start > start + length) {
519-
return WasmResult::BadArgument;
520-
}
521517
return buffer->copyFrom(start, length, data.value());
522518
}
523519

0 commit comments

Comments
 (0)