Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-04-22 20:44:42 +0300
committerAdam Langley <agl@google.com>2015-05-05 01:58:38 +0300
commitde95d262ab448f8582b8192c3a94e9c10acdb771 (patch)
tree12c67e2234509625ffd79fe96b75329bc5cb6cc6 /crypto/bio
parent5d1ec73b0f3e21c9aae8c8253d5213e3d433959a (diff)
Add missing BUF_strdup failure checks.
Change-Id: I997e8806b0bccb58fe7b8bbea4e98c68d0925361 Reviewed-on: https://boringssl-review.googlesource.com/4513 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/bio')
-rw-r--r--crypto/bio/connect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/bio/connect.c b/crypto/bio/connect.c
index 82f6a7e2..1ef08ed0 100644
--- a/crypto/bio/connect.c
+++ b/crypto/bio/connect.c
@@ -430,11 +430,17 @@ static long conn_ctrl(BIO *bio, int cmd, long num, void *ptr) {
OPENSSL_free(data->param_hostname);
}
data->param_hostname = BUF_strdup(ptr);
+ if (data->param_hostname == NULL) {
+ ret = 0;
+ }
} else if (num == 1) {
if (data->param_port != NULL) {
OPENSSL_free(data->param_port);
}
data->param_port = BUF_strdup(ptr);
+ if (data->param_port == NULL) {
+ ret = 0;
+ }
} else {
ret = 0;
}