diff options
| author | jsing <> | 2017-01-22 00:03:18 +0000 |
|---|---|---|
| committer | jsing <> | 2017-01-22 00:03:18 +0000 |
| commit | bfa21eb0abc42fc2a733c5a17379e371b32de162 (patch) | |
| tree | 26387680f529aac06ecf720c23ec509801187618 /src/lib/libssl/s3_lib.c | |
| parent | 9936e217a29ea9f6450025fa200ac9b8088071b0 (diff) | |
| download | openbsd-bfa21eb0abc42fc2a733c5a17379e371b32de162.tar.gz openbsd-bfa21eb0abc42fc2a733c5a17379e371b32de162.tar.bz2 openbsd-bfa21eb0abc42fc2a733c5a17379e371b32de162.zip | |
There is no point in setting struct fields to zero, when you've already
zeroed the entire struct via memset.
ok beck@
Diffstat (limited to 'src/lib/libssl/s3_lib.c')
| -rw-r--r-- | src/lib/libssl/s3_lib.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index 5c7f2cb27c..18c405d13a 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: s3_lib.c,v 1.115 2016/12/30 17:20:51 jsing Exp $ */ | 1 | /* $OpenBSD: s3_lib.c,v 1.116 2017/01/22 00:03:18 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 | * |
| @@ -1886,6 +1886,7 @@ ssl3_clear(SSL *s) | |||
| 1886 | s->s3->alpn_selected = NULL; | 1886 | s->s3->alpn_selected = NULL; |
| 1887 | 1887 | ||
| 1888 | memset(s->s3, 0, sizeof *s->s3); | 1888 | memset(s->s3, 0, sizeof *s->s3); |
| 1889 | |||
| 1889 | s->s3->rbuf.buf = rp; | 1890 | s->s3->rbuf.buf = rp; |
| 1890 | s->s3->wbuf.buf = wp; | 1891 | s->s3->wbuf.buf = wp; |
| 1891 | s->s3->rbuf.len = rlen; | 1892 | s->s3->rbuf.len = rlen; |
| @@ -1894,10 +1895,6 @@ ssl3_clear(SSL *s) | |||
| 1894 | ssl_free_wbio_buffer(s); | 1895 | ssl_free_wbio_buffer(s); |
| 1895 | 1896 | ||
| 1896 | s->packet_length = 0; | 1897 | s->packet_length = 0; |
| 1897 | s->s3->renegotiate = 0; | ||
| 1898 | s->s3->total_renegotiations = 0; | ||
| 1899 | s->s3->num_renegotiations = 0; | ||
| 1900 | s->s3->in_read_app_data = 0; | ||
| 1901 | s->version = TLS1_VERSION; | 1898 | s->version = TLS1_VERSION; |
| 1902 | 1899 | ||
| 1903 | free(s->next_proto_negotiated); | 1900 | free(s->next_proto_negotiated); |
