[FFmpeg-devel] [PATCH 2/2] lavf/md5enc: Use AV_HASH_MAX_SIZE

Michael Niedermayer michaelni at gmx.at
Sat Jun 15 11:11:24 CEST 2013


On Mon, Jun 03, 2013 at 03:56:15AM -0300, James Almer wrote:
> Also increase the buffer size in write_trailer(), since 128
> is not enough anymore
> 
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavformat/md5enc.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/libavformat/md5enc.c b/libavformat/md5enc.c
> index 06c9c41..270d9fb 100644
> --- a/libavformat/md5enc.c
> +++ b/libavformat/md5enc.c
> @@ -35,7 +35,7 @@ struct MD5Context {
>  static void md5_finish(struct AVFormatContext *s, char *buf)
>  {
>      struct MD5Context *c = s->priv_data;
> -    uint8_t md5[32];
> +    uint8_t md5[AV_HASH_MAX_SIZE];

this also could benefit from a version bump

(the idea here is that the user should be able to know for sure that
 some longer hashes are supported when version is >= X)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130615/9f7a3981/attachment.asc>


More information about the ffmpeg-devel mailing list