Skip to content
  1. Apr 21, 1999
  2. Apr 20, 1999
  3. Apr 19, 1999
  4. Apr 18, 1999
  5. Apr 17, 1999
  6. Apr 16, 1999
  7. Apr 15, 1999
    • Dr. Stephen Henson's avatar
      Fix a horrible BN bug in bn_expand2 which caused BN_add_word() et al to fail · 953937bd
      Dr. Stephen Henson authored
      when they cause the destination to expand.
      
      To see how evil this is try this:
      
      #include <pem.h>
      main()
      {
      	BIGNUM *bn = NULL;
              int i;
      	bn = BN_new();
      	BN_hex2bn(&bn, "FFFFFFFF");
      	BN_add_word(bn, 1);
      	printf("Value %s\n", BN_bn2hex(bn));
      }
      
      This would typically fail before the patch.
      
      It also screws up if you comment out the BN_hex2bn line above or in any
      situation where BN_add_word() causes the number of BN_ULONGs in the result
      to change (try doubling the number of FFs).
      953937bd