mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix an off-by-one in gpio_pin_list().
Coverity CID: 1256495
This commit is contained in:
parent
244c371d25
commit
e852010c39
1 changed files with 1 additions and 1 deletions
|
|
@ -89,7 +89,7 @@ gpio_pin_list(gpio_handle_t handle, gpio_config_t **pcfgs)
|
|||
errno = EINVAL;
|
||||
return (-1);
|
||||
}
|
||||
cfgs = calloc(maxpins, sizeof(*cfgs));
|
||||
cfgs = calloc(maxpins + 1, sizeof(*cfgs));
|
||||
if (cfgs == NULL)
|
||||
return (-1);
|
||||
for (i = 0; i <= maxpins; i++) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue