Also increase the buffer size in write_trailer(), since 128 is not enough anymore
Unified · Split
| @@ -35,7 +35,7 @@ struct MD5Context { · 34 unmodified lines | |||
| 35 | static void md5_finish(struct AVFormatContext *s, char *buf) | 35 | static void md5_finish(struct AVFormatContext *s, char *buf) |
| 36 | { | 36 | { |
| 37 | struct MD5Context *c = s->priv_data; | 37 | struct MD5Context *c = s->priv_data; |
| 38 | uint8_t md5[32]; | 38 | uint8_t md5[AV_HASH_MAX_SIZE]; |
| 39 | int i, offset = strlen(buf); | 39 | int i, offset = strlen(buf); |
| 40 | int len = av_hash_get_size(c->hash); | 40 | int len = av_hash_get_size(c->hash); |
| 41 | av_assert0(len > 0 && len <= sizeof(md5)); | 41 | av_assert0(len > 0 && len <= sizeof(md5)); |
| @@ -86,9 +86,9 @@ static int write_packet(struct AVFormatContext *s, AVPacket *pkt) · 44 unmodified lines | |||
| 86 | static int write_trailer(struct AVFormatContext *s) | 86 | static int write_trailer(struct AVFormatContext *s) |
| 87 | { | 87 | { |
| 88 | struct MD5Context *c = s->priv_data; | 88 | struct MD5Context *c = s->priv_data; |
| 89 | char buf[128]; | 89 | char buf[256]; |
| 90 | av_strlcpy(buf, av_hash_get_name(c->hash), sizeof(buf) - 100); | 90 | av_strlcpy(buf, av_hash_get_name(c->hash), sizeof(buf) - 200); |
| 91 | av_strlcat(buf, "=", sizeof(buf) - 100); | 91 | av_strlcat(buf, "=", sizeof(buf) - 200); |
| 92 | 92 | ||
| 93 | md5_finish(s, buf); | 93 | md5_finish(s, buf); |
| 94 | 94 | ||
| @@ -31,7 +31,7 @@ · 30 unmodified lines | |||
| 31 | 31 | ||
| 32 | #define LIBAVFORMAT_VERSION_MAJOR 55 | 32 | #define LIBAVFORMAT_VERSION_MAJOR 55 |
| 33 | #define LIBAVFORMAT_VERSION_MINOR 8 | 33 | #define LIBAVFORMAT_VERSION_MINOR 8 |
| 34 | #define LIBAVFORMAT_VERSION_MICRO 102 | 34 | #define LIBAVFORMAT_VERSION_MICRO 103 |
| 35 | 35 | ||
| 36 | #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ | 36 | #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ |
| 37 | LIBAVFORMAT_VERSION_MINOR, \ | 37 | LIBAVFORMAT_VERSION_MINOR, \ |