Update - OpenSSL 1.1.1-pre7-dev
This commit is contained in:
+8
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "internal/cryptlib.h"
|
||||
#include "packet_locl.h"
|
||||
#include <openssl/sslerr.h>
|
||||
|
||||
#define DEFAULT_BUF_SIZE 256
|
||||
|
||||
@@ -93,9 +94,10 @@ static int wpacket_intern_init_len(WPACKET *pkt, size_t lenbytes)
|
||||
pkt->curr = 0;
|
||||
pkt->written = 0;
|
||||
|
||||
pkt->subs = OPENSSL_zalloc(sizeof(*pkt->subs));
|
||||
if (pkt->subs == NULL)
|
||||
if ((pkt->subs = OPENSSL_zalloc(sizeof(*pkt->subs))) == NULL) {
|
||||
SSLerr(SSL_F_WPACKET_INTERN_INIT_LEN, ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lenbytes == 0)
|
||||
return 1;
|
||||
@@ -276,9 +278,10 @@ int WPACKET_start_sub_packet_len__(WPACKET *pkt, size_t lenbytes)
|
||||
if (!ossl_assert(pkt->subs != NULL))
|
||||
return 0;
|
||||
|
||||
sub = OPENSSL_zalloc(sizeof(*sub));
|
||||
if (sub == NULL)
|
||||
if ((sub = OPENSSL_zalloc(sizeof(*sub))) == NULL) {
|
||||
SSLerr(SSL_F_WPACKET_START_SUB_PACKET_LEN__, ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub->parent = pkt->subs;
|
||||
pkt->subs = sub;
|
||||
|
||||
Reference in New Issue
Block a user