Doing a mulitply of two 257 bit integers causes heap corruption

XMLWordPrintable

    • 1.0alpha
    • generic
    • generic
    • Not verified

      If you create two VPIntegers of 257 bits (one more than 256) and multiply them the heap will
      become corrupted.

      class x {
          public static void main(String Args[]) {
              VPInteger a = VPInteger.random(257);
              VPInteger b = VPInteger.random(257);

              System.out.println("This will fail.");
               a = a.mul(b);
              System.out.println("The heap is now corrupted.");
          }
      }

            Assignee:
            J. Duke
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: