From 125af7e120a3b92616d5e2525290ea9a73f89429 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 18 Sep 2014 17:13:14 +0300 Subject: [PATCH] emulator/btdev: Fix invalid memory access --- emulator/btdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emulator/btdev.c b/emulator/btdev.c index b763c7358..a42cb7645 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -680,8 +680,8 @@ static void send_cmd(struct btdev *btdev, uint8_t evt, uint16_t opcode, iov2[2 + i].iov_len = iov[i].iov_len; } - if (run_hooks(btdev, BTDEV_HOOK_POST_CMD, opcode, iov[i].iov_base, - iov[i].iov_len)) + if (run_hooks(btdev, BTDEV_HOOK_POST_CMD, opcode, iov[i -1].iov_base, + iov[i -1].iov_len)) send_packet(btdev, iov2, 2 + iovlen); } -- 2.47.3