On Wed, Sep 18, 2019 at 08:20:10PM +0200, Tomas Härdin wrote:
> ons 2019-09-18 klockan 02:03 +0200 skrev Andreas Rheinhardt:
> > The pointer arguments to memcpy (and several other functions of the
> > C standard library) are not allowed to be NULL, not even when the number
> > of bytes to copy is zero. An AVEncryptionInitInfo's data pointer is
> > explicitly allowed to be NULL and yet av_encryption_init_info_add_side_data
> > unconditionally used it as a source pointer to copy from. This commit
> > changes
> > this so that copying is only done if the number of bytes to copy is > 0.
>
> *gesticulates wildly with a formal verification stick*
>
> > - memcpy(cur_buffer, cur_info->data, cur_info->data_size);
> > - cur_buffer += cur_info->data_size;
> > + if (cur_info->data_size > 0) {
> > + memcpy(cur_buffer, cur_info->data, cur_info->data_size);
> > + cur_buffer += cur_info->data_size;
> > + }
>
> Approvewill apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The greatest way to live with honor in this world is to be what we pretend to be. -- Socrates
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
