Fix a potential integer overflow bug that could result in memory overwrites.
Also add a check to the result of malloc()
1 file changed