[phobos] [D-Programming-Language/phobos] 8f1324: Fix issue 11583.

GitHub noreply at github.com
Wed Dec 4 23:46:56 PST 2013


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/phobos
  Commit: 8f132413dd17114ab8a1f1bb1589098602f785a6
      https://github.com/D-Programming-Language/phobos/commit/8f132413dd17114ab8a1f1bb1589098602f785a6
  Author: H. S. Teoh <hsteoh at quickfur.ath.cx>
  Date:   2013-12-04 (Wed, 04 Dec 2013)

  Changed paths:
    M std/bigint.d
    M std/internal/math/biguintcore.d

  Log Message:
  -----------
  Fix issue 11583.

The problem is that the assumption that the first word of a BigUint is
always non-zero is false when BigUint == biguintcore.ZERO, which is
defined to be [0]. So we need to check for that case in
BigUint.opCmp(ulong).

Also, crash-proof BigUint's invariant, since it would cause an
out-of-bounds array access if a bug causes data.length==0.


  Commit: 5ef0d3428fd8fd1f11d5469f1330ffa963018e50
      https://github.com/D-Programming-Language/phobos/commit/5ef0d3428fd8fd1f11d5469f1330ffa963018e50
  Author: monarch dodra <monarchdodra at gmail.com>
  Date:   2013-12-04 (Wed, 04 Dec 2013)

  Changed paths:
    M std/bigint.d
    M std/internal/math/biguintcore.d

  Log Message:
  -----------
  Merge pull request #1715 from quickfur/issue11583

Fix issue 11583.


Compare: https://github.com/D-Programming-Language/phobos/compare/ea8ad5912133...5ef0d3428fd8


More information about the phobos mailing list