Browse Source

log: Fix an oob array read.

tags/n0.8
Alex Converse Alex Converse 14 years ago
parent
commit
847aaec682
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavutil/log.c

+ 1
- 1
libavutil/log.c View File

@@ -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;


Loading…
Cancel
Save