Download scripts/arraylit_invariant_after.diff from shawnnnliu/Hardened_SEC-Bench: direct link, hf CLI and curl.
- Browser
- Download file 633 Bytes
-
https://huggingface.co/datasets/shawnnnliu/Hardened_SEC-Bench/resolve/main/scripts/arraylit_invariant_after.diff
- Command line
-
hf download hf://datasets/shawnnnliu/Hardened_SEC-Bench/scripts/arraylit_invariant_after.diff
-
curl -L -o arraylit_invariant_after.diff https://huggingface.co/datasets/shawnnnliu/Hardened_SEC-Bench/resolve/main/scripts/arraylit_invariant_after.diff
633 Bytes
| diff --git a/src/njs_vmcode.c b/src/njs_vmcode.c | |
| index ec478659..ac03fa32 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 (array->object.fast_array) { | |
| + if (njs_slow_path(array->start == NULL)) { | |
| + njs_stderror("ARRAYLIT-GUARD fill loop reached with " | |
| + "NULL start\n"); | |
| + abort(); | |
| + } | |
| value = array->start; | |
| length = array->length; | |