On Tue, 2012-01-17 at 11:24 +1100, Mark Goodwin wrote:
> Notes for cases affecting "src/pmdas" :
> 10 13 14 15 18 19 20 25 59 72 75 77 80 81 82 83 95 99 101 102 103 104
> 116 117 118 119 120 121 125 139 146 148 149 154 160 180 183 190 191 224
> 226 227 238 251 259 267 268 269 270 271 272 304 309 310 311 312 313 321
> 333 335 338 339
>
> Of these, #75, #101 (and #95), #139 would benefit from another look.
G'day Mark ...
#75 - I agree, dp _must_ be set in all cases except the bad PMID one
where we continue the outer loop and never hit the deref of dp ...
interestingly the initialisation of dp to NULL was added earlier to
pander to gcc, so there is something about this (long) block of code
that is confusing gcc _and_ coverity ... it would probably be really
good if someone else on the list (other than the original developers)
could take a look at this with untainted eyes and make sure we're not
both wrong.
#95 - I think the test at line 358 is inverted ... should if logfile->fd
>= 0
#101 - our logic is a bit convoluted here ... assuming a read with fd <
0 returns EBADF, the code will behave correctly. Adding
if (logfile->fd < 0)
return 0;
before the read() would make it clearer and make coverity happy I'm
guessing.
#139 - I don't follow the coverity logic here at all ... the existing
code looks OK to me.
|