Skip to content

Commit 9990604

Browse files
authored
Merge pull request rdkcentral#6143 from hgfell683/main
SERXIONE-6937: SystemServices Crash
2 parents f0d82ec + c51ff78 commit 9990604

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

SystemServices/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.
1616

1717
* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.
1818

19+
## [3.4.4] - 2025-05-28
20+
### Security
21+
- Added catch to handle crash when reading territory
22+
1923
## [3.4.3] - 2025-01-02
2024
### Security
2125
- Resolved security vulnerabilities

SystemServices/SystemServices.cpp

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ using namespace std;
6767

6868
#define API_VERSION_NUMBER_MAJOR 3
6969
#define API_VERSION_NUMBER_MINOR 4
70-
#define API_VERSION_NUMBER_PATCH 3
70+
#define API_VERSION_NUMBER_PATCH 4
7171

7272
#define MAX_REBOOT_DELAY 86400 /* 24Hr = 86400 sec */
7373
#define TR181_FW_DELAY_REBOOT "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AutoReboot.fwDelayReboot"
@@ -2711,7 +2711,8 @@ namespace WPEFramework {
27112711
bool SystemServices::readTerritoryFromFile()
27122712
{
27132713
bool retValue = true;
2714-
if(Utils::fileExists(TERRITORYFILE)){
2714+
try{
2715+
if(Utils::fileExists(TERRITORYFILE)){
27152716
ifstream inFile(TERRITORYFILE);
27162717
string str;
27172718
getline (inFile, str);
@@ -2744,9 +2745,16 @@ namespace WPEFramework {
27442745
}
27452746
inFile.close();
27462747

2747-
}else{
2748-
LOGERR("Territory is not set");
2749-
}
2748+
}else{
2749+
LOGERR("Territory is not set");
2750+
}
2751+
}
2752+
catch(...){
2753+
LOGERR("Exception caught while reading territory file");
2754+
retValue = false;
2755+
m_strTerritory = "";
2756+
m_strRegion = "";
2757+
}
27502758
return retValue;
27512759
}
27522760

0 commit comments

Comments
 (0)