commit | c042cf00133763f863b290418c4dca45e3c41f0b | [log] [tgz] |
---|---|---|
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | Wed Mar 26 14:12:20 2014 +0100 |
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | Wed Mar 26 14:12:20 2014 +0100 |
tree | 3044dffa76584e2ed7cffaee014ba8c018b66a1b | |
parent | df5024c0dd14ac0308e22a5dd1345085100cdf5c [diff] |
Fix broken tests due to changed error code Introduced in 5246ee5c59906fc4b021ceab63f09afdedbc66b8
diff --git a/library/ecp.c b/library/ecp.c index 7cfb44f..d742e81 100644 --- a/library/ecp.c +++ b/library/ecp.c
@@ -483,8 +483,13 @@ int ret; size_t plen; - if( ilen == 1 && buf[0] == 0x00 ) - return( ecp_set_zero( pt ) ); + if( buf[0] == 0x00 ) + { + if( ilen == 1 ) + return( ecp_set_zero( pt ) ); + else + return( POLARSSL_ERR_ECP_BAD_INPUT_DATA ); + } plen = mpi_size( &grp->P );