diff options
author | Emilia Kasper <emilia@openssl.org> | 2015-10-02 14:40:30 +0200 |
---|---|---|
committer | Emilia Kasper <emilia@openssl.org> | 2015-10-08 16:44:39 +0200 |
commit | 329428708d6836676f6a7078aa2e2a1db9a1addb (patch) | |
tree | bb741bccce8ed539dc373c1e004b290ed62ea905 /ssl/packet_locl.h | |
parent | 28dc5d1963c96db99e3fd48418552a5a0399480d (diff) |
PACKET: simplify ServerKeyExchange parsing
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'ssl/packet_locl.h')
-rw-r--r-- | ssl/packet_locl.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ssl/packet_locl.h b/ssl/packet_locl.h index e73eb3dba2..9354e6c998 100644 --- a/ssl/packet_locl.h +++ b/ssl/packet_locl.h @@ -418,6 +418,8 @@ __owur static inline int PACKET_memdup(const PACKET *pkt, unsigned char **data, __owur static inline int PACKET_strndup(const PACKET *pkt, char **data) { OPENSSL_free(*data); + + /* This will succeed on an empty packet, unless pkt->curr == NULL. */ *data = BUF_strndup((const char*)pkt->curr, PACKET_remaining(pkt)); return (*data != NULL); } |