瀏覽代碼

Fix possible buffer overflow in LoadBMFont

Width specifier doesn't include NUL terminator.
Fixes #487 found by AddressSanitizer.
pull/495/head
Ahmad Fatoum 8 年之前
父節點
當前提交
76aca9b0d1
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: C3EAC3DE9321D59B
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/text.c

+ 1
- 1
src/text.c 查看文件

@ -708,7 +708,7 @@ static SpriteFont LoadBMFont(const char *fileName)
int fontSize = 0;
int texWidth, texHeight;
char texFileName[128];
char texFileName[129];
int charsCount = 0;
int base; // Useless data

Loading…
取消
儲存