1
0
Fork 0

Update the existing PVS false-positives for xxHash v0.7.3

This commit is contained in:
krcroft 2020-03-06 12:47:00 -08:00 committed by Patryk Obara
parent 355b6faba7
commit 27538eeb2e
2 changed files with 8 additions and 4 deletions

View file

@ -6,7 +6,7 @@
"CodeNext": 355817,
"CodePrev": 1212132082,
"ErrorCode": "V512",
"FileName": "xxhash.c",
"FileName": "xxhash.h",
"Message": "A call of the 'memcpy' function will lead to underflow of the buffer 'statePtr'."
},
{
@ -14,7 +14,7 @@
"CodeNext": 355817,
"CodePrev": 1212132082,
"ErrorCode": "V512",
"FileName": "xxhash.c",
"FileName": "xxhash.h",
"Message": "A call of the 'memcpy' function will lead to underflow of the buffer '& state'."
},
{
@ -22,7 +22,7 @@
"CodeNext": 355817,
"CodePrev": 1162686117,
"ErrorCode": "V512",
"FileName": "xxhash.c",
"FileName": "xxhash.h",
"Message": "A call of the 'memcpy' function will lead to underflow of the buffer 'statePtr'."
},
{
@ -30,7 +30,7 @@
"CodeNext": 355817,
"CodePrev": 1162686117,
"ErrorCode": "V512",
"FileName": "xxhash.c",
"FileName": "xxhash.h",
"Message": "A call of the 'memcpy' function will lead to underflow of the buffer '& state'."
},
{

View file

@ -150,6 +150,10 @@ Uint64 calculate_stream_hash(struct SDL_RWops* const context) {
// have the same trailing 32KB of content. The different seeds will produce
// unique hashes.
XXH64_state_t* const state = XXH64_createState();
if(!state) {
return 0;
}
const uint64_t seed = static_cast<uint64_t>(stream_size);
XXH64_reset(state, seed);