diff options
| author | Ray <[email protected]> | 2020-02-17 00:47:05 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2020-02-17 00:47:05 +0100 |
| commit | 39e73ccc4d1a09c5276b2a575a65081002a1143c (patch) | |
| tree | 220f657112d556fed83a1d54b70e95ad679b6d61 /src/text.c | |
| parent | df4b55d657ebae239d01abd1966602d735a19244 (diff) | |
| download | raylib-39e73ccc4d1a09c5276b2a575a65081002a1143c.tar.gz raylib-39e73ccc4d1a09c5276b2a575a65081002a1143c.zip | |
[text] TextLength() security check
Diffstat (limited to 'src/text.c')
| -rw-r--r-- | src/text.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1147,7 +1147,10 @@ unsigned int TextLength(const char *text) { unsigned int length = 0; //strlen(text) - while (*text++) length++; + if (text != NULL) + { + while (*text++) length++; + } return length; } |
