Date: Tue, 30 Sep 2003 11:44:18 -0400 (EDT) From: "Andrew R. Reiter" <arr@watson.org> To: Harti Brandt <brandt@fokus.fraunhofer.de> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 38889 for review Message-ID: <20030930114409.V4476@fledge.watson.org> In-Reply-To: <20030930174127.W96881@beagle.fokus.fraunhofer.de> References: <200309301532.h8UFW81Z092302@repoman.freebsd.org> <20030930174127.W96881@beagle.fokus.fraunhofer.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 30 Sep 2003, Harti Brandt wrote: :On Tue, 30 Sep 2003, Andrew R. Reiter wrote: : :ARR>On Tue, 30 Sep 2003, Andrew Reisse wrote: :ARR> :ARR>:http://perforce.freebsd.org/chv.cgi?CH=38889 :ARR>: :ARR>:Change 38889 by areisse@areisse_tislabs on 2003/09/30 08:32:04 :ARR>: :ARR>: properly initialize sidtab structures :ARR>: don't divide by zero when empty policy files are loaded :ARR>: :ARR>:Affected files ... :ARR>: :ARR>:.. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/fileutils.c#5 edit :ARR>:.. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/sidtab.c#7 edit :ARR>: :ARR>:Differences ... :ARR>: :ARR>:==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/fileutils.c#5 (text+ko) ==== :ARR>: :ARR>:@@ -107,6 +107,9 @@ :ARR>: size_t :ARR>: fread(void *ptr, size_t size, size_t nmemb, FILE *fp) :ARR>: { :ARR>:+ if (size == 0) :ARR>:+ return 0; :ARR>:+ :ARR>: struct thread *td = curthread; :ARR> :ARR>Won't this generate a parse error? : :This is allowed in C99. See 6.8.2 of the standard. It should probably be :disallowed by style(9). Ah, thanks for the info. : :ARR> :ARR>: :ARR>: fp->FILE_uio.uio_iov->iov_base = ptr; :ARR>: :ARR>:==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/sidtab.c#7 (text+ko) ==== :ARR>: :ARR>:@@ -42,6 +42,7 @@ :ARR>: s->nel = 0; :ARR>: s->next_sid = 1; :ARR>: s->shutdown = 0; :ARR>:+ memset (&s->lock, 0, sizeof (struct mtx)); :ARR>: INIT_SIDTAB_LOCK(s); :ARR>: return 0; :ARR>: } :ARR>: :ARR> :ARR>-- :ARR>Andrew R. Reiter :ARR>arr@watson.org :ARR>arr@FreeBSD.org :ARR> : :-- :harti brandt, :http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private :brandt@fokus.fraunhofer.de, harti@freebsd.org : -- Andrew R. Reiter arr@watson.org arr@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030930114409.V4476>