[Commits] [wesnoth/wesnoth] f7bea5: Finish switch to MT19937 for randomness

GitHub noreply at github.com
Wed Oct 25 22:28:25 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: f7bea59fe9bb19aa578f2e1961ffbddd3189f611
      https://github.com/wesnoth/wesnoth/commit/f7bea59fe9bb19aa578f2e1961ffbddd3189f611
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2017-10-26 (Thu, 26 Oct 2017)

  Changed paths:
    M projectfiles/VC12/wesnoth.vcxproj
    M projectfiles/VC12/wesnoth.vcxproj.filters
    M projectfiles/VC12/wesnothlib.vcxproj
    M projectfiles/VC12/wesnothlib.vcxproj.filters
    M source_lists/libwesnoth_core
    M source_lists/wesnoth
    M src/actions/advancement.cpp
    M src/addon/client.cpp
    M src/ai/default/recruitment.cpp
    M src/ai/simulated_actions.cpp
    M src/display.cpp
    M src/formula/formula.cpp
    M src/play_controller.cpp
    M src/saved_game.cpp
    M src/server/user_handler.cpp
    M src/sound.cpp
    M src/soundsource.cpp
    M src/units/animation.cpp
    M src/units/animation_component.cpp
    M src/units/unit.cpp

  Log Message:
  -----------
  Finish switch to MT19937 for randomness

Coverity has been complaining about using rand() as an insecure function. As we're using it, this function is not insecure; but is also not a very good RNG. We're using MT19937 in a system-independant manner. But some uses of rand() were never converted. This converts them.

This closes the following Coverity issues:

CID 1356297
CID 1356299
CID 1356303
CID 1356304
CID 1356306
CID 1356312
CID 1356314
CID 1380163
CID 1380173
CID 1380179
CID 1380191
CID 1380198
CID 1380201
CID 1380210
CID 1380214
CID 1380215
CID 1380219
CID 1380230
CID 1380241





More information about the Commits mailing list