hal: Minor usb stability fix
- Adding buffer of one byte for the strstr usecase to make
the passed string is NULL terminated.
Change-Id: Ief8531e149b05f4020cb1338110bbfad4a74f7d0
Crs-fixed: 607454
diff --git a/hal/audio_extn/usb.c b/hal/audio_extn/usb.c
index 88e3cad..699c3b7 100644
--- a/hal/audio_extn/usb.c
+++ b/hal/audio_extn/usb.c
@@ -152,7 +152,7 @@
file_size = st.st_size;
- read_buf = (char *)calloc(1, USB_BUFF_SIZE);
+ read_buf = (char *)calloc(1, USB_BUFF_SIZE + 1);
err = read(fd, read_buf, USB_BUFF_SIZE);
str_start = strstr(read_buf, type);
if (str_start == NULL) {