From fd35af157926ab3d038818929dc9979cdcc48dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 23 Jun 2014 14:10:13 +0200 Subject: [PATCH] Fix off-by-one error in point format parsing --- ChangeLog | 2 ++ library/ssl_cli.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2651b0cbc..f22a14604 100644 --- a/ChangeLog +++ b/ChangeLog @@ -49,6 +49,8 @@ Bugfix * Fix preprocessor checks for bn_mul PPC asm (found by Barry K. Nathan). * Use \n\t rather than semicolons for bn_mul asm, since some assemblers interpret semicolons as comment delimiters (found by Barry K. Nathan). + * Fix off-by-one error in parsing Supported Point Format extension that + caused some handshakes to fail. = PolarSSL 1.3.7 released on 2014-05-02 Features diff --git a/library/ssl_cli.c b/library/ssl_cli.c index fda9ebf51..608140fe9 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -801,7 +801,7 @@ static int ssl_parse_supported_point_formats_ext( ssl_context *ssl, return( POLARSSL_ERR_SSL_BAD_HS_SERVER_HELLO ); } - p = buf + 2; + p = buf + 1; while( list_size > 0 ) { if( p[0] == POLARSSL_ECP_PF_UNCOMPRESSED ||