github / github/codeql

False positive

オープン
#13,464 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
C++ false-positive
主要言語
CodeQL
スター
10.1k
フォーク
2.1k
平均マージ
2日 15時間
マージ済み PR(30日)
141

説明

**Description of the false positive**

The error

This 'call to strcpy_s' operation is limited to 512 bytes but the destination is only 256 bytes.

Somehow it is getting a different size for sizeof and the actual size of the array. Not sure why it thinks they are different sizes when it's the same physical array. Code is below.

**Code samples or links to source code**

// Get the full device path
char devPath[ 256 ];
strcpy_s( devPath, sizeof( devPath ), pDetData->DevicePath );

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。