Procházet zdrojové kódy

Fix possible buffer overflow in LoadBMFont

Width specifier doesn't include NUL terminator.
Fixes #487 found by AddressSanitizer.
pull/495/head
Ahmad Fatoum před 7 roky
rodič
revize
76aca9b0d1
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: C3EAC3DE9321D59B
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. +1
    -1
      src/text.c

+ 1
- 1
src/text.c Zobrazit soubor

@ -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

Načítá se…
Zrušit
Uložit