aboutsummaryrefslogtreecommitdiffstats
path: root/main/gst-ffmpeg0.10/libavutil-fortify.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-04-30 08:57:33 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-04-30 08:57:33 +0000
commitdff1fab4a4bd7a78ca0d7db932e05745f94cff64 (patch)
tree6d4de4bc099bca8caa5e41b73e05c76c60ac4b4c /main/gst-ffmpeg0.10/libavutil-fortify.patch
parent131c8315b1cced8cc5e0a4c68a6387d69b234dad (diff)
downloadaports-dff1fab4a4bd7a78ca0d7db932e05745f94cff64.tar.bz2
aports-dff1fab4a4bd7a78ca0d7db932e05745f94cff64.tar.xz
main/gst-ffmpeg0.10: fix build with fortify
Diffstat (limited to 'main/gst-ffmpeg0.10/libavutil-fortify.patch')
-rw-r--r--main/gst-ffmpeg0.10/libavutil-fortify.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/main/gst-ffmpeg0.10/libavutil-fortify.patch b/main/gst-ffmpeg0.10/libavutil-fortify.patch
new file mode 100644
index 0000000000..d7a3f0916d
--- /dev/null
+++ b/main/gst-ffmpeg0.10/libavutil-fortify.patch
@@ -0,0 +1,41 @@
+--- ./gst-libs/ext/libav/libavutil/internal.h.orig
++++ ./gst-libs/ext/libav/libavutil/internal.h
+@@ -124,38 +124,6 @@
+ level = (level ^ mask) - mask;
+ #endif
+
+-/* avoid usage of dangerous/inappropriate system functions */
+-#undef malloc
+-#define malloc please_use_av_malloc
+-#undef free
+-#define free please_use_av_free
+-#undef realloc
+-#define realloc please_use_av_realloc
+-#undef time
+-#define time time_is_forbidden_due_to_security_issues
+-#undef rand
+-#define rand rand_is_forbidden_due_to_state_trashing_use_av_lfg_get
+-#undef srand
+-#define srand srand_is_forbidden_due_to_state_trashing_use_av_lfg_init
+-#undef random
+-#define random random_is_forbidden_due_to_state_trashing_use_av_lfg_get
+-#undef sprintf
+-#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
+-#define printf please_use_av_log_instead_of_printf
+-#undef fprintf
+-#define fprintf please_use_av_log_instead_of_fprintf
+-#undef puts
+-#define puts please_use_av_log_instead_of_puts
+-#undef perror
+-#define perror please_use_av_log_instead_of_perror
+-
+ #define FF_ALLOC_OR_GOTO(ctx, p, size, label)\
+ {\
+ p = av_malloc(size);\