Skip to content

Commit fe2dc9d

Browse files
authored
DELIA-68225: Sync RDKEMW-1682 changes to RDK-V (rdkcentral#6295)
* DELIA-68225: Sync RDKEMW-1682 changes to RDK-V Reason for change: Fixing Coverity identified issues Test Procedure: Check for regression Risks: Low Signed-off-by:AkshayKumar_Gampa [email protected] * DELIA-68225: Sync RDKEMW-1682 changes to RDK-V Reason for change: Fixing Coverity identified issues Test Procedure: Check for regression Risks: Low Signed-off-by:AkshayKumar_Gampa [email protected] * DELIA-68225: Sync RDKEMW-1682 changes to RDK-V Reason for change: Fixing Coverity identified issues Test Procedure: Check for regression Risks: Low Signed-off-by:AkshayKumar_Gampa [email protected] * DELIA-68225: Sync RDKEMW-1682 changes to RDK-V Reason for change: Fixing Coverity identified issues Test Procedure: Check for regression Risks: Low Signed-off-by:AkshayKumar_Gampa [email protected]
1 parent 038a643 commit fe2dc9d

23 files changed

+62
-25
lines changed

MaintenanceManager/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+
## [1.0.44] - 2025-06-19
20+
### Fixed
21+
- Fixed coverity reported issues
22+
1923
## [1.0.43] - 2025-005-05
2024
### Fixed
2125
- Fixed stopMaintenance() jsonRPC API to set MAINTENANCE_ERROR only for an actively running Maintenance.

MaintenanceManager/MaintenanceManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ using namespace std;
6464

6565
#define API_VERSION_NUMBER_MAJOR 1
6666
#define API_VERSION_NUMBER_MINOR 0
67-
#define API_VERSION_NUMBER_PATCH 43
67+
#define API_VERSION_NUMBER_PATCH 44
6868
#define SERVER_DETAILS "127.0.0.1:9998"
6969

7070
#define PROC_DIR "/proc"
@@ -1185,7 +1185,7 @@ namespace WPEFramework
11851185
* activated - run normal */
11861186
bool ret_result = false;
11871187
string activationStatus;
1188-
Auth_activation_status_t result;
1188+
Auth_activation_status_t result = INVALID_ACTIVATION;
11891189
const std::unordered_map<std::string, std::function<void()>> act{
11901190
{"activation-connect", [&]()
11911191
{ result = ACTIVATION_CONNECT; }},

Miracast/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ All notable changes to this RDK Service will be documented in this file.
1313
Changes in CHANGELOG should be updated when commits are added to the main or release branches. There should be one CHANGELOG entry per JIRA Ticket. This is not enforced on sprint branches since there could be multiple changes for the same JIRA ticket during development.
1414

1515
For more details, refer to versioning section under Main README.
16+
## [1.0.13] - 2025-06-19
17+
### Fixed
18+
- Fixed coverity reported issues
19+
1620
## [1.0.12] - 2025-01-02
1721
### Security
1822
- Resolved security vulnerabilities

Miracast/MiracastService/MiracastService.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ using namespace std;
6060

6161
#define API_VERSION_NUMBER_MAJOR 1
6262
#define API_VERSION_NUMBER_MINOR 0
63-
#define API_VERSION_NUMBER_PATCH 12
63+
#define API_VERSION_NUMBER_PATCH 13
6464

6565
#define SERVER_DETAILS "127.0.0.1:9998"
6666
#define SYSTEM_CALLSIGN "org.rdk.System"

Miracast/common/MiracastLogger.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ namespace MIRACAST
3434
setvbuf(stdout, NULL, _IOLBF, 0);
3535
}
3636

37-
const char *methodName(const std::string &prettyFunction)
37+
std::string methodName(const std::string &prettyFunction)
3838
{
3939
size_t colons = prettyFunction.find("::");
4040
size_t begin = prettyFunction.substr(0, colons).rfind(" ") + 1;
4141
size_t end = prettyFunction.rfind("(") - begin;
4242

43-
return prettyFunction.substr(begin, end).c_str();
43+
return prettyFunction.substr(begin, end);
4444
}
4545

4646
static int gDefaultLogLevel = INFO_LEVEL;

Miracast/common/MiracastLogger.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
namespace MIRACAST {
3333

34-
const char* methodName(const std::string& prettyFunction);
34+
std::string methodName(const std::string& prettyFunction);
3535
#define __METHOD_NAME__ MIRACAST::methodName(__PRETTY_FUNCTION__)
3636

3737
/**

RustAdapter/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+
## [1.0.5] - 2025-06-19
20+
### Fixed
21+
- Fixed coverity reported issues
22+
1923
## [1.0.4] - 2024-05-31
2024
### Changed
2125
- RDK-45345: Upgrade Sky Glass devices to use Thunder R4.4.1

RustAdapter/LocalPlugin.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,18 @@ namespace {
5959

6060
char *ld_paths = getenv("LD_LIBRARY_PATH");
6161
if (ld_paths) {
62-
ld_paths = strdup(ld_paths);
62+
char *ld_pathBackup = strdup(ld_paths);
63+
ld_paths = ld_pathBackup;
6364

6465
char *p = nullptr;
6566
char *saveptr = nullptr;
6667
while ((p = strtok_r(ld_paths, ":", &saveptr)) != nullptr) {
6768
paths.push_back(string(p));
6869
ld_paths = nullptr;
6970
}
70-
free(ld_paths);
71+
if (ld_pathBackup) {
72+
free(ld_pathBackup);
73+
}
7174
}
7275
return paths;
7376
}

RustAdapter/RustAdapter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#define API_VERSION_NUMBER_MAJOR 1
2626
#define API_VERSION_NUMBER_MINOR 0
27-
#define API_VERSION_NUMBER_PATCH 1
27+
#define API_VERSION_NUMBER_PATCH 5
2828

2929
namespace WPEFramework {
3030
namespace {

RustAdapter/SocketServer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,13 @@ int SocketServer::Open(const string& address, int port, const function<void (con
110110
if (rc == 0)
111111
{
112112
LOGERR("SocketServer::Open inet_pton %s invalid ip format", address.c_str());
113+
close(sock);
113114
return -1;
114115
}
115116
else if (rc < 0)
116117
{
117118
LOGERR("SocketServer::Open inet_pton %s failed: %s", address.c_str(), strerror(errno));
119+
close(sock);
118120
return -1;
119121
}
120122

@@ -124,6 +126,7 @@ int SocketServer::Open(const string& address, int port, const function<void (con
124126
if (sock_flags < 0)
125127
{
126128
LOGERR("SocketServer::Open fcntl get failed: %s", strerror(errno));
129+
close(sock);
127130
return -1;
128131
}
129132

@@ -132,18 +135,21 @@ int SocketServer::Open(const string& address, int port, const function<void (con
132135
if (fcntl(sock, F_SETFD, sock_flags) < 0)
133136
{
134137
LOGERR("SocketServer::Open fcntl set failed: %s", strerror(errno));
138+
close(sock);
135139
return -1;
136140
}
137141

138142
if (bind(sock, (struct sockaddr*)&addr, sizeof(addr)) < 0)
139143
{
140144
LOGERR("SocketServer::Open bind failed: %s", strerror(errno));
145+
close(sock);
141146
return -1;
142147
}
143148

144149
if (listen(sock, 4) < 0)
145150
{
146151
LOGERR("SocketServer::Open listen failed: %s", strerror(errno));
152+
close(sock);
147153
return -1;
148154
}
149155

0 commit comments

Comments
 (0)