Ticket #1516 (new defect)

Opened 15 months ago

Last modified 9 months ago

NULL ptr dereferences found with Calysto static checker

Reported by: anonymous Owned by:
Priority: normal Milestone: 1.3.6
Component: licq daemon Version: 1.3.4
Keywords: Cc:

Description (last modified by erijo) (diff)

Hi,

I've ran my static checker Calysto on licq v1.3.4. Here is the (postprocessed) report that I got:

+ licq-1.3.4/src/support.c:41
Function with external linkage dereferences szDest without checking it first.

+ licq-1.3.4/src/support.c:57
Function with external linkage dereferences szDest without checking it first.

+ licq-1.3.4/src/support.c:53
Function with external linkage dereferences szSource without checking it first.

+ licq-1.3.4/src/support.c:110
Function with external linkage dereferences _szBuf without checking it first.

+ licq-1.3.4/src/support.c:159
Function with external linkage dereferences namelist without checking it first.

+ licq-1.3.4/src/pthread_rdwr.c:29
Function with external linkage dereferences rdwrp without checking it first.

+ licq-1.3.4/src/pthread_rdwr.c:38
Function with external linkage dereferences rdwrp without checking it first.

+ licq-1.3.4/src/pthread_rdwr.c:49
Function with external linkage dereferences rdwrp without checking it first.

+ licq-1.3.4/src/pthread_rdwr.c:66
Function with external linkage dereferences rdwrp without checking it first.

+ licq-1.3.4/src/pthread_rdwr.c:77
Function with external linkage dereferences rdwrp without checking it first.

+ licq-1.3.4/src/sighandler.c:81
backtrace_symbols can return NULL.

The first 10 warnings are reported in functions that are not called anywhere, but have external linkage. Since those functions can be called in any context, Calysto assumes the worst case assumptions for the input parameters and globals (undefined). Hence, any parameter dereferencing, without checking it first, is considered a bug.

I'd appreciate your feedback on these warnings. Please email me directly, as I'm not following licq development lists (please find the email on my page).

I hope this report will be helpful.

Kind regards,

Domagoj Babic

http://www.domagoj.info/

Change History

Changed 11 months ago by erijo

  • version set to 1.3.4
  • component changed from None to licq daemon
  • milestone set to 1.3.6

Changed 9 months ago by erijo

  • description modified (diff)

backtrace_symbols can return NULL: fixed in r5870.

Note: See TracTickets for help on using tickets.