All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] src/log.c: Don't crash when addr2line output contains no newline
@ 2016-04-16 15:28 Holger Hans Peter Freyther
  2016-04-18 15:02 ` Denis Kenzior
  0 siblings, 1 reply; 4+ messages in thread
From: Holger Hans Peter Freyther @ 2016-04-16 15:28 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

From: Harald Welte <hwelte@sysmocom.de>

---
 src/log.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/log.c b/src/log.c
index 6331b0d..42a2ec1 100644
--- a/src/log.c
+++ b/src/log.c
@@ -192,6 +192,8 @@ static void print_backtrace(unsigned int offset)
 		buf[len] = '\0';
 
 		pos = strchr(buf, '\n');
+		if (!pos)
+			break;
 		*pos++ = '\0';
 
 		if (strcmp(buf, "??") == 0) {
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] src/log.c: Don't crash when addr2line output contains no newline
@ 2016-04-05 19:22 Holger Hans Peter Freyther
  2016-04-06 18:22 ` Denis Kenzior
  0 siblings, 1 reply; 4+ messages in thread
From: Holger Hans Peter Freyther @ 2016-04-05 19:22 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 490 bytes --]

From: Harald Welte <hwelte@sysmocom.de>

Signed-off-by: Holger Hans Peter Freyther <hfreyther@sysmocom.de>
---
 src/log.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/log.c b/src/log.c
index 6331b0d..42a2ec1 100644
--- a/src/log.c
+++ b/src/log.c
@@ -192,6 +192,8 @@ static void print_backtrace(unsigned int offset)
 		buf[len] = '\0';
 
 		pos = strchr(buf, '\n');
+		if (!pos)
+			break;
 		*pos++ = '\0';
 
 		if (strcmp(buf, "??") == 0) {
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-18 15:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-16 15:28 [PATCH] src/log.c: Don't crash when addr2line output contains no newline Holger Hans Peter Freyther
2016-04-18 15:02 ` Denis Kenzior
  -- strict thread matches above, loose matches on Subject: below --
2016-04-05 19:22 Holger Hans Peter Freyther
2016-04-06 18:22 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.