diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-01-26 21:26:07 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-08 23:32:18 +0100 |
commit | 91d9f5d658d646e1ad1c0b3a28a9bba0094a44c6 (patch) | |
tree | bddbc08072e3baefc28563eecaa70251f56b19c6 /js/src/jsfun.cpp | |
parent | a8d25a2ed6e6306fb073578158572b04749f7891 (diff) | |
download | uxp-91d9f5d658d646e1ad1c0b3a28a9bba0094a44c6.tar.gz |
Make XDR decoding more robust.
Diffstat (limited to 'js/src/jsfun.cpp')
-rw-r--r-- | js/src/jsfun.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index 9fffce4484..c952441ad5 100644 --- a/js/src/jsfun.cpp +++ b/js/src/jsfun.cpp @@ -641,6 +641,10 @@ js::XDRInterpretedFunction(XDRState<mode>* xdr, HandleScope enclosingScope, objp.set(fun); } + // Verify marker at end of function to detect buffer truncation. + if (!xdr->codeMarker(0xA0129CD1)) + return false; + return true; } |