aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-05-09 04:27:07 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-09 04:50:56 +0200
commit6841c8c5791e857a3327411f23c13b0d28f69f1f (patch)
tree37f670ac509799ee0f4a067e2f632cc28a587082 /libavutil
parent25308afbb2f7d6d9cb1e36476bc5aa0b3831c703 (diff)
parent847aaec682f2bbfaac55ee623364dd4527e0f341 (diff)
downloadffmpeg-6841c8c5791e857a3327411f23c13b0d28f69f1f.tar.gz
Merge remote branch 'qatar/master'
* qatar/master: log: Fix an oob array read. cosmetics: trim trailing whitespace in postproc Ban strncpy() it's too easy to misuse. psymodel: Remove wrapper functions. aacenc: Replace loop counters in aac_encode_frame() with more descriptive 'ch' and 'w'. regtest: remove redundant flags in jpg test regtest: use run_ffmpeg in do_image_formats regtest: simplify encoding functions ffmpeg.c: check for interlaced flag in the correct place. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/internal.h2
-rw-r--r--libavutil/log.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 0bd842f4c6..b5cc2a6cd1 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -137,6 +137,8 @@
#define sprintf sprintf_is_forbidden_due_to_security_issues_use_snprintf
#undef strcat
#define strcat strcat_is_forbidden_due_to_security_issues_use_av_strlcat
+#undef strncpy
+#define strncpy strncpy_is_forbidden_due_to_security_issues_use_av_strlcpy
#undef exit
#define exit exit_is_forbidden
#ifndef LIBAVFORMAT_BUILD
diff --git a/libavutil/log.c b/libavutil/log.c
index c9a4f7f9aa..fd5e2cbbe2 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -111,7 +111,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;