Files
@ r25360:c5efeb83c7e8
Branch filter:
Location: cpp/openttd-patchpack/source/regression/stationlist/result.txt
r25360:c5efeb83c7e8
1.8 KiB
text/plain
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.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
--StationList--
Count(): 5
Location ListDump:
6 => 42341
2 => 41831
7 => 41825
5 => 33421
4 => 33411
CargoWaiting(0) ListDump:
7 => 6
6 => 6
2 => 3
5 => 0
4 => 0
CargoWaiting(1) ListDump:
7 => 0
6 => 0
5 => 0
4 => 0
2 => 0
--StationList_Cargo--
0
0
6 => 6
1
6 => 2
2
2 => 4
7 => 2
3
1
0
7 => 18
6 => 16
2 => 7
1
6 => 8
2 => 3
2
2 => 16
6 => 14
7 => 11
3
6 => 10
2 => 8
--StationList_CargoPlanned--
0
7 => 18
6 => 16
2 => 7
1
6 => 8
2 => 3
2
2 => 16
6 => 14
7 => 11
3
6 => 10
2 => 8
--StationList_CargoPlannedByFrom--
7 => 8
6 => 8
2 => 7
--StationList_CargoPlannedByVia--
2 => 16
6 => 7
--StationList_CargoPlannedViaByFrom--
6 => 8
2 => 3
--StationList_CargoPlannedFromByVia--
6 => 10
2 => 8
--StationList_CargoWaiting--
0
6 => 6
1
6 => 2
2
2 => 4
7 => 2
3
--StationList_CargoWaitingByFrom--
2 => 3
--StationList_CargoWaitingByVia--
6 => 3
--StationList_CargoWaitingViaByFrom--
6 => 2
--StationList_CargoWaitingFromByVia--
6 => 3
--StationList_Vehicle--
Count(): 2
Location ListDump:
5 => 33421
4 => 33411
CargoWaiting(0) ListDump:
5 => 0
4 => 0
CargoWaiting(1) ListDump:
5 => 0
4 => 0
CargoRating(1) ListDump:
5 => -1
4 => -1
DistanceManhattanToTile(30000) ListDump:
5 => 106
4 => 96
DistanceSquareToTile(30000) ListDump:
5 => 8818
4 => 7058
IsWithinTownInfluence(0) ListDump:
5 => 0
4 => 0
ERROR: The script died unexpectedly.
|