From 6ce4a635ed19db9003dae36f52d432f2b8988bb7 Mon Sep 17 00:00:00 2001 From: Paras Chadha Date: Sun, 3 Sep 2017 00:37:22 +0530 Subject: avformat/fitsenc: fill header line with spaces Signed-off-by: Paras Chadha Signed-off-by: James Almer --- libavformat/fitsenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/fitsenc.c') diff --git a/libavformat/fitsenc.c b/libavformat/fitsenc.c index 0dcdcdfb04..7cb171596c 100644 --- a/libavformat/fitsenc.c +++ b/libavformat/fitsenc.c @@ -58,7 +58,7 @@ static int write_keyword_value(AVFormatContext *s, const char *keyword, int valu header[9] = ' '; ret = snprintf(header + 10, 70, "%d", value); - header[ret + 10] = ' '; + memset(&header[ret + 10], ' ', sizeof(header) - (ret + 10)); avio_write(s->pb, header, sizeof(header)); *lines_written += 1; -- cgit v1.2.3