Files @ r25360:c5efeb83c7e8
Branch filter:

Location: cpp/openttd-patchpack/source/src/newgrf.cpp

rubidium42
Fix: [Network] Reading beyond the length of the server's ID when hashing password

Under normal circumstances the server's ID is 32 characters excluding '\0', however this can be changed at the server. This ID is sent to the server for company name hashing. The client reads it into a statically allocated buffer of 33 bytes, but fills only the bytes it received from the server. However, the hash assumes all 33 bytes are set, thus potentially reading uninitialized data, or a part of the server ID of a previous game in the hashing routine.
It is still reading from memory assigned to the server ID, so nothing bad happens, except that company passwords might not work correctly.

File is too big to display. Show as raw.