From: Daniel Wagner <[email protected]>
If read returns sizeof(buf) characters buf[len] will be a out of
bound access.
Reported by coverty.
---
src/log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/log.c b/src/log.c
index 6667fb8..cb8596f 100644
--- a/src/log.c
+++ b/src/log.c
@@ -179,7 +179,7 @@ static void print_backtrace(unsigned int offset)
if (written < 0)
break;
- len = read(infd[0], buf, sizeof(buf));
+ len = read(infd[0], buf, sizeof(buf) - 1);
if (len < 0)
break;
--
1.8.4.474.g128a96c
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman