[libav-commits] Allow use of strncpy()

Mans Rullgard git at libav.org
Wed Oct 3 16:37:57 CEST 2012


Module: libav
Branch: master
Commit: 05e209c04ceda37c9a6921f17955c841b93419a2

Author:    Mans Rullgard <mans at mansr.com>
Committer: Mans Rullgard <mans at mansr.com>
Date:      Sun Sep  9 14:07:20 2012 +0100

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>

---

 libavutil/internal.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/libavutil/internal.h b/libavutil/internal.h
index 6862000..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 libav-commits mailing list