Avoid dereferencing pointer right after the end
authorWerner Koch <wk@gnupg.org>
Mon, 5 Nov 2012 18:01:01 +0000 (19:01 +0100)
committerWerner Koch <wk@gnupg.org>
Mon, 5 Nov 2012 18:01:01 +0000 (19:01 +0100)
commit79502e2c1982047dcf2b776f52826f38bbd9b1fe
tree2d1190f2446185981cccf2b2242e352a561c9ee6
parent66adf76e634423bb72ce1f0b5ed78f4e4798f190
Avoid dereferencing pointer right after the end

* mpi/mpicoder.c (do_get_buffer): Check the length before derefing P.
--

Christian Grothoff found this bug using Valgrind.
mpi/mpicoder.c