diff --git a/.pvs-suppress b/.pvs-suppress index 92f28451..4a3c8c05 100644 --- a/.pvs-suppress +++ b/.pvs-suppress @@ -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'." }, { diff --git a/src/libs/decoders/mp3_seek_table.cpp b/src/libs/decoders/mp3_seek_table.cpp index 6d9de3c0..0ace00ce 100644 --- a/src/libs/decoders/mp3_seek_table.cpp +++ b/src/libs/decoders/mp3_seek_table.cpp @@ -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(stream_size); XXH64_reset(state, seed);