xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] Reminder: new 1.2 release coming soon


From: David Binderman
Subject: Re: [XForms] Reminder: new 1.2 release coming soon
Date: Mon, 9 Dec 2013 08:50:08 +0000

Hello there,

----------------------------------------

> http://download.savannah.gnu.org/releases/xforms/xforms-1.0.94pre27.tar.gz
>
> I'd also be grateful for being told if you did run tests but
> didn't notice anything wrong - this would give me a feeling of
> how much testing has actually been done and what's the ratio of
> positive and negative results.

I ran static analyser "cppcheck" over that code. It found lots of things.
There's this bug for starters

[xforms-1.0.94pre27/fd2ps/xbmtops.c:132]: (error) Resource leak: fp

A possible missing call to fclose.

Then there's all these.

[xforms-1.0.94pre27/fd2ps/load.c:460]: (warning) scanf without field width limit
s can crash with huge input data.
[xforms-1.0.94pre27/fd2ps/load.c:487]: (warning) scanf without field width limit
s can crash with huge input data.
[xforms-1.0.94pre27/fd2ps/load.c:544]: (warning) scanf without field width limit
s can crash with huge input data.
[xforms-1.0.94pre27/fd2ps/load.c:633]: (warning) scanf without field width limit
s can crash with huge input data.
[xforms-1.0.94pre27/fd2ps/load.c:645]: (warning) scanf without field width limit
s can crash with huge input data.

where for bullet-proof code, %s should limited to the destination buffer size.

Then there are minor style issues like this, where some round brackets
might help.

[xforms-1.0.94pre27/lib/xyplot.c:3254]: (style) Array index 'i' is used before 
limits check.
[xforms-1.0.94pre27/fdesign/fd_groups.c:77]: (style) Boolean result is used in b
itwise operation. Clarify expression with parentheses.
[xforms-1.0.94pre27/lib/clock.c:179]: (style) Clarify calculation precedence for
 '%' and '?'.

And this selection of possible cut'paste errors.

[xforms-1.0.94pre27/lib/forms.c:2114] -> [xforms-1.0.94pre27/lib/forms.c:2114]: 
(style) Same express
ion on both sides of '||'.
[xforms-1.0.94pre27/lib/forms.c:2118] -> [xforms-1.0.94pre27/lib/forms.c:2118]: 
(style) Same express
ion on both sides of '||'.
[xforms-1.0.94pre27/lib/forms.c:2264] -> [xforms-1.0.94pre27/lib/forms.c:2264]: 
(style) Same express
ion on both sides of '||'.
[xforms-1.0.94pre27/lib/forms.c:2268] -> [xforms-1.0.94pre27/lib/forms.c:2268]: 
(style) Same express
ion on both sides of '||'.
[xforms-1.0.94pre27/lib/popup.c:2704] -> [xforms-1.0.94pre27/lib/popup.c:2704]: 
(style) Same express
ion on both sides of '=='.
[xforms-1.0.94pre27/lib/popup.c:2710] -> [xforms-1.0.94pre27/lib/popup.c:2710]: 
(style) Same express
ion on both sides of '=='.

There are plenty more other things that cppcheck said, which I can
supply on request.

Regards

David Binderman                                           


reply via email to

[Prev in Thread] Current Thread [Next in Thread]