From d778fabaaa143580f582c184eba0ef348a22a8d2 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Fri, 14 Feb 2014 20:25:19 -0800 Subject: Fix some stupid. Off-by-one error in read() call. BUG=chromium:239205 BRANCH=none TEST=none Change-Id: Ifec3dacfa07e83d70b2582036cab0cfc1ee9e8f7 Signed-off-by: Bill Richardson Reviewed-on: https://chromium-review.googlesource.com/186738 Reviewed-by: Dave Parker Reviewed-by: Randall Spangler --- util/lbplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/lbplay.c') diff --git a/util/lbplay.c b/util/lbplay.c index d4a57e0567..455befdb80 100644 --- a/util/lbplay.c +++ b/util/lbplay.c @@ -29,7 +29,7 @@ int main(int argc, char **argv) perror("can't open version file"); goto out; } - ret = read(fd_v, buf, sizeof(buf)); + ret = read(fd_v, buf, sizeof(buf) - 1); if (ret <= 0) { perror("can't read version"); close(fd_v); -- cgit v1.2.1