diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2018-08-27 14:37:33 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2018-08-27 14:37:33 +0300 |
commit | c704a72ce2873bc3b272ab3edb3a78e8a11c672e (patch) | |
tree | 539d1ce490502ce8a02a8943db067d603bb618d6 /unit/util.c | |
parent | 6d2ecb1b547af21613943528b0e62a1005051eb2 (diff) | |
download | bluez-c704a72ce2873bc3b272ab3edb3a78e8a11c672e.tar.gz |
unit: Fix out of bounds
Test /gobex/test_stream_put_req requires 5 buffers to complete.
Diffstat (limited to 'unit/util.c')
-rw-r--r-- | unit/util.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/unit/util.c b/unit/util.c index 8e3115fe3..ce4d65add 100644 --- a/unit/util.c +++ b/unit/util.c @@ -188,6 +188,11 @@ send: goto failed; } + if (d->count >= TEST_BUF_MAX) { + g_print("io_cb count %u\n", d->count); + goto failed; + } + if (d->recv[d->count].len < 0 || (gssize) expect_len < 0) return test_io_cb(io, G_IO_OUT, user_data); |