summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Souza <luiz@netgate.com>2017-06-24 22:30:40 -0500
committerLuiz Souza <luiz@netgate.com>2017-06-24 22:30:40 -0500
commit9b57f5336c3e809f8f29d5ba2a8652619cdd18d0 (patch)
treef787399d9f1eeba79db219cd703a22601e22f243
parentb9f3af6b8a65f84f59910eac8f0f25655843059d (diff)
downloadFreeBSD-src-9b57f5336c3e809f8f29d5ba2a8652619cdd18d0.zip
FreeBSD-src-9b57f5336c3e809f8f29d5ba2a8652619cdd18d0.tar.gz
Fix a crash in gpioctl, the flags list must be null terminated.
-rw-r--r--usr.sbin/gpioctl/gpioctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/gpioctl/gpioctl.c b/usr.sbin/gpioctl/gpioctl.c
index 21b2688..8e2968c 100644
--- a/usr.sbin/gpioctl/gpioctl.c
+++ b/usr.sbin/gpioctl/gpioctl.c
@@ -69,6 +69,7 @@ static struct flag_desc pwm_flags[] = {
{ "DUTY", GPIO_PWM_DUTY },
{ "FREQ", GPIO_PWM_FREQ },
{ "PERIOD", GPIO_PWM_PERIOD },
+ { NULL, 0 },
};
static void
OpenPOWER on IntegriCloud