Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve static analysis defects #67

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/gbs.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ repos = repo.70base, repo.70emul
buildroot = ~/GBS-ROOT/t70emul

[repo.70base]
url=http://download.tizen.org/snapshots/tizen/base/latest/repos/standard/packages/
url=http://download.tizen.org/snapshots/TIZEN/Tizen-7.0/Tizen-7.0-Base/reference/repos/standard/packages/

[repo.70std]
url=http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages/
url=http://download.tizen.org/snapshots/TIZEN/Tizen-7.0/Tizen-7.0-Unified/reference/repos/standard/packages/

[repo.70emul]
url=http://download.tizen.org/snapshots/tizen/unified/latest/repos/emulator/packages/
url=http://download.tizen.org/snapshots/TIZEN/Tizen-7.0/Tizen-7.0-Unified/reference/repos/emulator/packages/

############## Tizen 6.5 ##############
[profile.t65std]
Expand Down
4 changes: 3 additions & 1 deletion deps/node/src/memory_tracker-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ void MemoryTracker::TrackField(const char* edge_name,
const T& value,
const char* node_name) {
// For numbers, creating new nodes is not worth the overhead.
CurrentNode()->size_ += sizeof(T);
if (CurrentNode() != nullptr) {
CurrentNode()->size_ += sizeof(T);
}
}

template <typename T, typename U>
Expand Down
7 changes: 6 additions & 1 deletion src/lwnode/lwnode-loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ bool convertUTF8ToUTF16le(char** buffer,

size_t utf16Size = utf16.size() * 2;

*buffer = (char*)allocateStringBuffer(utf16Size + 1);
void* allocatedStringBuffer = allocateStringBuffer(utf16Size + 1);
if (allocatedStringBuffer == NULL) {
return false;
}

*buffer = static_cast<char*>(allocatedStringBuffer);
memcpy(*buffer, utf16.data(), utf16Size);
(*buffer)[utf16Size] = '\0';

Expand Down
Loading