The Samba-Bugzilla – Attachment 16074 Details for
Bug 12769
error allocating core memory buffers (code 22) depending on source file system
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
remove MALLOC_MAX from util2.c
rsync-3.1.3-max-alloc.patch (text/plain), 1.33 KB, created by
MulticoreNOP
on 2020-06-24 11:42:20 UTC
(
hide
)
Description:
remove MALLOC_MAX from util2.c
Filename:
MIME Type:
Creator:
MulticoreNOP
Created:
2020-06-24 11:42:20 UTC
Size:
1.33 KB
patch
obsolete
>diff --git a/proto.h b/proto.h >index 1753f61..d54b0b1 100644 >--- a/proto.h >+++ b/proto.h >@@ -408,8 +408,8 @@ int flist_ndx_pop(flist_ndx_list *lp); > void *expand_item_list(item_list *lp, size_t item_size, > const char *desc, int incr); > int msleep(int t); >-void *_new_array(unsigned long num, unsigned int size, int use_calloc); >-void *_realloc_array(void *ptr, unsigned int size, size_t num); >+void *_new_array(size_t num, size_t size, int use_calloc); >+void *_realloc_array(void *ptr, size_t size, size_t num); > const char *sum_as_hex(int csum_type, const char *sum, int flist_csum); > NORETURN void out_of_memory(const char *str); > NORETURN void overflow_exit(const char *str); >diff --git a/util2.c b/util2.c >index 2722ab3..21c3e27 100644 >--- a/util2.c >+++ b/util2.c >@@ -59,19 +59,13 @@ int msleep(int t) > return True; > } > >-#define MALLOC_MAX 0x40000000 >- >-void *_new_array(unsigned long num, unsigned int size, int use_calloc) >+void *_new_array(size_t num, size_t size, int use_calloc) > { >- if (num >= MALLOC_MAX/size) >- return NULL; > return use_calloc ? calloc(num, size) : malloc(num * size); > } > >-void *_realloc_array(void *ptr, unsigned int size, size_t num) >+void *_realloc_array(void *ptr, size_t size, size_t num) > { >- if (num >= MALLOC_MAX/size) >- return NULL; > if (!ptr) > return malloc(size * num); > return realloc(ptr, size * num);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 12769
: 16074