aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-04-07 13:49:09 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-16 01:05:27 +0200
commitaf71771a6ce342c9f1b056a67251c3386c60e9c7 (patch)
treefe4b1969d1f7636bf331ec4bbaf8da7f6b7d51ae
parent7072201271d3563b38b07be8c02e7f3246d8453e (diff)
downloadffmpeg-af71771a6ce342c9f1b056a67251c3386c60e9c7.tar.gz
avutil/internal: Do not enable CHECKED with DEBUG
This avoids potential undefined behavior in debug mode while still allowing developers which want to check for potential additional overflows to do so by manually enabling this. Reviewed-by: wm4 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit a44b3abb4cf922e379fbac55452d0482a8223597) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavutil/internal.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 7b859ed60f..a68f104c60 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -30,9 +30,8 @@
# define NDEBUG
#endif
-#if defined(DEBUG) && !defined(CHECKED)
-# define CHECKED
-#endif
+// This can be enabled to allow detection of additional integer overflows with ubsan
+//#define CHECKED
#include <limits.h>
#include <stdint.h>