[FFmpeg-devel] [PATCH v2 1/3] avformat/argo_asf: cleanup and NULL-terminate name field in header

"zhilizhao(赵志立)" quinkblack at foxmail.com
Thu Oct 14 15:45:01 EEST 2021



> On Oct 14, 2021, at 8:25 PM, Zane van Iperen <zane at zanevaniperen.com> wrote:
> 
> 
> 
> 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

Sorry for the noise, email client doesn’t show the patch set together.
Add some description will be helpful when reading the patch alone.

> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-devel mailing list