Ticket #47762

Out of bounds write in advance_root_req_iter_next()

Date d'ouverture: 2023-04-04 18:46 Dernière mise à jour: 2023-04-06 14:22

Rapporteur:
Propriétaire:
Type:
État:
Atteints
Composant:
Priorité:
6
Sévérité:
5 - moyen
Résolution:
Fixed
Fichier:
1

Détails

On S3_0 flatpak build:

---
CC worklist.lo

In file included from ../../common/fc_types.h:22,

from ../../common/networking/connection.h:48, from ../../common/game.h:33, from ../../common/tech.c:32:

../../common/tech.c: In function ‘advance_root_req_iter_next’: ../../utility/bitvector.h:79:35: warning: writing 1 byte into a region of size 0 -Wstringop-overflow=

79 | (bv).vec_BV_BYTE_INDEX(bit) |= _BV_BITMASK(bit); \
| ~

../../common/tech.c:648:9: note: in expansion of macro ‘BV_SET’

648 | BV_SET(iter->done, advance_number(preq));
| ~

../../utility/bitvector.h:128:34: note: at offset 25 into destination object ‘vec’ of size 25

128 | typedef struct { unsigned char vec_BV_BYTES(bits); } name
|

../../common/tech.h:158:1: note: in expansion of macro ‘BV_DEFINE’

158 | BV_DEFINE(bv_techs, A_LAST);
|
---

Likely a regression with #46544

Ticket History (3/4 Histories)

2023-04-04 18:46 Updated by: cazfi
  • New Ticket "Out of bounds write in advance_root_req_iter_next()" created
2023-04-04 22:08 Updated by: cazfi
  • Propriétaire Update from (Aucun) to cazfi
  • Résolution Update from Aucun to Accepted
2023-04-06 14:22 Updated by: cazfi
  • État Update from Ouvert to Atteints
  • Résolution Update from Accepted to Fixed

Modifier

Please login to add comment to this ticket » Connexion