summaryrefslogtreecommitdiff
path: root/libavutil/bprint.c
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2012-09-11 17:23:47 -0400
committerMichael Niedermayer <michaelni@gmx.at>2012-09-12 05:22:46 +0200
commit0c5fe2f0dabfb4931e9663fa0c612df31554e67f (patch)
tree369bfc2e1907e4db816f725b8e85ed88304c2dfd /libavutil/bprint.c
parent23e9e5c7d9048cb463c4de9e518994aa5d651445 (diff)
downloadffmpeg-0c5fe2f0dabfb4931e9663fa0c612df31554e67f.tar.gz
FATE/bprint: Convert a VLA to a normal array
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Reviewed-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/bprint.c')
-rw-r--r--libavutil/bprint.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavutil/bprint.c b/libavutil/bprint.c
index 6e59f6b69e..08231d23b4 100644
--- a/libavutil/bprint.c
+++ b/libavutil/bprint.c
@@ -21,6 +21,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
+#include "avassert.h"
#include "bprint.h"
#include "common.h"
#include "error.h"
@@ -189,7 +190,10 @@ int av_bprint_finalize(AVBPrint *buf, char **ret_str)
static void bprint_pascal(AVBPrint *b, unsigned size)
{
- unsigned p[size + 1], i, j;
+ unsigned i, j;
+ unsigned p[42];
+
+ av_assert0(size < FF_ARRAY_ELEMS(p));
p[0] = 1;
av_bprintf(b, "%8d\n", 1);