From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx> --- tools/scotest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/scotest.c b/tools/scotest.c index 69150b1..227287d 100644 --- a/tools/scotest.c +++ b/tools/scotest.c @@ -255,7 +255,7 @@ static void dump_mode(int sk) strerror(errno), errno); if (defer_setup) { - len = read(sk, buf, sizeof(buf)); + len = read(sk, buf, data_size); if (len < 0) syslog(LOG_ERR, "Initial read error: %s (%d)", strerror(errno), errno); @@ -283,7 +283,7 @@ static void recv_mode(int sk) strerror(errno), errno); if (defer_setup) { - len = read(sk, buf, sizeof(buf)); + len = read(sk, buf, data_size); if (len < 0) syslog(LOG_ERR, "Initial read error: %s (%d)", strerror(errno), errno); -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html