Skip to content

Commit 7849320

Browse files
saulrhdwrensha
authored andcommitted
Change traversal limit on machines with short pointers to 8192 words
This is 65536 bytes, which will exactly fill the memory addressable by 16-bit pointers. It is almost certain that legitimate messages will run out of buffer space before hitting this limit.
1 parent 91fe232 commit 7849320

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

capnp/src/message.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ pub const DEFAULT_READER_OPTIONS: ReaderOptions = ReaderOptions {
120120

121121
#[cfg(target_pointer_width = "16")]
122122
pub const DEFAULT_READER_OPTIONS: ReaderOptions = ReaderOptions {
123-
traversal_limit_in_words: Some(1024),
123+
traversal_limit_in_words: Some(8 * 1024),
124124
nesting_limit: 64,
125125
};
126126

0 commit comments

Comments
 (0)