Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct {
- const char* (*func)(request_rec *r,char *arg);
- char *arg;
- } format_tag;
- static char *parse_format_tag(apr_pool_t *p,
- format_tag *tag,
- const char **sa)
- {
- ...
- tag->arg = '\0';
- ...
- }
- This is what should have been written here: tag->arg = NULL; or tag->arg[0] = '\0';.
- This suspicious code was found in Apache project by PVS-Studio static code analyzer.
- Warning message is:
- V527 It is odd that the '\0' value is assigned to 'char' type pointer. Probably meant: *tag->arg = '\0'. mod_headers mod_headers.c 330
- 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