mirror of
https://github.com/samba-team/samba.git
synced 2025-02-14 01:57:53 +03:00
Don't bomb out when trying to unmarshall a zero length printerdata value.
Fixes remote printer publishing of shared printers from a Samba server.
This commit is contained in:
parent
5416c51133
commit
7f363fa32d
@ -7296,15 +7296,14 @@ static BOOL spoolss_io_printer_enum_values_ctr(const char *desc, prs_struct *ps,
|
||||
if (!prs_unistr("valuename", ps, depth, &ctr->values[i].valuename))
|
||||
return False;
|
||||
|
||||
if (UNMARSHALLING(ps)) {
|
||||
if (UNMARSHALLING(ps) && ctr->values[i].data_len) {
|
||||
ctr->values[i].data = (uint8 *)prs_alloc_mem(
|
||||
ps, ctr->values[i].data_len);
|
||||
if (!ctr->values[i].data)
|
||||
return False;
|
||||
if (!prs_uint8s(False, "data", ps, depth, ctr->values[i].data, ctr->values[i].data_len))
|
||||
return False;
|
||||
}
|
||||
|
||||
if (!prs_uint8s(False, "data", ps, depth, ctr->values[i].data, ctr->values[i].data_len))
|
||||
return False;
|
||||
|
||||
if ( !prs_align_uint16(ps) )
|
||||
return False;
|
||||
|
Loading…
x
Reference in New Issue
Block a user