Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. "Read more...":https://support.plan.io/news/187

Bug #894423

closed

gcc-11: stringop-overread at edithand.c strncmp() about scenario.authors

Added by Marko Lindqvist over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Server
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Compiling with gcc-11 development snapshot:

../../../src/server/edithand.c: In function 'handle_edit_game':
../../../src/server/edithand.c:1403:12: error: 'strncmp' specified bound 4096 exceeds source size 1365 [-Werror=stringop-overread]
1403 | if (0 != strncmp(packet->scenario_authors, game.scenario.authors, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1404 | MAX_LEN_PACKET)) { | ~~~~~~~~~~~~~


Files

Actions #2

Updated by Marko Lindqvist over 2 years ago

- Use size of only one of game.scenario.authors and packet->scenario_authors
- Added static assert that game.scenario.authors and packet->scenario_authors are same size

Actions #3

Updated by Marko Lindqvist over 2 years ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF