Fix possible buffer overflow in LoadBMFont
Width specifier doesn't include NUL terminator. Fixes #487 found by AddressSanitizer.
This commit is contained in:
parent
c5f7863689
commit
76aca9b0d1
1 changed files with 1 additions and 1 deletions
|
@ -708,7 +708,7 @@ static SpriteFont LoadBMFont(const char *fileName)
|
||||||
|
|
||||||
int fontSize = 0;
|
int fontSize = 0;
|
||||||
int texWidth, texHeight;
|
int texWidth, texHeight;
|
||||||
char texFileName[128];
|
char texFileName[129];
|
||||||
int charsCount = 0;
|
int charsCount = 0;
|
||||||
|
|
||||||
int base; // Useless data
|
int base; // Useless data
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue