待辦事項 #47762

Out of bounds write in advance_root_req_iter_next()

啟用日期: 2023-04-04 18:46 最後更新: 2023-04-06 14:22

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
優先權:
6
嚴重程度:
5 - 中
處理結果:
修正
檔案:
1

細節

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
  • 負責人 Update from (無) to cazfi
  • 處理結果 Update from to Accepted
2023-04-06 14:22 Updated by: cazfi
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from Accepted to 修正

編輯

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » 登入