[gnutls-devel] GnuTLS | Fix coverity in lib/ (!1092)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Sat Oct 12 21:27:05 CEST 2019
Tim Rühsen commented on a discussion on lib/record.c: https://gitlab.com/gnutls/gnutls/merge_requests/1092#note_229665182
> (int) _mbuffer_get_udata_size(decrypted));
>
> /* store the last valid sequence number. We don't use that internally but
> - * callers of gnutls_record_get_state() could take advantage of it. */
> - memcpy(&record_state->sequence_number, packet_sequence, 8);
> + * callers of gnutls_record_get_state() could take advantage of it.
> + *
> + * Coverity issue 1454647 suggest to use memmove() here instead of memcpy().
> + */
> + memmove(&record_state->sequence_number, packet_sequence, 8);
What is we simply replace the memcpy by
```
record_state->sequence_number = record.sequence;
```
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/1092#note_229665182
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20191012/140075a8/attachment.html>
More information about the Gnutls-devel
mailing list