Explorar o código

Merge "disp: msm: dsi: terminate buffer with NULL character"

qctecmdr %!s(int64=3) %!d(string=hai) anos
pai
achega
5e95df6d30
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      msm/dsi/dsi_parser.c

+ 1 - 0
msm/dsi/dsi_parser.c

@@ -925,6 +925,7 @@ void *dsi_parser_get_head_node(void *in,
 	buf = parser->buf;
 
 	memcpy(buf, data, size);
+	buf[size] = '\0';
 
 	strreplace(buf, '\n', ' ');
 	strreplace(buf, '\t', '*');