Bug#820591: libgmp-dev: realloc() with invalid pointer

Jakub Wilk jwilk at debian.org
Sun Apr 10 11:56:13 UTC 2016


* Michele Orru` <maker at python.it>, 2016-04-10, 13:33:
>  for (int j = 0; j < argc-1; ++j) {
>    mpz_set_str(key[j], argv[j], 2);

mpz_set_str() works only on objects that are already initialized.
You want mpz_init_set_str() instead.
Also, it should probably be argv[j + 1].

-- 
Jakub Wilk



More information about the debian-science-maintainers mailing list