From baa3641d5f8e64288f45432d6e4989701dbbcc0f Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Thu, 17 Oct 2024 09:31:12 +0530 Subject: msm8996-common: Import newer GPS stack from xiaomi_msm8996-common Change-Id: I5afe78048c4af3648b2d267d71a58b63b9decbc9 --- gps/utils/LocThread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gps/utils/LocThread.cpp') diff --git a/gps/utils/LocThread.cpp b/gps/utils/LocThread.cpp index c1052cb..568a6bb 100644 --- a/gps/utils/LocThread.cpp +++ b/gps/utils/LocThread.cpp @@ -85,8 +85,8 @@ LocThreadDelegate::LocThreadDelegate(LocThread::tCreate creator, if (mThandle) { // set thread name char lname[16]; - int len = (sizeof(lname)>sizeof(threadName)) ? - (sizeof(threadName) -1):(sizeof(lname) - 1); + int len = (sizeof(lname) > (strlen(threadName) + 1)) ? + (strlen(threadName)):(sizeof(lname) - 1); memcpy(lname, threadName, len); lname[len] = 0; // set the thread name here -- cgit v1.2.3