Skip to content

Commit

Permalink
Avoids possible multiplication overflow warning
Browse files Browse the repository at this point in the history
  • Loading branch information
isayrdgl authored May 25, 2024
1 parent 015ee1d commit fcb15d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion filesys/miniFilter/scanner/user/scanUser.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ main (
// Allocate messages.
//

messages = calloc(threadCount * requestCount, sizeof(SCANNER_MESSAGE));
messages = calloc((DWORD) threadCount * requestCount, sizeof(SCANNER_MESSAGE));

Check failure

Code scanning / CodeQL

Multiplication result converted to larger type High

Multiplication result may overflow 'unsigned long' before it is converted to 'size_t'.

if (messages == NULL) {

Expand Down

0 comments on commit fcb15d6

Please sign in to comment.