[gnutls-devel] GnuTLS | Fix coverity in lib/ (!1092)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Sat Oct 12 23:15:31 CEST 2019




Nikos Mavrogiannopoulos commented on a discussion on lib/record.c: https://gitlab.com/gnutls/gnutls/merge_requests/1092#note_229671444

>  		     (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);

Looks simpler indeed.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/1092#note_229671444
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/71243598/attachment.html>


More information about the Gnutls-devel mailing list