Skip to content
Myr

Fix reversed pointer subtraction in `f_env` bounds check (#3465)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by itchyny · committed by GitHub · parent d44baeb · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/builtin.c+1 added-1 removed
1236 unmodified lines
1237 var = e[0];1238 val = strchr(e[0], '=');1239 if (val == NULL)1240 env = jv_object_set(env, jv_string(var), jv_null());1241 else if (var - val < INT_MAX)1241 else if (val - var < INT_MAX)1242 env = jv_object_set(env, jv_string_sized(var, val - var), jv_string(val + 1));1243 }1244 return env;1245}
829 unmodified lines