Fix #7553: check bounds when loading strings (#7554)

(cherry picked from commit cef9a76c3f)
This commit is contained in:
glx22
2019-05-01 19:12:37 +02:00
committed by Jonathan G Rennison
parent 10c8104e70
commit 19a6829ea2
3 changed files with 17 additions and 11 deletions

View File

@@ -284,11 +284,13 @@
#define OTTD_PRINTF64U "%I64u"
#define OTTD_PRINTFHEX64 "%I64x"
#define PRINTF_SIZE "%Iu"
#define PRINTF_SIZEX "%IX"
#else
#define OTTD_PRINTF64 "%lld"
#define OTTD_PRINTF64U "%llu"
#define OTTD_PRINTFHEX64 "%llx"
#define PRINTF_SIZE "%zu"
#define PRINTF_SIZEX "%zX"
#endif
typedef unsigned char byte;