File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -145,11 +145,9 @@ static const rustsecp256k1_v0_9_0_callback default_error_callback = {
145145#endif
146146
147147static SECP256K1_INLINE void * checked_malloc (const rustsecp256k1_v0_9_0_callback * cb , size_t size ) {
148- void * ret = malloc (size );
149- if (ret == NULL ) {
150- rustsecp256k1_v0_9_0_callback_call (cb , "Out of memory" );
151- }
152- return ret ;
148+ (void ) cb ;
149+ (void ) size ;
150+ return NULL ;
153151}
154152
155153#if defined(__BIGGEST_ALIGNMENT__ )
Original file line number Diff line number Diff line change 1+ 148,152c148,150
2+ < void *ret = malloc(size);
3+ < if (ret == NULL) {
4+ < secp256k1_callback_call(cb, "Out of memory");
5+ < }
6+ < return ret;
7+ ---
8+ > (void) cb;
9+ > (void) size;
10+ > return NULL;
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ echo "$SOURCE_REV" >> ./secp256k1-HEAD-revision.txt
9797patch " $DIR /include/secp256k1.h" " ./secp256k1.h.patch"
9898patch " $DIR /src/secp256k1.c" " ./secp256k1.c.patch"
9999patch " $DIR /src/scratch_impl.h" " ./scratch_impl.h.patch"
100+ patch " $DIR /src/util.h" " ./util.h.patch"
100101
101102# Fix a linking error while cross-compiling to windowns with mingw
102103patch " $DIR /contrib/lax_der_parsing.c" " ./lax_der_parsing.c.patch"
You can’t perform that action at this time.
0 commit comments