mirror of
https://github.com/janet-lang/janet
synced 2024-11-05 16:26:17 +00:00
Merge pull request #800 from marler8997/fixUbInGC
add NULL check in gc.c to avoid UB
This commit is contained in:
commit
92c02449f4
@ -123,6 +123,8 @@ static void janet_mark_abstract(void *adata) {
|
||||
|
||||
/* Mark a bunch of items in memory */
|
||||
static void janet_mark_many(const Janet *values, int32_t n) {
|
||||
if (values == NULL)
|
||||
return;
|
||||
const Janet *end = values + n;
|
||||
while (values < end) {
|
||||
janet_mark(*values);
|
||||
|
Loading…
Reference in New Issue
Block a user