mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
nmbd would core dump if a large number of netbios aliases is set. The
problem was a buffer overflow in process_node_status_request().
this really points out a general problem is allocating MAX_DGRAM_SIZE
packets on the stack in nmbd. There must be a better way.
(This used to be commit 7db45f169c
)
This commit is contained in:
parent
d0cfc1f041
commit
c077bce5c0
@ -341,8 +341,9 @@ subnet %s - name not found.\n", namestr(&nmb->question.question_name),
|
||||
return;
|
||||
}
|
||||
|
||||
/* XXXX hack, we should calculate exactly how many will fit. */
|
||||
bufend = &rdata[MAX_DGRAM_SIZE] - 18;
|
||||
/* this is not an exact calculation. the 46 is for the stats buffer
|
||||
and the 60 is to leave room for the header etc */
|
||||
bufend = &rdata[MAX_DGRAM_SIZE] - (18 + 46 + 60);
|
||||
countptr = buf = rdata;
|
||||
buf += 1;
|
||||
buf0 = buf;
|
||||
|
Loading…
Reference in New Issue
Block a user