From 55b141a1f42ca4f6245b802166c227dff5593bc0 Mon Sep 17 00:00:00 2001 From: Jaehyun Kim Date: Mon, 8 Apr 2013 15:25:19 +0900 Subject: [PATCH] Check return value of uname() Fix prevent bug. --- packaging/net-config.spec | 2 +- src/utils/emulator.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packaging/net-config.spec b/packaging/net-config.spec index 99819e9..116d0d1 100644 --- a/packaging/net-config.spec +++ b/packaging/net-config.spec @@ -1,6 +1,6 @@ Name: net-config Summary: TIZEN Network Configuration Module -Version: 0.1.90_17 +Version: 0.1.90_18 Release: 1 Group: System/Network License: Apache License Version 2.0 diff --git a/src/utils/emulator.c b/src/utils/emulator.c index f0b07da..5a04d7c 100644 --- a/src/utils/emulator.c +++ b/src/utils/emulator.c @@ -38,7 +38,8 @@ static gboolean __netconfig_emulator_test_emulation_env(void) DBG("Test emulation environment"); - uname(&buf); + if (uname(&buf) != 0) + return FALSE; if (g_str_has_suffix(buf.machine, EMUL_UTSNAME_MACHINE_SUFFIX) == TRUE) return TRUE; -- 2.34.1