OSDN Git Service

Allow use of strncpy()
authorMans Rullgard <mans@mansr.com>
Sun, 9 Sep 2012 13:07:20 +0000 (14:07 +0100)
committerMans Rullgard <mans@mansr.com>
Wed, 3 Oct 2012 13:36:51 +0000 (14:36 +0100)
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@mansr.com>
libavutil/internal.h

index 6862000..e61a629 100644 (file)
@@ -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