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 4eedf5e

Browse filesBrowse files
mhdawsonRafaelGSS
authored andcommitted
module: fix recently introduced coverity warning
Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #50843 Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent fdd8c18 commit 4eedf5e
Copy full SHA for 4eedf5e

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Open diff view settings
Collapse file

‎src/node_modules.cc‎

Copy file name to clipboardExpand all lines: src/node_modules.cc
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ const BindingData::PackageConfig* BindingData::GetPackageJSON(
153153
return throw_invalid_package_config();
154154
}
155155

156+
// based on coverity using key with == derefs the raw value
157+
// avoid derefing if its null
158+
if (key.raw() == nullptr) continue;
159+
156160
if (key == "name") {
157161
// Though there is a key "name" with a corresponding value,
158162
// the value may not be a string or could be an invalid JSON string

0 commit comments

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