Bug 512 - Error's
Error's
Status: RESOLVED FIXED
Product: unbound
Classification: Unclassified
Component: server
1.4.20
Other All
: P5 normal
Assigned To: unbound team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-28 12:37 CEST by Devil
Modified: 2013-07-29 09:22 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Devil 2013-07-28 12:37:18 CEST
[compat/snprintf.c:109]: (error) Uninitialized variable: str
[compat/snprintf.c:109]: (error) Uninitialized variable: count
[testcode/lock_verify.c:253]: (error) Memory leak: ref
[testcode/lock_verify.c:253]: (error) Memory leak: now
[testcode/memstats.c:142]: (error) Memory leak: cl
[testcode/memstats.c:168]: (error) Memory leak: cl
[testcode/fake_event.c:913]: (error) Memory leak: outnet
[daemon/worker.c:945]: (error) syntax error
[daemon/worker.c:956]: (error) syntax error
[testcode/perf.c:343]: (error) Uninitialized variable: dt
[validator/val_neg.c:498]: (error) Dereferencing 'p' after it is deallocated / released
[validator/val_neg.c:644]: (error) Dereferencing 'p' after it is deallocated / released
[validator/val_secalgo.c:905]: (error) Address of local auto-variable assigned to a function parameter.
[validator/val_secalgo.c:917]: (error) Address of local auto-variable assigned to a function parameter.
[validator/val_secalgo.c:892]: (error) Address of local auto-variable assigned to a function parameter.
[validator/val_secalgo.c:899]: (error) Address of local auto-variable assigned to a function parameter.
Comment 1 Wouter Wijngaards 2013-07-29 09:22:04 CEST
Hi Devil,

snprintf has changed so those warnings are no longer there.
lock_verify: that routine is supposed to read in that data and allocate it.
memstats: these are also read routine that read in data and allocate it.
fake_event: yes that is a leak in an error condition (in the test code).
worker.c: unsure what causes this, lack of SIGX definitions in the checker.
perf: it is initialised, but #ifndef S_SPLINT_S protects that (because splint cannot handle struct timeval)
val_neg: very serious, thank you, already fixed after a report from someone else.
val_secalgo: thank you, that should have been static arrays.

As you have with code-checking tools, some are false positives, but inspecting the code reveals interesting things.  Thanks for the report!  I have fixed these things in our source trunk for the next release.

Best regards,
   Wouter