Browse Source

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 a44b3abb4c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n2.8.12
Michael Niedermayer 8 years ago
parent
commit
6025edc0c7
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      libavutil/internal.h

+ 2
- 3
libavutil/internal.h View File

@@ -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>


Loading…
Cancel
Save