[Commits] [wesnoth/wesnoth] 81efa3: md5: Return a NULL pointer if MD5::raw_digest() is...

GitHub noreply at github.com
Tue Jun 2 22:36:57 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 81efa398c1133e21737537f619fb03203b282141
      https://github.com/wesnoth/wesnoth/commit/81efa398c1133e21737537f619fb03203b282141
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2015-06-02 (Tue, 02 Jun 2015)

  Changed paths:
    M src/md5.cpp

  Log Message:
  -----------
  md5: Return a NULL pointer if MD5::raw_digest() is called early

This never happens since MD5::raw_digest()'s only caller, util::md5(),
always does it right. However, it's still an open invitation for someone
to read garbage past the end of a 1 byte array, or even worse, write
into it. I'd rather have us crash by dereferencing the null page in that
case instead.





More information about the Commits mailing list