Iterate over EC_GROUP's poly array in a safe way
authorRich Salz <rsalz@openssl.org>
Wed, 22 Feb 2017 18:11:08 +0000 (13:11 -0500)
committerRich Salz <rsalz@openssl.org>
Wed, 22 Feb 2017 18:16:09 +0000 (13:16 -0500)
commitea63fdda830b883314e163283e90db66ec3b7876
tree27f64a4a69cc9a45271c96c92094449df50e0838
parent90670b54c493c04c830ac38e9cfd7acf8fac4012
Iterate over EC_GROUP's poly array in a safe way

Prevent that memory beyond the last element is accessed if every element
of group->poly[] is non-zero

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2689)

(cherry picked from commit 57f48f939ed5d3119e3c691ea0a8a3ac2f4a1a9e)
crypto/ec/ec_asn1.c