1
0
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:
Volker Lendecke 2004-11-17 21:22:35 +00:00 committed by Gerald (Jerry) Carter
parent 00f6baa15a
commit 0c639097cf

View File

@ -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 )