Sonar-scanner can`t check array out of range cond in C

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
  • Developer Edition
  • Version 8.1 (build 31237)
  • SonarCFamily 6.6
  • error observed (wrap logs/code around triple quote ``` for proper formatting)
  • steps to reproduce
  • potential workaround


When i run sonar-scanner in ubuntu, it can`t check wrong c code

below is sample c code… and i attached sonar-scanner log.scan-log.txt (6.8 KB)

can sonar-scanner check this case ?

P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour

Hello @jargon,

Thanks for reporting this.

We currently don’t detect this test case. We are working on improving this rule to detect cases similar to yours. Currently, there is no ETA.