From f70acedeb4f8d6603bd20d2339db45f7633a5806 Mon Sep 17 00:00:00 2001 From: sinikang Date: Thu, 13 Feb 2020 11:47:56 +0900 Subject: [PATCH] Fix coverity issue (string not null terminated) Change-Id: Iead15f0387fe6aa058a990650c35060f7b3d8917 Signed-off-by: sinikang --- packaging/tel-plugin-nitz.spec | 2 +- src/time_update.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packaging/tel-plugin-nitz.spec b/packaging/tel-plugin-nitz.spec index b4fb1f1..169bdd9 100644 --- a/packaging/tel-plugin-nitz.spec +++ b/packaging/tel-plugin-nitz.spec @@ -3,7 +3,7 @@ %define major 0 %define minor 1 -%define patchlevel 80 +%define patchlevel 81 Name: tel-plugin-nitz Summary: nitz plugin for telephony diff --git a/src/time_update.c b/src/time_update.c index 8ef5303..ac06fcb 100644 --- a/src/time_update.c +++ b/src/time_update.c @@ -170,6 +170,7 @@ gboolean nitz_apply_tzfile(const char *tzfilename) if (len < 0) { err("Fail to get Current Zone Info"); } else { + current_tz[len] = 0x00; if (g_strcmp0(current_tz, buf) == 0) { info("[TIMESTAMP] We don't need to set timezone again (Already applied)"); return FALSE; -- 2.34.1