]> git.sesse.net Git - ffmpeg/commitdiff
avformat/fitsenc: fill header line with spaces
authorParas Chadha <paraschadha18@gmail.com>
Sat, 2 Sep 2017 19:07:22 +0000 (00:37 +0530)
committerJames Almer <jamrial@gmail.com>
Wed, 13 Sep 2017 00:39:57 +0000 (21:39 -0300)
Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/fitsenc.c

index 0dcdcdfb04f3163a0a5e97b174c18dd7daa0f5c6..7cb171596c4e28b2cae5346c5e9afeb76f87846d 100644 (file)
@@ -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;