Commit 847aaec6 authored by Alex Converse's avatar Alex Converse Committed by Alex Converse

log: Fix an oob array read.

parent c38d9780
...@@ -104,7 +104,7 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl) ...@@ -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); 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 HAVE_ISATTY
if(!is_atty) is_atty= isatty(2) ? 1 : -1; if(!is_atty) is_atty= isatty(2) ? 1 : -1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment