From 0f7f5e01b8eaca303ea4e112f8490da2738472f3 Mon Sep 17 00:00:00 2001 From: orbisai0security Date: Mon, 11 May 2026 06:17:07 +0000 Subject: [PATCH] fix: V-006 security vulnerability Automated security fix generated by Orbis Security AI --- modules/py32ioexp-1.0/py32ioexp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/py32ioexp-1.0/py32ioexp.c b/modules/py32ioexp-1.0/py32ioexp.c index d98e06a..9b2e5f1 100644 --- a/modules/py32ioexp-1.0/py32ioexp.c +++ b/modules/py32ioexp-1.0/py32ioexp.c @@ -372,6 +372,8 @@ static void py32io_gpio_set(struct gpio_chip *chip, unsigned offset, int value) static int py32io_gpio_direction_input(struct gpio_chip *chip, unsigned offset) { + if (offset >= chip->ngpio) + return -EINVAL; return py32io_gpio_set_direction(chip, offset, GPIO_LINE_DIRECTION_IN); }