Skip to content

Commit 8418979

Browse files
Fix Lua Integer Overflow (CVE-2025-46817)
1 parent bdcc69d commit 8418979

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/redis-6.2.6/deps/lua/src/ltable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ static TValue *newkey (lua_State *L, Table *t, const TValue *key) {
434434
*/
435435
const TValue *luaH_getnum (Table *t, int key) {
436436
/* (1 <= key && key <= t->sizearray) */
437-
if (cast(unsigned int, key-1) < cast(unsigned int, t->sizearray))
437+
if (1 <= key && key <= t->sizearray)
438438
return &t->array[key-1];
439439
else {
440440
lua_Number nk = cast_num(key);

0 commit comments

Comments
 (0)