diff options
| author | jsing <> | 2014-06-22 14:41:10 +0000 |
|---|---|---|
| committer | jsing <> | 2014-06-22 14:41:10 +0000 |
| commit | 960a8f081914b4238bec3ed7791e4fdaf81ab7a1 (patch) | |
| tree | a48d59c793ed018ac1b68d77e5b9dc0708d3bc84 /src/lib/libcrypto/bio/bio.h | |
| parent | 440ff25a446d028b864136cc92f0469572b7d187 (diff) | |
| download | openbsd-960a8f081914b4238bec3ed7791e4fdaf81ab7a1.tar.gz openbsd-960a8f081914b4238bec3ed7791e4fdaf81ab7a1.tar.bz2 openbsd-960a8f081914b4238bec3ed7791e4fdaf81ab7a1.zip | |
In BIO_get_port(), use strol() with appropriate range checks rather than
an atoi() followed by an unsigned short cast. This stops things like "-1"
and "66536" from being considered to be "valid" port numbers.
ok beck@ deraadt@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/bio/bio.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h index 2ec6119aaa..cc5ef618b5 100644 --- a/src/lib/libcrypto/bio/bio.h +++ b/src/lib/libcrypto/bio/bio.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bio.h,v 1.23 2014/06/12 15:49:28 deraadt Exp $ */ | 1 | /* $OpenBSD: bio.h,v 1.24 2014/06/22 14:41:10 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -802,6 +802,7 @@ void ERR_load_BIO_strings(void); | |||
| 802 | #define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET 107 | 802 | #define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET 107 |
| 803 | #define BIO_R_INVALID_ARGUMENT 125 | 803 | #define BIO_R_INVALID_ARGUMENT 125 |
| 804 | #define BIO_R_INVALID_IP_ADDRESS 108 | 804 | #define BIO_R_INVALID_IP_ADDRESS 108 |
| 805 | #define BIO_R_INVALID_PORT_NUMBER 129 | ||
| 805 | #define BIO_R_IN_USE 123 | 806 | #define BIO_R_IN_USE 123 |
| 806 | #define BIO_R_KEEPALIVE 109 | 807 | #define BIO_R_KEEPALIVE 109 |
| 807 | #define BIO_R_NBIO_CONNECT_ERROR 110 | 808 | #define BIO_R_NBIO_CONNECT_ERROR 110 |
