From d3d10527b5aa318e051b5ea4ce9f0c6febea4799 Mon Sep 17 00:00:00 2001 From: Abineshwari DeviRajagopal Date: Thu, 14 Aug 2025 12:04:30 +0530 Subject: [PATCH] Add non-empty string check --- src/pods/impl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pods/impl.c b/src/pods/impl.c index ca6218c..54f2ad1 100644 --- a/src/pods/impl.c +++ b/src/pods/impl.c @@ -493,7 +493,8 @@ int get_id_pstore(int id_chk, char *id_type) { // Return based on id_chk if (id_chk == 0) { - if (foundAccount) { + + if ((foundAccount) && (accountId[0] != '\0')) { cpeabStrncpy(id_type, accountId, BFR_SIZE_64*sizeof(char)); return RETURN_OK; } else { @@ -501,7 +502,7 @@ int get_id_pstore(int id_chk, char *id_type) { return RETURN_ERR; } } else if (id_chk == 1) { - if (foundPartner) { + if ((foundPartner) && (partnerId[0] != '\0')) { cpeabStrncpy(id_type, partnerId, BFR_SIZE_64*sizeof(char)); return RETURN_OK; } else {