Download scripts/arraylit_invariant_before.diff from shawnnnliu/Hardened_SEC-Bench: direct link, hf CLI and curl.
- Browser
- Download file 600 Bytes
-
https://huggingface.co/datasets/shawnnnliu/Hardened_SEC-Bench/resolve/main/scripts/arraylit_invariant_before.diff
- Command line
-
hf download hf://datasets/shawnnnliu/Hardened_SEC-Bench/scripts/arraylit_invariant_before.diff
-
curl -L -o arraylit_invariant_before.diff https://huggingface.co/datasets/shawnnnliu/Hardened_SEC-Bench/resolve/main/scripts/arraylit_invariant_before.diff
600 Bytes
| diff --git a/src/njs_vmcode.c b/src/njs_vmcode.c | |
| index ef0beb5e..1dc35b77 100644 | |
| --- a/src/njs_vmcode.c | |
| +++ b/src/njs_vmcode.c | |
| njs_vmcode_array(njs_vm_t *vm, u_char *pc) | |
| if (code->ctor) { | |
| /* Array of the form [,,,], [1,,]. */ | |
| + if (njs_slow_path(!array->object.fast_array)) { | |
| + njs_stderror("ARRAYLIT-INVARIANT ctor array literal fill on " | |
| + "slow array (start=%p)\n", array->start); | |
| + abort(); | |
| + } | |
| value = array->start; | |
| length = array->length; | |