These are all false positives. I added some asserts that hopefully get rid of two of the warnings. I couldn't really think of a way to nicely avoid the mail-index-fsck.c warning.
http://hg.dovecot.org/dovecot-2.2/rev/06b884831f25 On 07/15/2015 06:07 AM, 吴迪 wrote: > Dear, > > > use our static analysis tools, I find some bugs (Null deference pointer) > for dovecot-2.2.18. Null deference pointer bugs often make program crashes, > Please confim them, Thanks! > > > 1. dovecot-2.2.18/src/config/config-request.c 332 > > > 'setting_export_section_name(ctx->prefix, def, children[i], i);', > pointer 'children' in line 202 assigned NULL and if branch 'case > SET_DEFLIST_UNIQUE' not execute, so pointer 'children' is always NULL. It > load to a bug of null deference pointer In line 332. > > > The same bugs also appeared in : > > > 1. dovecot-2.2.18/src/lib-index/mail-index-fsck.c line 170 or 174, > pointer 'kw_rec ' mybe NULL. > > > 2.dovecot-2.2.18/src/lib-storage/mail-search-args-simplify line 349, > pointer 'prev_arg' mybe NULL. > > > > > > > best wishes~ > > > Amy > > >