[FFmpeg-cvslog] Replace strncpy() with av_strlcpy() in libpostproc.

Alex Converse git at videolan.org
Sun Dec 25 01:35:56 CET 2011


ffmpeg | branch: release/0.6 | Alex Converse <aconverse at google.com> | Tue May  3 11:19:31 2011 -0700| [21ad6e08e45952586441e5fb7b0cf670ba021718] | committer: Reinhard Tartler

Replace strncpy() with av_strlcpy() in libpostproc.

(cherry picked from commit 1a5e4fd8c5b99478b4e08a69261930bb12aa948b)

Conflicts:

	ffmpeg.c
	libavcodec/ac3enc.c
	libavcodec/ass.c
	libavformat/movenc.c
	libavformat/mp3enc.c
	libavutil/log.c

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=21ad6e08e45952586441e5fb7b0cf670ba021718
---

 libpostproc/postprocess.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index 92c822b..4810353 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -86,6 +86,7 @@ try to unroll inner for(x=0 ... loop to avoid these damn if(x ... checks
 //#define DEBUG_BRIGHTNESS
 #include "postprocess.h"
 #include "postprocess_internal.h"
+#include "libavutil/avstring.h"
 
 unsigned postproc_version(void)
 {
@@ -766,7 +767,7 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality)
     ppMode->maxClippedThreshold= 0.01;
     ppMode->error=0;
 
-    strncpy(temp, name, GET_MODE_BUFFER_SIZE);
+    av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE);
 
     av_log(NULL, AV_LOG_DEBUG, "pp: %s\n", name);
 



More information about the ffmpeg-cvslog mailing list