mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
r10467: aix doesn't like zero length malloc :(
(This used to be commit 0177c6ca3e9baa223b5f7b29adc12d862dcb19d8)
This commit is contained in:
parent
d98b913aa9
commit
6e4ebbed89
@ -351,6 +351,11 @@ unsigned char *tdb_alloc_read(struct tdb_context *tdb, tdb_off_t offset, tdb_len
|
||||
{
|
||||
unsigned char *buf;
|
||||
|
||||
/* some systems don't like zero length malloc */
|
||||
if (len == 0) {
|
||||
len = 1;
|
||||
}
|
||||
|
||||
if (!(buf = malloc(len))) {
|
||||
/* Ensure ecode is set for log fn. */
|
||||
tdb->ecode = TDB_ERR_OOM;
|
||||
|
Loading…
x
Reference in New Issue
Block a user