[FFmpeg-devel] [PATCH v2 1/3] avformat/argo_asf: cleanup and NULL-terminate name field in header
Zane van Iperen
zane at zanevaniperen.com
Thu Oct 14 15:25:51 EEST 2021
On 14/10/21 10:11 pm, "zhilizhao(赵志立)" wrote:
>> typedef struct ArgoASFFileHeader {
>> uint32_t magic; /*< Magic Number, {'A', 'S', 'F', '\0'} */
>> @@ -40,7 +41,7 @@ typedef struct ArgoASFFileHeader {
>> uint16_t version_minor; /*< File Minor Version. */
>> uint32_t num_chunks; /*< No. chunks in the file. */
>> uint32_t chunk_offset; /*< Offset to the first chunk from the start of the file. */
>> - int8_t name[8]; /*< Name. */
>> + char name[ASF_NAME_SIZE + 1]; /*< Name, +1 for NULL-terminator. */
>> } ArgoASFFileHeader;
>
>
> I failed to see why null-terminator is needed from the commit message or from the source code.
>
See https://ffmpeg.org/pipermail/ffmpeg-devel/2021-October/286939.html
More information about the ffmpeg-devel
mailing list