Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void addAttribute(....)
- {
- ...
- int index = _snprintf(temp, 1023,
- "%02x%02x:%02x%02x:%02x%02x:%02x%02x:"
- "%02x%02x:02x%02x:%02x%02x:%02x%02x",
- value[0],value[1],value[2],value[3],value[4],
- value[5],value[6],value[7],value[8],
- value[9],value[10],value[11],value[12],
- value[13],value[14],value[15]);
- ...
- }
- One of the arguments is 02X instead of %02X.
- This suspicious code was found in amtsdk project by PVS-Studio static code analyzer.
- Warning message is:
- V576 Incorrect format. A different number of actual arguments is expected while calling '_snprintf' function. Expected: 18. Present: 19. mod_pvs mod_pvs.cpp 308
- 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