summaryrefslogtreecommitdiff
path: root/libavutil/log.c
diff options
context:
space:
mode:
authorAlex Converse <aconverse@google.com>2011-05-05 22:33:31 -0700
committerAlex Converse <alex.converse@gmail.com>2011-05-08 13:34:05 -0700
commit847aaec682f2bbfaac55ee623364dd4527e0f341 (patch)
tree00bd3671a3c1e7c932ed55c422d68af44b84250a /libavutil/log.c
parentc38d9780eb5397670c94634f3fd8d489e942c140 (diff)
downloadffmpeg-847aaec682f2bbfaac55ee623364dd4527e0f341.tar.gz
log: Fix an oob array read.
Diffstat (limited to 'libavutil/log.c')
-rw-r--r--libavutil/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index ddfd31f6c3..c44130c26e 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -104,7 +104,7 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
vsnprintf(line + strlen(line), sizeof(line) - strlen(line), fmt, vl);
- print_prefix= line[strlen(line)-1] == '\n';
+ print_prefix = strlen(line) && line[strlen(line)-1] == '\n';
#if HAVE_ISATTY
if(!is_atty) is_atty= isatty(2) ? 1 : -1;