diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-06-17 11:40:49 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-06-17 11:40:49 -0300 |
commit | f71156744851701b5d5fabdda5061b31e53f8f14 (patch) | |
tree | 5e5b99074b0387c6ebb01d3d7c9c6a0b3bddb5ab /manual/manual.of | |
parent | 9386e49a3173b68e8b5a7ba882c4c2faf557b61e (diff) | |
download | lua-f71156744851701b5d5fabdda5061b31e53f8f14.tar.gz lua-f71156744851701b5d5fabdda5061b31e53f8f14.tar.bz2 lua-f71156744851701b5d5fabdda5061b31e53f8f14.zip |
Check string indices when loading binary chunk
Lua is not religious about that, but it tries to avoid crashes when
loading binary chunks.
Diffstat (limited to 'manual/manual.of')
-rw-r--r-- | manual/manual.of | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/manual/manual.of b/manual/manual.of index baa33d88..5bab781b 100644 --- a/manual/manual.of +++ b/manual/manual.of | |||
@@ -1403,8 +1403,7 @@ see the program @idx{luac} and the function @Lid{string.dump} for details. | |||
1403 | Programs in source and compiled forms are interchangeable; | 1403 | Programs in source and compiled forms are interchangeable; |
1404 | Lua automatically detects the file type and acts accordingly @seeF{load}. | 1404 | Lua automatically detects the file type and acts accordingly @seeF{load}. |
1405 | Be aware that, unlike source code, | 1405 | Be aware that, unlike source code, |
1406 | the execution of maliciously crafted | 1406 | maliciously crafted binary chunks can crash the interpreter. |
1407 | bytecode can crash the interpreter. | ||
1408 | 1407 | ||
1409 | } | 1408 | } |
1410 | 1409 | ||
@@ -6694,11 +6693,10 @@ It may be the string @St{b} (only @x{binary chunk}s), | |||
6694 | or @St{bt} (both binary and text). | 6693 | or @St{bt} (both binary and text). |
6695 | The default is @St{bt}. | 6694 | The default is @St{bt}. |
6696 | 6695 | ||
6697 | It is safe to load malformed binary chunks; | 6696 | Lua does not check the consistency of binary chunks. |
6698 | @id{load} signals an appropriate error. | 6697 | Maliciously crafted binary chunks can crash |
6699 | However, | 6698 | the interpreter. |
6700 | Lua does not check the consistency of the code inside binary chunks; | 6699 | You can use the @id{mode} parameter to prevent loading binary chunks. |
6701 | running maliciously crafted bytecode can crash the interpreter. | ||
6702 | 6700 | ||
6703 | } | 6701 | } |
6704 | 6702 | ||