[SATYR PATCH] sr_report_to_json: do not segfault on invalid reports

Michal Toman mtoman at redhat.com
Thu Aug 8 08:14:08 UTC 2013


Signed-off-by: Michal Toman <mtoman at redhat.com>
---
 lib/report.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/report.c b/lib/report.c
index 6258855..b2c4d29 100644
--- a/lib/report.c
+++ b/lib/report.c
@@ -177,7 +177,7 @@ sr_report_to_json(struct sr_report *report)
     case SR_REPORT_INVALID:
     case SR_REPORT_GDB: /* gdb ureports are not supported */
         report_type = "invalid";
-        reason = "invalid";
+        reason = sr_strdup("invalid");
         break;
     case SR_REPORT_CORE:
         report_type = "core";
-- 
1.8.3.1



More information about the Crash-catcher mailing list