Skip to content

Commit

Permalink
avutil/internal: Do not enable CHECKED with DEBUG
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
michaelni committed Apr 10, 2017
1 parent 25e491b commit a44b3ab
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libavutil/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit a44b3ab

Please sign in to comment.