Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define HBIN_HDR_SIZE 4
- char header[HBIN_HDR_SIZE];
- static REGF_HBIN* regf_hbin_allocate(REGF_FILE *file,
- uint32 block_size)
- {
- REGF_HBIN *hbin;
- ....
- memcpy( hbin->header, "hbin", sizeof(HBIN_HDR_SIZE) );
- ....
- }
- It works. Good luck: sizeof(4) == 4.
- This suspicious code was found in samba project by PVS-Studio static code analyzer.
- Warning message is:
- V627 Consider inspecting the expression. The argument of sizeof() is the macro which expands to a number. regfio.c 1470
- 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