mirror of
https://github.com/samba-team/samba.git
synced 2025-03-05 20:58:40 +03:00
r3824: Fix crash in api_RNetShareEnum. ServicePtrs[] may contain invalid
entries. Happened after rev3708 removed non-existing cups printers. Volker (This used to be commit 60998d9d2f6272e383304da2b1d568a4b65f8787)
This commit is contained in:
parent
00f6baa15a
commit
0c639097cf
@ -1502,6 +1502,8 @@ static BOOL api_RNetShareEnum( connection_struct *conn,
|
||||
data_len = fixed_len = string_len = 0;
|
||||
for (i=0;i<count;i++) {
|
||||
fstring servicename_dos;
|
||||
if (!(lp_browseable(i) && lp_snum_ok(i)))
|
||||
continue;
|
||||
push_ascii_fstring(servicename_dos, lp_servicename(i));
|
||||
if( lp_browseable( i )
|
||||
&& lp_snum_ok( i )
|
||||
@ -1530,6 +1532,8 @@ static BOOL api_RNetShareEnum( connection_struct *conn,
|
||||
for( i = 0; i < count; i++ )
|
||||
{
|
||||
fstring servicename_dos;
|
||||
if (!(lp_browseable(i) && lp_snum_ok(i)))
|
||||
continue;
|
||||
push_ascii_fstring(servicename_dos, lp_servicename(i));
|
||||
if( lp_browseable( i )
|
||||
&& lp_snum_ok( i )
|
||||
|
Loading…
x
Reference in New Issue
Block a user