Austyn Krutsinger <akrutsin...@gmail.com> writes: > I think the attached patch provides a reasonable solution. The only > function effected is mpn_set_str_other() and since this particular function > is unique to mini-gmp,
I'm looking into this now. I'm leaning towards lettong mpn_set_str_other return 1 for all-zero input, and let the caller, mpz_set_str, deal with normalization (mpn_set_str doesn't need to, since it doesn't promise normalization if the input has leading zeros). I also found another corner case where the current implementation is broken: Calling mpz_set_str with an empty string as input. Have to check if the real gmp treats that as invalid or as zero. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. _______________________________________________ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs