Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 09ecd1f

Browse filesBrowse files
Eugene OstroukhovFishrock123
authored andcommitted
inspector: fix coverity scan errors
PR-URL: #7324 Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com> Reviewed-By: ofrobots - Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
1 parent cbe5747 commit 09ecd1f
Copy full SHA for 09ecd1f

File tree

Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Open diff view settings
Collapse file

‎src/inspector_agent.cc‎

Copy file name to clipboardExpand all lines: src/inspector_agent.cc
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,11 @@ void SendTargentsListResponse(inspector_socket_t* socket, int port) {
110110
char buffer[sizeof(LIST_RESPONSE_TEMPLATE) + 4096];
111111
char title[2048]; // uv_get_process_title trims the title if too long
112112
int err = uv_get_process_title(title, sizeof(title));
113-
ASSERT_EQ(0, err);
113+
if (err != 0) {
114+
snprintf(title, sizeof(title), "Node.js");
115+
}
114116
char* c = title;
115-
while (!c) {
117+
while (*c != '\0') {
116118
if (*c < ' ' || *c == '\"') {
117119
*c = '_';
118120
}
@@ -322,6 +324,8 @@ AgentImpl::AgentImpl(Environment* env) : port_(0),
322324
int err;
323325
err = uv_sem_init(&start_sem_, 0);
324326
CHECK_EQ(err, 0);
327+
memset(&data_written_, 0, sizeof(data_written_));
328+
memset(&io_thread_req_, 0, sizeof(io_thread_req_));
325329
}
326330

327331
AgentImpl::~AgentImpl() {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.