mirror of
https://github.com/samba-team/samba.git
synced 2025-03-11 16:58:40 +03:00
libsmb: Protect cli_RNetServerEnum against rprcnt<6
Bug: https://bugzilla.samba.org/show_bug.cgi?id=14366 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit ce8b70df7bd63e96723b8e8dc864f1690f5fad7b)
This commit is contained in:
parent
bfe436e4c8
commit
c25c2fc665
@ -372,6 +372,13 @@ bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32_t stype,
|
||||
}
|
||||
|
||||
rdata_end = rdata + rdrcnt;
|
||||
|
||||
if (rprcnt < 6) {
|
||||
DBG_ERR("Got invalid result: rprcnt=%u\n", rprcnt);
|
||||
res = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
res = rparam ? SVAL(rparam,0) : -1;
|
||||
|
||||
if (res == 0 || res == ERRmoredata ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user