diff options
author | 2015-06-21 16:10:45 +0000 | |
---|---|---|
committer | 2015-06-21 16:10:45 +0000 | |
commit | 0d289efd8e15b50466df7a88cafe699f2aeca835 (patch) | |
tree | 02da530b28429eabd5657c3d054c27c8f6d1d068 /lib/libssl/src | |
parent | When encoding the Location url, only encode the query and path (diff) | |
download | wireguard-openbsd-0d289efd8e15b50466df7a88cafe699f2aeca835.tar.xz wireguard-openbsd-0d289efd8e15b50466df7a88cafe699f2aeca835.zip |
Check for failure with CBB_init() in bs_ber.c.
From BoringSSL commit 3fa65f0f05f67615d9daf48940e07f84d094ac6e.
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/ssl/bs_ber.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libssl/src/ssl/bs_ber.c b/lib/libssl/src/ssl/bs_ber.c index 3a391fe853f..6e945a02466 100644 --- a/lib/libssl/src/ssl/bs_ber.c +++ b/lib/libssl/src/ssl/bs_ber.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bs_ber.c,v 1.7 2015/06/17 07:20:39 doug Exp $ */ +/* $OpenBSD: bs_ber.c,v 1.8 2015/06/21 16:10:45 doug Exp $ */ /* * Copyright (c) 2014, Google Inc. * @@ -257,7 +257,8 @@ CBS_asn1_indefinite_to_definite(CBS *in, uint8_t **out, size_t *out_len) return 1; } - CBB_init(&cbb, CBS_len(in)); + if (!CBB_init(&cbb, CBS_len(in))) + return 0; if (!cbs_convert_indefinite(in, &cbb, 0, 0, 0)) { CBB_cleanup(&cbb); return 0; |