Skip to content

Conversation

@fliiiix
Copy link

@fliiiix fliiiix commented Jan 15, 2026

Address the overloaded-virtual warnings. And fix a few small things here and there.

```
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);
      |                        ^
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant