Displaying 4 results from an estimated 4 matches for "safe_malloc_mul_3op_".
Did you mean:
safe_malloc_mul_2op_
2007 Sep 11
2
include/share/alloc.h
...: warning: 'safe_calloc_' defined but not used
../../include/share/alloc.h:68: warning: 'safe_malloc_add_3op_' defined but not used
../../include/share/alloc.h:79: warning: 'safe_malloc_add_4op_' defined but not used
../../include/share/alloc.h:115: warning: 'safe_malloc_mul_3op_' defined but not used
../../include/share/alloc.h:128: warning: 'safe_malloc_mul2add_' defined but not used
../../include/share/alloc.h:138: warning: 'safe_malloc_muladd2_' defined but not used
../../include/share/alloc.h:148: warning: 'safe_realloc_add_2op_'...
2007 Sep 11
0
include/share/alloc.h
...39; defined
> but not used
> ../../include/share/alloc.h:68: warning: 'safe_malloc_add_3op_'
> defined but not used
> ../../include/share/alloc.h:79: warning: 'safe_malloc_add_4op_'
> defined but not used
> ../../include/share/alloc.h:115: warning: 'safe_malloc_mul_3op_'
> defined but not used
> ../../include/share/alloc.h:128: warning: 'safe_malloc_mul2add_'
> defined but not used
> ../../include/share/alloc.h:138: warning: 'safe_malloc_muladd2_'
> defined but not used
> ../../include/share/alloc.h:148: warning: &...
2007 Dec 04
0
Compilation of flac-1.2.1 fails under MinGW
...nclude/share/alloc.h:120: error: `SIZE_T_MAX' undeclared (first
use in th is function)
../../include/share/alloc.h:120: error: (Each undeclared identifier is
reported only once
../../include/share/alloc.h:120: error: for each function it appears in.)
../../include/share/alloc.h: In function `safe_malloc_mul_3op_':
../../include/share/alloc.h:130: error: `SIZE_T_MAX' undeclared (first
use in th is function)
../../include/share/alloc.h: In function `safe_malloc_mul2add_':
../../include/share/alloc.h:143: error: `SIZE_T_MAX' undeclared (first
use in th is function)
../../include/share/alloc....
2012 Jun 24
3
Patch for cross compilation with MinGW32
...ize2) ;
+static inline void *safe_malloc_mul_2op_(size_t size1, size_t size2)
+{
+ if(!size1 || !size2)
+ return malloc(1); /* malloc(0) is undefined; FLAC src convention is to always allocate */
+ if(size1 > SIZE_MAX / size2)
+ return 0;
+ return malloc(size1*size2);
+}
static inline void *safe_malloc_mul_3op_(size_t size1, size_t size2, size_t size3)
{
diff --git src/libFLAC/include/private/bitmath.h src/libFLAC/include/private/bitmath.h
index 61b0e03..4de07b8 100644
--- src/libFLAC/include/private/bitmath.h
+++ src/libFLAC/include/private/bitmath.h
@@ -42,6 +42,7 @@
#endif
/* Will never be emitted...