From: Bartosz Golaszewski Date: Wed, 14 Jun 2017 07:00:53 +0000 (+0200) Subject: tests: gpioget: fix potential crash X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=faa13359cce57ad89102ade8b614f618e0fa0363;p=qemu-gpiodev%2Flibgpiod.git tests: gpioget: fix potential crash We're writing outside the values array. Fix the index. Signed-off-by: Bartosz Golaszewski --- diff --git a/tests/tests-gpioget.c b/tests/tests-gpioget.c index b3b6b90..7cd73c5 100644 --- a/tests/tests-gpioget.c +++ b/tests/tests-gpioget.c @@ -111,7 +111,7 @@ static void gpioget_read_some_lines(void) offsets[1] = 4; offsets[2] = 6; - values[0] = values[1] = values[3] = 1; + values[0] = values[1] = values[2] = 1; rv = gpiod_simple_set_value_multiple(TEST_CONSUMER, test_chip_name(1), offsets, values, 3, false,