Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/sipgrep-2.1.0/sipparse.h
Examining data/sipgrep-2.1.0/core_hep.h
Examining data/sipgrep-2.1.0/ipreasm.h
Examining data/sipgrep-2.1.0/uthash.h
Examining data/sipgrep-2.1.0/ipreasm.c
Examining data/sipgrep-2.1.0/tcpreasm.h
Examining data/sipgrep-2.1.0/sipparse.c
Examining data/sipgrep-2.1.0/sipgrep.h
Examining data/sipgrep-2.1.0/sipgrep.c
Examining data/sipgrep-2.1.0/tcpreasm.c

FINAL RESULTS:

data/sipgrep-2.1.0/sipgrep.c:505:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf (custom_filter, SIP_FROM_TO_MATCH, sip_from_filter, sip_to_filter);
data/sipgrep-2.1.0/sipgrep.c:511:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf (custom_filter, SIP_FROM_MATCH, sip_from_filter);
data/sipgrep-2.1.0/sipgrep.c:517:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf (custom_filter, SIP_TO_MATCH, sip_to_filter);
data/sipgrep-2.1.0/sipgrep.c:542:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf (word_regex, WORD_REGEX, match_data, match_data, match_data);
data/sipgrep-2.1.0/sipgrep.c:1754:4:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	  printf (RESET);
data/sipgrep-2.1.0/sipgrep.c:1758:4:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	  printf (RESET);
data/sipgrep-2.1.0/sipgrep.c:1839:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf (mine, BPF_MAIN_FILTER, str);
data/sipgrep-2.1.0/sipgrep.c:1864:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf (mine, (reasm_enable ? BPF_DEFRAGMENTION_FILTER : BPF_MAIN_PORTRANGE_FILTER), str);
data/sipgrep-2.1.0/sipgrep.c:1896:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf (mine, BPF_MAIN_FILTER, theirs);
data/sipgrep-2.1.0/sipgrep.c:2207:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  printf (BOLDMAGENTA "-----------------------------------------------\nDialog finished: [%s]\n" RESET, s->callid);
data/sipgrep-2.1.0/sipgrep.c:2208:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  printf (BOLDGREEN "Type: " RESET);
data/sipgrep-2.1.0/sipgrep.c:2213:7:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      printf (BOLDGREEN "Call\n" RESET);
data/sipgrep-2.1.0/sipgrep.c:2214:7:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      printf (BOLDGREEN "From: %s\n" RESET, s->from);
data/sipgrep-2.1.0/sipgrep.c:2215:7:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      printf (BOLDGREEN "To: %s\n" RESET, s->to);
data/sipgrep-2.1.0/sipgrep.c:2216:7:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      printf (BOLDGREEN "UAC: %s\n" RESET, s->uac);
data/sipgrep-2.1.0/sipgrep.c:2217:7:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      printf (BOLDGREEN "CDR init ts: %d\n" RESET, s->cdr_init);
data/sipgrep-2.1.0/sipgrep.c:2220:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf (BOLDGREEN "CDR ringing ts: %d\n" RESET, s->cdr_ringing);
data/sipgrep-2.1.0/sipgrep.c:2221:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf (BOLDGREEN "SRD(PDD): %d sec\n" RESET, (s->cdr_ringing - s->cdr_init));
data/sipgrep-2.1.0/sipgrep.c:2224:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf (BOLDGREEN "CDR answer ts: %d\n" RESET, s->cdr_connect);
data/sipgrep-2.1.0/sipgrep.c:2230:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf (BOLDGREEN "WTA: %d sec\n" RESET, connectdelta);
data/sipgrep-2.1.0/sipgrep.c:2231:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf (BOLDGREEN "CDT (duration): %d sec\n" RESET, durationdelta);
data/sipgrep-2.1.0/sipgrep.c:2237:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf (BOLDGREEN "SDT: %d sec\n" RESET, durationdelta);
data/sipgrep-2.1.0/sipgrep.c:2240:7:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      printf (BOLDGREEN "CDR termination ts: %d\n" RESET, s->cdr_disconnect);
data/sipgrep-2.1.0/sipgrep.c:2241:7:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      printf (BOLDGREEN "Was connected: %s\n" RESET, s->cdr_connect > 0 ? "YES" : "NO");
data/sipgrep-2.1.0/sipgrep.c:2244:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf (BOLDGREEN "REASON: NOT TERMINATED\n" RESET);
data/sipgrep-2.1.0/sipgrep.c:2246:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf (BOLDGREEN "REASON: BYE\n" RESET);
data/sipgrep-2.1.0/sipgrep.c:2248:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf (BOLDGREEN "REASON: %d\n" RESET, s->termination_reason);
data/sipgrep-2.1.0/sipgrep.c:2254:7:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      printf (BOLDBLUE "Registration\n" RESET);
data/sipgrep-2.1.0/sipgrep.c:2255:7:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      printf (BOLDGREEN "From: %s\n" RESET, s->from);
data/sipgrep-2.1.0/sipgrep.c:2256:7:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      printf (BOLDGREEN "To: %s\n" RESET, s->to);
data/sipgrep-2.1.0/sipgrep.c:2257:7:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      printf (BOLDGREEN "UAC: %s\n" RESET, s->uac);
data/sipgrep-2.1.0/sipgrep.c:2258:7:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      printf (BOLDGREEN "CDR init ts: %d\n" RESET, s->cdr_init);
data/sipgrep-2.1.0/sipgrep.c:2261:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf (BOLDGREEN "CDR termination ts: %d\n" RESET, s->cdr_connect);
data/sipgrep-2.1.0/sipgrep.c:2268:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf (BOLDGREEN "CDR termination: %d\n" RESET, s->cdr_disconnect);
data/sipgrep-2.1.0/sipgrep.c:2271:7:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      printf (BOLDGREEN "SDT: %d sec\n" RESET, durationdelta);
data/sipgrep-2.1.0/sipgrep.c:2272:7:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      printf (BOLDGREEN "Was registered: %s\n" RESET, s->registered ? "YES" : "NO");
data/sipgrep-2.1.0/sipgrep.c:2275:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf (BOLDGREEN "REASON: NOT TERMINATED\n" RESET);
data/sipgrep-2.1.0/sipgrep.c:2277:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf (BOLDGREEN "REASON: %d\n" RESET, s->termination_reason);
data/sipgrep-2.1.0/sipgrep.c:2285:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  printf (BOLDMAGENTA "-----------------------------------------------\n\n" RESET);
data/sipgrep-2.1.0/uthash.h:277:29:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0)
data/sipgrep-2.1.0/sipgrep.c:236:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((c = getopt (argc, argv, "axNhCXViwmpevlDTRMGJgs:n:c:q:H:d:A:I:O:S:F:P:f:t:j:K:Q:z:"))
data/sipgrep-2.1.0/core_hep.h:103:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char id[4];
data/sipgrep-2.1.0/ipreasm.c:442:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (p, frag->data, offset0);
data/sipgrep-2.1.0/ipreasm.c:446:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy (p + offset0 + frag->offset, frag->data + frag->data_offset, frag->len);
data/sipgrep-2.1.0/ipreasm.c:687:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy (id->ipv4.ip_src, &ip_header->ip_src, 4);
data/sipgrep-2.1.0/ipreasm.c:688:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy (id->ipv4.ip_dst, &ip_header->ip_dst, 4);
data/sipgrep-2.1.0/ipreasm.c:704:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy (id->ipv6.ip_src, &ip6_header->ip6_src, 16);
data/sipgrep-2.1.0/ipreasm.c:705:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy (id->ipv6.ip_dst, &ip6_header->ip6_dst, 16);
data/sipgrep-2.1.0/sipgrep.c:168:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char pc_err[PCAP_ERRBUF_SIZE];
data/sipgrep-2.1.0/sipgrep.c:247:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      limitlen = atoi (optarg);
data/sipgrep-2.1.0/sipgrep.c:252:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      stats_duration = atoi (optarg);
data/sipgrep-2.1.0/sipgrep.c:300:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      match_after = atoi (optarg) + 1;
data/sipgrep-2.1.0/sipgrep.c:322:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      max_matches = atoi (optarg);
data/sipgrep-2.1.0/sipgrep.c:332:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	uint16_t value = atoi (optarg);
data/sipgrep-2.1.0/sipgrep.c:454:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024] = { 0 };
data/sipgrep-2.1.0/sipgrep.c:455:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen (filter_file, "r");
data/sipgrep-2.1.0/sipgrep.c:669:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char file_ts[256];
data/sipgrep-2.1.0/sipgrep.c:740:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char ip_src[INET6_ADDRSTRLEN + 1], ip_dst[INET6_ADDRSTRLEN + 1];
data/sipgrep-2.1.0/sipgrep.c:758:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (new_p, ip4_pkt, len - link_offset - ((ntohs ((uint16_t) * (p + 12)) == 0x8100) ? 4 : 0));
data/sipgrep-2.1.0/sipgrep.c:850:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(new_p_2, data, len);
data/sipgrep-2.1.0/sipgrep.c:998:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  if ((stop_working_value = atoi (request + 9)) > 0)
data/sipgrep-2.1.0/sipgrep.c:1020:27:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  if ((split_file_value = atoi (request + 9)) > 0) {
data/sipgrep-2.1.0/sipgrep.c:1202:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char callid[256];
data/sipgrep-2.1.0/sipgrep.c:1203:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char method[100];
data/sipgrep-2.1.0/sipgrep.c:2349:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char port[20];
data/sipgrep-2.1.0/sipgrep.c:2414:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy (hg->header.id, "\x48\x45\x50\x33", 4);
data/sipgrep-2.1.0/sipgrep.c:2530:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy ((void *) buffer, hg, sizeof (struct hep_generic));
data/sipgrep-2.1.0/sipgrep.c:2536:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy ((void *) buffer + buflen, &src_ip4, sizeof (struct hep_chunk_ip4));
data/sipgrep-2.1.0/sipgrep.c:2539:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy ((void *) buffer + buflen, &dst_ip4, sizeof (struct hep_chunk_ip4));
data/sipgrep-2.1.0/sipgrep.c:2546:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy ((void *) buffer + buflen, &src_ip4, sizeof (struct hep_chunk_ip6));
data/sipgrep-2.1.0/sipgrep.c:2549:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy ((void *) buffer + buflen, &dst_ip6, sizeof (struct hep_chunk_ip6));
data/sipgrep-2.1.0/sipgrep.c:2557:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy ((void *) buffer + buflen, &authkey_chunk, sizeof (struct hep_chunk));
data/sipgrep-2.1.0/sipgrep.c:2561:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy ((void *) buffer + buflen, capt_password, strlen (capt_password));
data/sipgrep-2.1.0/sipgrep.c:2566:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy ((void *) buffer + buflen, &payload_chunk, sizeof (struct hep_chunk));
data/sipgrep-2.1.0/sipgrep.c:2570:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy ((void *) buffer + buflen, data, len);
data/sipgrep-2.1.0/sipgrep.c:2592:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char ip_src[200];
data/sipgrep-2.1.0/sipgrep.c:2602:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      stop_port = atoi (++ports);
data/sipgrep-2.1.0/sipgrep.c:2605:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    start_port = atoi (pch);
data/sipgrep-2.1.0/sipgrep.h:170:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char callid[256];             /* key (string is WITHIN the structure) */
data/sipgrep-2.1.0/sipgrep.h:180:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char from[256];
data/sipgrep-2.1.0/sipgrep.h:181:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char to[256];
data/sipgrep-2.1.0/sipgrep.h:182:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char uac[256];
data/sipgrep-2.1.0/sipgrep.h:189:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char callid[256];             /* key (string is WITHIN the structure) */
data/sipgrep-2.1.0/sipgrep.h:198:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char method[100];             /* key (string is WITHIN the structure) */
data/sipgrep-2.1.0/sipgrep.h:199:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char orig_method[50];             /* key (string is WITHIN the structure) */
data/sipgrep-2.1.0/sipgrep.h:200:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char cseq_method[50];             /* key (string is WITHIN the structure) */
data/sipgrep-2.1.0/sipparse.c:73:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (new_message, packet, packet_len);
data/sipgrep-2.1.0/sipparse.c:74:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (&new_message[packet_len], message, blen);
data/sipgrep-2.1.0/sipparse.c:114:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    psip->reply = atoi((char *)(tmp + sipLen));
data/sipgrep-2.1.0/sipparse.c:124:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (psip->reason, tmp + 12, reason - (tmp + sipLen + codeLen + 1 /*that's covering /r/n */ ));
data/sipgrep-2.1.0/sipparse.c:161:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char method[32] = { 0 };
data/sipgrep-2.1.0/sipparse.c:275:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	  psip->cseq_num = atoi((char *) (tmp + CSEQ_LEN + 1));
data/sipgrep-2.1.0/sipparse.c:306:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char contentLengthStr[32] = { 0 };
data/sipgrep-2.1.0/sipparse.c:307:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (contentLengthStr, tmp + 16, offset4);
data/sipgrep-2.1.0/sipparse.c:308:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	contentLength = atoi (contentLengthStr);
data/sipgrep-2.1.0/sipparse.c:381:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  					content_length = atoi(tmp+header_offset+1);
data/sipgrep-2.1.0/sipparse.h:123:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char reason[32];
data/sipgrep-2.1.0/tcpreasm.c:235:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (id.ipv4.ip_src, ip_src, 4);
data/sipgrep-2.1.0/tcpreasm.c:236:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy (id.ipv4.ip_dst, ip_dst, 4);
data/sipgrep-2.1.0/tcpreasm.c:440:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy (p + tlen, frag->data, frag->len);
data/sipgrep-2.1.0/sipgrep.c:504:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    custom_filter = malloc (strlen (sip_to_filter) + strlen (sip_from_filter) + strlen (SIP_FROM_TO_MATCH));
data/sipgrep-2.1.0/sipgrep.c:504:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    custom_filter = malloc (strlen (sip_to_filter) + strlen (sip_from_filter) + strlen (SIP_FROM_TO_MATCH));
data/sipgrep-2.1.0/sipgrep.c:504:81:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    custom_filter = malloc (strlen (sip_to_filter) + strlen (sip_from_filter) + strlen (SIP_FROM_TO_MATCH));
data/sipgrep-2.1.0/sipgrep.c:510:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    custom_filter = malloc (strlen (sip_from_filter) + strlen (SIP_FROM_MATCH));
data/sipgrep-2.1.0/sipgrep.c:510:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    custom_filter = malloc (strlen (sip_from_filter) + strlen (SIP_FROM_MATCH));
data/sipgrep-2.1.0/sipgrep.c:516:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    custom_filter = malloc (strlen (sip_to_filter) + strlen (SIP_TO_MATCH));
data/sipgrep-2.1.0/sipgrep.c:516:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    custom_filter = malloc (strlen (sip_to_filter) + strlen (SIP_TO_MATCH));
data/sipgrep-2.1.0/sipgrep.c:541:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      char *word_regex = malloc (strlen (match_data) * 3 + strlen (WORD_REGEX));
data/sipgrep-2.1.0/sipgrep.c:541:60:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      char *word_regex = malloc (strlen (match_data) * 3 + strlen (WORD_REGEX));
data/sipgrep-2.1.0/sipgrep.c:558:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (quiet < 2 && match_data && strlen (match_data))
data/sipgrep-2.1.0/sipgrep.c:694:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen (dump_file);
data/sipgrep-2.1.0/sipgrep.c:700:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len -= strlen (file_ext);
data/sipgrep-2.1.0/sipgrep.c:1828:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = (uint32_t) strlen (str);
data/sipgrep-2.1.0/sipgrep.c:1853:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = (uint32_t) strlen (str);
data/sipgrep-2.1.0/sipgrep.c:1880:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len += (uint32_t) strlen (*arg++) + 1;
data/sipgrep-2.1.0/sipgrep.c:1974:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
  usleep (usecs);
data/sipgrep-2.1.0/sipgrep.c:2336:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (sendto (s, SIP_CRASH, strlen (SIP_CRASH), 0, (struct sockaddr *) &si_other, slen) == -1) {
data/sipgrep-2.1.0/sipgrep.c:2516:60:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    authkey_chunk.length = htons (sizeof (authkey_chunk) + strlen (capt_password));
data/sipgrep-2.1.0/sipgrep.c:2517:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    tlen += strlen (capt_password);
data/sipgrep-2.1.0/sipgrep.c:2561:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    memcpy ((void *) buffer + buflen, capt_password, strlen (capt_password));
data/sipgrep-2.1.0/sipgrep.c:2562:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    buflen += strlen (capt_password);
data/sipgrep-2.1.0/sipgrep.c:2626:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (sendto (s, SIP_CRASH, strlen (SIP_CRASH), 0, (struct sockaddr *) &si_other, slen) == -1) {
data/sipgrep-2.1.0/sipparse.c:110:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int sipLen = strlen (sip20);
data/sipgrep-2.1.0/uthash.h:253:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    HASH_FIND(hh,head,findstr,strlen(findstr),out)
data/sipgrep-2.1.0/uthash.h:255:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    HASH_ADD(hh,head,strfield[0],strlen(add->strfield),add)
data/sipgrep-2.1.0/uthash.h:257:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  HASH_REPLACE(hh,head,strfield,strlen(add->strfield),add,replaced)

ANALYSIS SUMMARY:

Hits = 126
Lines analyzed = 5969 in approximately 0.28 seconds (21187 lines/second)
Physical Source Lines of Code (SLOC) = 4296
Hits@level = [0] 113 [1]  26 [2]  59 [3]   1 [4]  40 [5]   0
Hits@level+ = [0+] 239 [1+] 126 [2+] 100 [3+]  41 [4+]  40 [5+]   0
Hits/KSLOC@level+ = [0+] 55.6331 [1+] 29.3296 [2+] 23.2775 [3+] 9.54376 [4+] 9.31099 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.