Fix from yufeng.gao@uq.edu.au
-/* $OpenBSD: exec_elf.c,v 1.190 2024/08/21 03:16:25 deraadt Exp $ */
+/* $OpenBSD: exec_elf.c,v 1.191 2024/09/15 23:13:19 deraadt Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
for (i = 0; i < nsyscalls; i++) {
if (syscalls[i].sysno <= 0 ||
syscalls[i].sysno >= SYS_MAXSYSCALL ||
- syscalls[i].offset > len)
+ syscalls[i].offset > len) {
+ npins = 0;
goto bad;
+ }
npins = MAX(npins, syscalls[i].sysno);
}
if (is_ldso)