diag: Fix Buffer Overflow during HDLC Encoding

Diag driver performs HDLC encoding on the input when an user space
program writes to the Diag node. This fix addresses a potential
buffer overflow during the encoding process.

Change-Id: I6b342027aff924ca7d9afcabda7ba147be9b4411
CRs-Fixed: 416757
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
1 file changed