aboutsummaryrefslogtreecommitdiff
path: root/slides/2018-software-security/sample/splint
blob: af8501e5f8938adf839e056e282e8f0ab02026c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
static-analysis.c: (in function main)
static-analysis.c:7:9: Possibly null storage buf passed as non-null param:
                          fgets (buf, ...)
  A possibly null pointer is passed as a parameter corresponding to a formal
  parameter with no /*@null@*/ annotation.  If NULL may be used for this
  parameter, add a /*@null@*/ annotation to the function parameter declaration.
  (Use -nullpass to inhibit warning)
   static-analysis.c:6:15: Storage buf may become null
static-analysis.c:7:3: Return value (type char *) ignored: fgets(buf, 8, stdin)
  Result returned by function call is not used. If this is intended, can cast
  result to (void) to eliminate message. (Use -retvalother to inhibit warning)
static-analysis.c:9:12: Fresh storage buf not released before return
  A memory leak has been detected. Storage allocated locally is not released
  before the last reference to it is lost. (Use -mustfreefresh to inhibit
  warning)
   static-analysis.c:6:25: Fresh storage buf created