New python PIDL checks cause 2221 new Coverity warnings
Andrew Bartlett
abartlet at samba.org
Tue Sep 1 08:57:49 UTC 2015
On Tue, 2015-09-01 at 10:36 +0200, Stefan Metzmacher wrote:
> Hi Andrew,
>
> > > That looks like a start. Also,
> > >
> > > py_days_of_month = (uint32_t)object->days_of_month > LONG_MAX ?
> > > PyLong_FromUnsignedLong((uint32_t)object->days_of_month) :
> > > PyInt_FromLong((uint32_t)object->days_of_month);
> > >
> > > this pattern can easily be put into a helper function. In
> > > addition to having just one coverity warning (or none if we
> > > properly #ifdef this) we get less cluttered code to look at.
> >
> > Can you review and push the attached?
> >
> > This handles the unsigned case. The remaining case is for signed
> > 64
> > bit integers in IDL, which are vanishingly rare (6 instances), so
> > I've
> > left those in the generated output rather than add another helper
> > function for those.
>
> For symetric reasons I've also added a helper function for the signed
> case.
>
> I've also changed some leading whitespaces to tabs and added bug
> markers.
Thanks.
> Everyone happy with the attached patches to be pushed to master?
I'm happy with them.
> > Once this is one, I would like to discuss getting the underlying
> > changes into 4.3, as the purpose of this work is to allow AD sites
> > using the sudo (and other custom) schema to upgrade their domains
> > successfully.
>
> Just attach the required patches to the bugreport and ask for review.
> I'm also wondering if we want this also in 4.2.
I suppose we should.
Thanks for all your patience and suggestions here.
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba-technical
mailing list