Geoffrey1014 / SA_Bugs

record bugs of static analyzers
3 stars 1 forks source link

pinpoint-fn-1 #75

Open Geoffrey1014 opened 1 year ago

Geoffrey1014 commented 1 year ago
#include <stdio.h>

int a() {
  for (int d = -2; d; ++d) { ; }
  // int * p = d;
  // printf("%d",*p);  // pinpoint report this NPD
  return d;
}

int b() {
  int t = a();
  int *c = (void *)t;
  printf("%d", *c); // pinpoint does not report this NPD
}

int main() { b(); }