mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-22 02:31:28 +00:00
Buffer overflow!
This commit is contained in:
parent
bbffdde2dc
commit
560b45dd16
1 changed files with 1 additions and 1 deletions
2
util.c
2
util.c
|
@ -425,7 +425,7 @@ static GMQCC_INLINE void mt_generate(void) {
|
|||
* Said loop has been unrolled for MT_SPACE (226 iterations), opposed
|
||||
* to [0, MT_SIZE) (634 iterations).
|
||||
*/
|
||||
for (i = 0; i < MT_SPACE; ++i) {
|
||||
for (i = 0; i < MT_SPACE-1; ++i) {
|
||||
y = (0x80000000 & mt_state[i]) | (0x7FFFFFF & mt_state[i + 1]);
|
||||
mt_state[i] = mt_state[i + MT_PERIOD] ^ (y >> 1) ^ matrix[y & 1];
|
||||
|
||||
|
|
Loading…
Reference in a new issue