diff options
author | Jack Lloyd <[email protected]> | 2019-07-05 06:27:24 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-07-05 06:27:24 -0400 |
commit | b6c81dd38d60327d6e6118599f163933d6eee256 (patch) | |
tree | 39d43d2bec0f190231672bf3e7b8b5093c4fea19 /src/lib | |
parent | 1e6bbcc93e84c49526edfba3eea7536f5953b39e (diff) |
Avoid &v[v.size()]
GCC 8 is ok with this but GCC 5's iterator checks don't like it.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/tls/tls_record.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/tls/tls_record.cpp b/src/lib/tls/tls_record.cpp index 7ff15c75a..3304b70eb 100644 --- a/src/lib/tls/tls_record.cpp +++ b/src/lib/tls/tls_record.cpp @@ -368,7 +368,7 @@ Record_Header read_tls_record(secure_vector<uint8_t>& readbuf, if(epoch == 0) // Unencrypted initial handshake { - recbuf.assign(&readbuf[TLS_HEADER_SIZE], &readbuf[TLS_HEADER_SIZE + record_size]); + recbuf.assign(readbuf.begin() + TLS_HEADER_SIZE, readbuf.begin() + TLS_HEADER_SIZE + record_size); readbuf.clear(); return Record_Header(sequence, version, type); } @@ -455,7 +455,7 @@ Record_Header read_dtls_record(secure_vector<uint8_t>& readbuf, if(epoch == 0) // Unencrypted initial handshake { - recbuf.assign(&readbuf[DTLS_HEADER_SIZE], &readbuf[DTLS_HEADER_SIZE + record_size]); + recbuf.assign(readbuf.begin() + DTLS_HEADER_SIZE, readbuf.begin() + DTLS_HEADER_SIZE + record_size); readbuf.clear(); if(sequence_numbers) sequence_numbers->read_accept(sequence); |