Fix DIVIDE_BY_ZERO issue 71/319071/1 accepted/tizen_unified_x_asan accepted/tizen/unified/20250205.095549 accepted/tizen/unified/20250205.113527 accepted/tizen/unified/x/20250212.043830 accepted/tizen/unified/x/asan/20250211.003435
authorchaehee.hong <chaehee.hong@samsung.com>
Tue, 4 Feb 2025 02:19:27 +0000 (11:19 +0900)
committerchaehee.hong <chaehee.hong@samsung.com>
Tue, 4 Feb 2025 02:19:41 +0000 (11:19 +0900)
Change-Id: I0ab089094b225fd3ea4c7b507f9c3a4f0a2ae3d0

src/inm-netlink.c

index 7ef6a80adaa3c8189ed8d846b5222538cbe902d6..bbc4f843d9792611dfb74855119f13763de64638 100644 (file)
@@ -833,6 +833,12 @@ static int nl_station_info(struct nl_msg* msg, void *user_data)
                        g_htmode = INMMANAGER_HTMODE_HT80;
        }
 
+       if (tx_packets == 0) {
+               INM_LOGE("tx_packets is 0.");
+               g_htmode = INMMANAGER_HTMODE_UNKNOWN;
+               __INM_FUNC_EXIT__;
+               return -1;
+       }
        retry_rate = (tx_retries/tx_packets) * 100;
 
        if (data->tx_cb)