Open
Conversation
```
aflibDebug.cc: In function ‘void _Z15display_messageN10aflibDebug5LevelEPKc.part.0(aflibDebug::Level, const char*)’:
aflibDebug.cc:124:42: warning: ‘
(The previous message was r...’ directive writing 36 bytes into a region of size between 1 and 1024 [-Wformat-overflow=]
124 | sprintf(buff, "%s\n(The previous message was repeated %d times.)", lastMsg, msgCount);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aflibDebug.cc:124:39: note: directive argument in the range [1, 2147483647]
124 | sprintf(buff, "%s\n(The previous message was repeated %d times.)", lastMsg, msgCount);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:980,
from aflibDebug.cc:26:
In function ‘int sprintf(char*, const char*, ...)’,
inlined from ‘void _Z15display_messageN10aflibDebug5LevelEPKc.part.0(aflibDebug::Level, const char*)’ at aflibDebug.cc:124:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:30:34: note: ‘__builtin___sprintf_chk’ output between 46 and 1078 bytes into a destination of size 1024
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
aflibDebug.cc: In function ‘void _Z15display_messageN10aflibDebug5LevelEPKc.part.0(aflibDebug::Level, const char*)’:
aflibDebug.cc:128:24: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 1024 equals destination size [-Wstringop-truncation]
128 | strncpy(lastMsg, msg, 1024);
| ^
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Address the overloaded-virtual warnings. And fix a few small things here and there.