Author: jra Date: 2005-11-07 19:17:58 +0000 (Mon, 07 Nov 2005) New Revision: 11559
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11559 Log: Fix core dump if setmntent returns NULL. Pointed out by Jay Fanlason @ Red Hat. Jeremy. Modified: trunk/source/lib/sysquotas.c Changeset: Modified: trunk/source/lib/sysquotas.c =================================================================== --- trunk/source/lib/sysquotas.c 2005-11-07 18:38:34 UTC (rev 11558) +++ trunk/source/lib/sysquotas.c 2005-11-07 19:17:58 UTC (rev 11559) @@ -67,6 +67,9 @@ devno = S.st_dev ; fp = setmntent(MOUNTED,"r"); + if (fp == NULL) { + return -1; + } while ((mnt = getmntent(fp))) { if ( sys_stat(mnt->mnt_dir,&S) == -1 )