[FFmpeg-cvslog] Allow use of strncpy()

Mans Rullgard git at videolan.org
Thu Oct 4 12:37:06 CEST 2012


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Sun Sep  9 14:07:20 2012 +0100| [05e209c04ceda37c9a6921f17955c841b93419a2] | committer: Mans Rullgard

Allow use of strncpy()

There are cases where strncpy() does exactly what is required.
A blanket ban forces more convoluted solutions to be used in those
cases and has been a cause of bugs.

Signed-off-by: Mans Rullgard <mans at mansr.com>

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

 libavutil/internal.h |    2 --
 1 file changed, 2 deletions(-)

diff --git a/libavutil/internal.h b/libavutil/internal.h
index 68620007..e61a629 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -70,8 +70,6 @@
 #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
 #undef  printf



More information about the ffmpeg-cvslog mailing list