diag: Fix array out of bounds access

The processing of the buf_tbl array is resulting in access beyond
the end of the array. Make modifications to ensure that the buf_tbl
array is accessed properly within bounds.

CRs-Fixed: 488175

Change-Id: I8782c7632a426fe49a295361c3db1257cc881c80
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
3 files changed