Skip to content

Conversation

@ChrisCoxArt
Copy link
Contributor

Add extra check that the file length is not zero, to avoid a static analysis warning.
Fixes #452

Pull Request Checklist

  • Have you followed the guidelines in Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you built your Pull Request locally with the Build Instructions?
  • Have you added or updated relevant tests?
  • Have you added or updated relevant docs?

Add extra check that the file length is not zero, to avoid a static analysis warning.
Fixes #452
@ChrisCoxArt ChrisCoxArt requested a review from xsscx as a code owner January 6, 2026 23:24
@xsscx xsscx self-assigned this Jan 6, 2026
@xsscx xsscx added PR Pull Request Review in Process PR being Reviewed by Maintainers labels Jan 6, 2026
@xsscx xsscx changed the title check flen as well as buf before reading Fix: SAST Report of Memory error: Use of zero allocated at Tools/CmdLine/IccCommon/IccJsonUtil.cpp Jan 6, 2026
@xsscx xsscx added the Pending Merge Maintainer indicates Merge Pending and requests no further changes label Jan 6, 2026
Copy link
Member

@xsscx xsscx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tue Jan 6 11:40:02 PM UTC 2026

scan-build will next complain about a potential Leak.

Thank You for the Patch!!

@xsscx xsscx removed the Review in Process PR being Reviewed by Maintainers label Jan 6, 2026
@xsscx xsscx merged commit f4f85a0 into master Jan 6, 2026
23 checks passed
@xsscx xsscx added Merged Merged and removed Pending Merge Maintainer indicates Merge Pending and requests no further changes labels Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged Merged PR Pull Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SAST Report of Memory error: Use of zero allocated at Tools/CmdLine/IccCommon/IccJsonUtil.cpp:L444

3 participants