github / github/codeql

LGTM.com - false positive Multiplication result may overflow 'int' before it is converted to 'size_t'.

Open
#3,015 4 comments 0 reactions 0 assignees View on GitHub
C++ false-positive
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

It doesn't seem to understand bounds checking before conversion, or that the value returns with the thrown exception I guess:
https://lgtm.com/projects/g/sandsmark/genieutils/snapshot/83dc9ec17bc36ac8f77bbbf82fae9ffbbd6ceeca/files/src/resource/SmxFrame.cpp?sort=name&dir=ASC&mode=heatmap#L145

y is checked right before, m_normalHeader.width is checked before the loop (line 116).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.