Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct IT_SAMPLE
- {
- ...
- unsigned char filename[14];
- ...
- };
- static int it_riff_dsmf_process_sample(
- IT_SAMPLE * sample, const unsigned char * data, int len)
- {
- int flags;
- memcpy( sample->filename, data, 13 );
- sample->filename[ 14 ] = 0;
- ...
- }
- This is what should have been written here: sample->filename[ 13 ] = 0;
- This suspicious code was found in dumb project by PVS-Studio static code analyzer.
- Warning message is:
- V557 Array overrun is possible. The '14' index is pointing beyond array bound. dumb_static readdsmf.c 34
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment