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/antpm-1.19/3rd_party/libusb-win32-bin-1.2.6.0/include/lusb0_usb.h
Examining data/antpm-1.19/3rd_party/usbmon-6/usbmon.c
Examining data/antpm-1.19/src/AntChannel.cpp
Examining data/antpm-1.19/src/AntChannel.hpp
Examining data/antpm-1.19/src/AntFr310XT.cpp
Examining data/antpm-1.19/src/AntFr310XT.hpp
Examining data/antpm-1.19/src/AntMessage.cpp
Examining data/antpm-1.19/src/AntMessage.hpp
Examining data/antpm-1.19/src/AntMessenger.cpp
Examining data/antpm-1.19/src/AntMessenger.hpp
Examining data/antpm-1.19/src/DeviceSettings.cpp
Examining data/antpm-1.19/src/DeviceSettings.hpp
Examining data/antpm-1.19/src/FIT.cpp
Examining data/antpm-1.19/src/FIT.hpp
Examining data/antpm-1.19/src/GPX.cpp
Examining data/antpm-1.19/src/GPX.hpp
Examining data/antpm-1.19/src/GarminConvert.cpp
Examining data/antpm-1.19/src/GarminConvert.hpp
Examining data/antpm-1.19/src/GarminPacketIntf.cpp
Examining data/antpm-1.19/src/GarminPacketIntf.hpp
Examining data/antpm-1.19/src/LazySingleton.hpp
Examining data/antpm-1.19/src/Log.hpp
Examining data/antpm-1.19/src/Serial.cpp
Examining data/antpm-1.19/src/Serial.hpp
Examining data/antpm-1.19/src/SerialTty.cpp
Examining data/antpm-1.19/src/SerialTty.hpp
Examining data/antpm-1.19/src/SerialUsb.cpp
Examining data/antpm-1.19/src/SerialUsb.hpp
Examining data/antpm-1.19/src/SmartPtrFwd.hpp
Examining data/antpm-1.19/src/antdefs.cpp
Examining data/antpm-1.19/src/antdefs.hpp
Examining data/antpm-1.19/src/antpm-downloader.cpp
Examining data/antpm-1.19/src/antpm-fit2gpx.cpp
Examining data/antpm-1.19/src/antpm-usbmon2ant.cpp
Examining data/antpm-1.19/src/common.cpp
Examining data/antpm-1.19/src/common.hpp
Examining data/antpm-1.19/src/gant/antdefs.h
Examining data/antpm-1.19/src/gant/antlib.c
Examining data/antpm-1.19/src/gant/antlib.h
Examining data/antpm-1.19/src/gant/gant.c
Examining data/antpm-1.19/src/lqueue.hpp
Examining data/antpm-1.19/src/tests/lq1.cpp
Examining data/antpm-1.19/src/tests/sm1.cpp
Examining data/antpm-1.19/src/tests/testDateTime.cpp
Examining data/antpm-1.19/src/tests/testDeviceSettings.cpp
Examining data/antpm-1.19/src/w_inttypes.h
Examining data/antpm-1.19/src/w_stdint.h
Examining data/antpm-1.19/src/stdintfwd.hpp

FINAL RESULTS:

data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:227:3:  [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.
		fprintf(stderr, TAG ": Must run as root\n");
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:238:5:  [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.
				fprintf(stderr, TAG
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:243:5:  [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.
				fprintf(stderr, TAG ": Can't open %s: %s\n",
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:254:4:  [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.
			fprintf(stderr, TAG ": Cannot get ring size: %s\n",
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:262:4:  [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.
			fprintf(stderr, TAG ": Cannot mmap: %s\n",
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:268:4:  [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.
			fprintf(stderr, TAG ": No core\n");
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:292:5:  [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.
				fprintf(stderr, TAG ": MON_IOCX_GET: %s\n",
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:302:5:  [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.
				fprintf(stderr, TAG ": MON_IOCX_GETX: %s\n",
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:312:5:  [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.
				fprintf(stderr, TAG ": MON_IOCX_MFETCH: %s\n",
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:319:6:  [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.
					fprintf(stderr, TAG ": offset\n");
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:337:7:  [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.
						fprintf(stderr, TAG
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:343:6:  [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.
					fprintf(stderr, TAG
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:442:4:  [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.
			fprintf(stderr, TAG ": Write error: %s\n",
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:445:4:  [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.
			fprintf(stderr, TAG ": Short write\n");
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:575:4:  [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.
			fprintf(stderr, TAG ": Write error: %s\n",
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:578:4:  [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.
			fprintf(stderr, TAG ": Short write\n");
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:716:4:  [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.
			fprintf(stderr, TAG ": Write error: %s\n",
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:719:4:  [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.
			fprintf(stderr, TAG ": Short write\n");
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:802:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf(tag_buf, tag_buf_size, p->format, (long long) ep->id & ~mask);
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:822:8:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	len = vsnprintf(t->pbuf + t->count, t->size - t->count, fmt, ap);
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:861:6:  [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.
					fprintf(stderr, TAG ": Bus number %ld"
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:909:6:  [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.
					fprintf(stderr, TAG
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:929:4:  [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.
			fprintf(stderr, TAG ": No core\n");
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:945:4:  [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.
			fprintf(stderr, TAG ": -f0 requires -s 32\n");
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:955:3:  [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.
		fprintf(stderr, TAG ": No core\n");
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:968:3:  [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.
		fprintf(stderr, TAG ": Can't make device %s: %s\n",
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:983:3:  [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.
		fprintf(stderr, TAG ": Can't open /proc/devices\n");
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:1012:6:  [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.
					fprintf(stderr, TAG ": Syntax error "
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:1023:3:  [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.
		fprintf(stderr, TAG ": Can't find usbmon in /proc/devices\n");
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:1028:3:  [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.
		fprintf(stderr, TAG ": Weird major %ld in /proc/devices\n",
data/antpm-1.19/src/Log.hpp:118:62:  [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.
                                ...) __attribute__ ((format (printf, 3, 4)));
data/antpm-1.19/src/Log.hpp:172:10:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if(::access(logFileName, 0x00) != -1)
data/antpm-1.19/src/Log.hpp:237:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(msg,
data/antpm-1.19/src/gant/gant.c:27:96:  [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 DEBUG_OUT(level, ...) {if (dbg && level <= dbg){fprintf(stderr, "DEBUG(%d): ", level); fprintf(stderr, __VA_ARGS__); fprintf(stderr, " in line %d.\n", __LINE__);}}
data/antpm-1.19/src/gant/gant.c:28:53:  [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 ERROR_OUT(...) {fprintf(stderr, "ERROR: "); fprintf(stderr, __VA_ARGS__); fprintf(stderr, " in line %d.\n", __LINE__);}
data/antpm-1.19/src/gant/gant.c:1339:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(authfile, "%s/.gant", h);
data/antpm-1.19/src/tests/sm1.cpp:71:33:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  void handle_read(const boost::system::error_code& ec, std::size_t size)
data/antpm-1.19/src/tests/sm1.cpp:86:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      throw boost::system::system_error(ec);
data/antpm-1.19/src/tests/sm1.cpp:90:34:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  void handle_write(const boost::system::error_code& ec)
data/antpm-1.19/src/tests/sm1.cpp:102:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      throw boost::system::system_error(ec);
data/antpm-1.19/src/common.cpp:166:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  const char* e0 = getenv("ANTPM_DIR");
data/antpm-1.19/src/common.cpp:175:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  const char* e1 = getenv("XDG_CONFIG_HOME");
data/antpm-1.19/src/common.cpp:176:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  const char* e2 = getenv("HOME");
data/antpm-1.19/src/common.cpp:182:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  const char* e3 = getenv("USERPROFILE");
data/antpm-1.19/src/common.cpp:346:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  char* ANTPM_405 = getenv("ANTPM_405");
data/antpm-1.19/src/gant/gant.c:1334:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if (getenv("HOME"))
data/antpm-1.19/src/gant/gant.c:1336:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char* h = getenv("HOME");
data/antpm-1.19/src/gant/gant.c:1342: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(ac, av, "a:f:d:i:m:pvD:rnzh")) != -1)
data/antpm-1.19/3rd_party/libusb-win32-bin-1.2.6.0/include/lusb0_usb.h:261: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 filename[LIBUSB_PATH_MAX];
data/antpm-1.19/3rd_party/libusb-win32-bin-1.2.6.0/include/lusb0_usb.h:280: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 dirname[LIBUSB_PATH_MAX];
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:63:11:  [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.
	unsigned char setup[8];	/* Only for Control S-type */
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:81:12:  [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.
		unsigned char setup[8];	/* Only for Control S-type */
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:231:12:  [2] (misc) open:
  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).
	if ((fd = open(par.devname, O_RDWR)) == -1) {
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:234:9:  [2] (misc) open:
  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).
			fd = open(par.devname, O_RDWR);
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:603: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 tag_buf[TAG_BUF_SIZE];
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:769: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 format[sizeof("..%0NNllx")];
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:784:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(p->format,
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:796:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf(p->format,
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:799:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
			strcpy(p->format, "%016llx");
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:979: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 buff[LEN], c, *p;
data/antpm-1.19/3rd_party/usbmon-6/usbmon.c:982:12:  [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).
	if ((df = fopen("/proc/devices", "r")) == NULL) {
data/antpm-1.19/src/AntMessage.cpp:588: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 xx[3]={s[i*2], s[i*2+1], 0x00};
data/antpm-1.19/src/AntMessage.cpp:796:11:  [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(fileName, "wb");
data/antpm-1.19/src/AntMessage.cpp:804: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 tbuf[256];
data/antpm-1.19/src/AntMessage.cpp:817:11:  [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(fileName, "wb");
data/antpm-1.19/src/AntMessenger.cpp:110:48:  [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.
AntMessenger::ANT_SetNetworkKey(const unsigned char net, const unsigned char key[8])
data/antpm-1.19/src/AntMessenger.cpp:110:73:  [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.
AntMessenger::ANT_SetNetworkKey(const unsigned char net, const unsigned char key[8])
data/antpm-1.19/src/AntMessenger.cpp:115: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(buf+1, key, 8);
data/antpm-1.19/src/AntMessenger.cpp:232: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(buf+1, data, 8);
data/antpm-1.19/src/AntMessenger.cpp:345: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(cmd.name, &name[0], 8);
data/antpm-1.19/src/AntMessenger.cpp:981: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(buf+1, data, 8);
data/antpm-1.19/src/AntMessenger.hpp:121:41:  [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.
  bool ANT_SetNetworkKey(const unsigned char net, const unsigned char key[8]);
data/antpm-1.19/src/AntMessenger.hpp:121:66:  [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.
  bool ANT_SetNetworkKey(const unsigned char net, const unsigned char key[8]);
data/antpm-1.19/src/DeviceSettings.cpp:160: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 outstr[256];
data/antpm-1.19/src/GarminConvert.cpp:89: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 tbuf[256];
data/antpm-1.19/src/GarminConvert.cpp:99: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 tbuf[256];
data/antpm-1.19/src/Log.hpp:145: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 tmp[26];
data/antpm-1.19/src/Log.hpp:179:10:  [2] (misc) open:
  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).
    _ofs.open(logFileName, std::ios::out | std::ios::trunc);
data/antpm-1.19/src/Log.hpp:235: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 msg[1023+1];
data/antpm-1.19/src/Serial.cpp:99:10:  [2] (misc) open:
  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).
  if(!s->open())
data/antpm-1.19/src/Serial.cpp:105:10:  [2] (misc) open:
  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).
  if(!s->open())
data/antpm-1.19/src/Serial.cpp:111:12:  [2] (misc) open:
  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).
    if(!s->open())
data/antpm-1.19/src/Serial.hpp:29:24:  [2] (misc) open:
  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).
  virtual bool         open() = 0;
data/antpm-1.19/src/SerialTty.cpp:298:14:  [2] (misc) open:
  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).
    m_fd = ::open(m_devName.c_str(), O_RDWR | O_NONBLOCK);
data/antpm-1.19/src/SerialTty.cpp:345:12:  [2] (misc) open:
  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).
SerialTty::open()
data/antpm-1.19/src/SerialTty.cpp:382: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 se[256];
data/antpm-1.19/src/SerialTty.cpp:569:12:  [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.
  unsigned char buf[256];
data/antpm-1.19/src/SerialTty.hpp:38:16:  [2] (misc) open:
  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).
  virtual bool open();
data/antpm-1.19/src/SerialUsb.cpp:349:12:  [2] (misc) open:
  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).
SerialUsb::open()
data/antpm-1.19/src/SerialUsb.cpp:537:14:  [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.
    unsigned char buf[4096];
data/antpm-1.19/src/SerialUsb.hpp:36:16:  [2] (misc) open:
  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).
  virtual bool open();
data/antpm-1.19/src/antdefs.hpp:107:23:  [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.
static const unsigned char ANTP_NETKEY_HR[8] = {0xB9,0xA5,0x21,0xFB,0xBD,0x72,0xC3,0x45};
data/antpm-1.19/src/antdefs.hpp:108:23:  [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.
static const unsigned char ANTP_NETKEY[8] = {0xA8,0xA4,0x23,0xB9,0xF5,0x5E,0x63,0xC1}; // ANT+Sport key
data/antpm-1.19/src/antpm-fit2gpx.cpp:172: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 tbuf[256];
data/antpm-1.19/src/antpm-fit2gpx.cpp:175: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 tbuf2[256];
data/antpm-1.19/src/antpm-usbmon2ant.cpp:112:7:  [2] (misc) open:
  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).
    f.open(inputFile.c_str());
data/antpm-1.19/src/common.cpp:197:11:  [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(ss.str().c_str(), "r");
data/antpm-1.19/src/common.cpp:212:11:  [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(ss.str().c_str(), "w+");
data/antpm-1.19/src/common.cpp:241:11:  [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(fileName, "rb");
data/antpm-1.19/src/common.cpp:244:14:  [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.
    unsigned char buf[256];
data/antpm-1.19/src/gant/antlib.c:201:11:  [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(rbufp, buf+i+3, dlen);
data/antpm-1.19/src/gant/antlib.c:243:15:  [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(burstbuf[chan], buf+i+4, 8);
data/antpm-1.19/src/gant/antlib.c:257:17:  [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(burstbuf[chan], buf+i+4, 8);
data/antpm-1.19/src/gant/antlib.c:267:15:  [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(burstbuf[chan]+bused[chan], buf+i+4, 8);
data/antpm-1.19/src/gant/antlib.c:312:11:  [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(rbufp, buf+i+3, dlen);
data/antpm-1.19/src/gant/antlib.c:330:11:  [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(cbufp, buf+i+4, dlen);
data/antpm-1.19/src/gant/antlib.c:353:13:  [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(cbufp+8, &blast, 4);
data/antpm-1.19/src/gant/antlib.c:419:8:  [2] (misc) open:
  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).
  fd = open(devname, O_RDWR);
data/antpm-1.19/src/gant/antlib.c:446: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 dev[40];
data/antpm-1.19/src/gant/antlib.c:448:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(dev, "/dev/ttyUSB%d", devno);
data/antpm-1.19/src/gant/antlib.c:480: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(buf+1, key, 8);
data/antpm-1.19/src/gant/antlib.c:562: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(buf+1, data, 8);
data/antpm-1.19/src/gant/antlib.c:599: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(buf+1, data+j*8, 8);
data/antpm-1.19/src/gant/gant.c:106: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 authdata[32];
data/antpm-1.19/src/gant/gant.c:112: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 modelname[256];
data/antpm-1.19/src/gant/gant.c:113: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 deviname[256];
data/antpm-1.19/src/gant/gant.c:159:10:  [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.
  static char res[30];
data/antpm-1.19/src/gant/gant.c:182:10:  [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.
  static char time[50];
data/antpm-1.19/src/gant/gant.c:195:12:  [2] (misc) open:
  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).
  int fd = open("/dev/urandom", O_RDONLY);
data/antpm-1.19/src/gant/gant.c:273:12:  [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.
  unsigned char buf[16];
data/antpm-1.19/src/gant/gant.c:278: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(buf, data + offset + i, (size-i >= 16)? 16 : (size-i));
data/antpm-1.19/src/gant/gant.c:341: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 devname[16];
data/antpm-1.19/src/gant/gant.c:358: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 model[256];
data/antpm-1.19/src/gant/gant.c:359: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 gpsver[256];
data/antpm-1.19/src/gant/gant.c:363: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 tbuf[100];
data/antpm-1.19/src/gant/gant.c:381: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(model, data + doff + 4, pktlen - 4);
data/antpm-1.19/src/gant/gant.c:388: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(gpsver, data + doff, pktlen);
data/antpm-1.19/src/gant/gant.c:398: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(deviname, data + doff, pktlen);
data/antpm-1.19/src/gant/gant.c:665:7:  [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 *)&alt, data + doff + i + 12, 4);
data/antpm-1.19/src/gant/gant.c:666:7:  [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 *)&dist, data + doff + i + 16, 4);
data/antpm-1.19/src/gant/gant.c:777: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(&laps[lap_id].distance, &data[doff + 12], 4); /*  Dirty, but seems to work */
data/antpm-1.19/src/gant/gant.c:778: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(&laps[lap_id].max_speed, &data[doff + 16], 4);  /*  Dirty, but seems to work */
data/antpm-1.19/src/gant/gant.c:797: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(modelname, data + doff + 88, dsize - 88);
data/antpm-1.19/src/gant/gant.c:848: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 *)&id, cbuf + 4, 4);
data/antpm-1.19/src/gant/gant.c:947:18:  [2] (misc) open:
  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).
        authfd = open(authfile, O_RDONLY);
data/antpm-1.19/src/gant/gant.c:962: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((void *)&myauth1, authdata + 16, 4);
data/antpm-1.19/src/gant/gant.c:963: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((void *)&myauth2, authdata + 20, 4);
data/antpm-1.19/src/gant/gant.c:964: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((void *)&mydev, authdata + 12, 4);
data/antpm-1.19/src/gant/gant.c:965: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((void *)&myid, authdata + 4, 4);
data/antpm-1.19/src/gant/gant.c:1080: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(&blast, cbuf + 8, 4);
data/antpm-1.19/src/gant/gant.c:1097:14:  [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.
      static char ackpkt[100];
data/antpm-1.19/src/gant/gant.c:1144:7:  [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(&peerdev, blast + 12, 4);
data/antpm-1.19/src/gant/gant.c:1162:18:  [2] (misc) open:
  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).
        authfd = open(authfile, O_WRONLY | O_CREAT, 0644);
data/antpm-1.19/src/gant/gant.c:1223:7:  [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(&peerdev, blast + 12, 4);
data/antpm-1.19/src/gant/gant.c:1353:16:  [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).
      devnum = atoi(optarg);
data/antpm-1.19/src/gant/gant.c:1356:14:  [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).
      myid = atoi(optarg);
data/antpm-1.19/src/gant/gant.c:1359:15:  [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).
      mydev = atoi(optarg);
data/antpm-1.19/src/gant/gant.c:1368:13:  [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).
      dbg = atoi(optarg);
data/antpm-1.19/src/tests/sm1.cpp:201:18:  [2] (misc) open:
  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).
    virtual bool open() { return true; }
data/antpm-1.19/src/tests/sm1.cpp:227:18:  [2] (misc) open:
  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).
    virtual bool open() { return true; }
data/antpm-1.19/src/tests/sm1.cpp:267:18:  [2] (misc) open:
  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).
    virtual bool open() { return true; }
data/antpm-1.19/src/tests/testDateTime.cpp:68: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 tbuf[256];
data/antpm-1.19/src/AntMessage.cpp:582: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).
  size_t chars=strlen(s);
data/antpm-1.19/src/DeviceSettings.cpp:138:24:  [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).
  bool ok = rv==from+::strlen(from);
data/antpm-1.19/src/FIT.cpp:1364:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (zfRecord.generalFileFlags.read)    { LOG(antpm::LOG_RAW) << "[R]"; }
data/antpm-1.19/src/FIT.hpp:128:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        uint8_t read:1;
data/antpm-1.19/src/Serial.hpp:31:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual bool         read(char* dst, const size_t sizeBytes, size_t& bytesRead) = 0;
data/antpm-1.19/src/SerialTty.cpp:438:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
SerialTty::read(char* dst, const size_t sizeBytes, size_t& bytesRead)
data/antpm-1.19/src/SerialTty.cpp:570:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ssize_t rb = ::read(m_p->m_fd, buf, sizeof(buf));
data/antpm-1.19/src/SerialTty.hpp:42:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual bool read(char* dst, const size_t sizeBytes, size_t& bytesRead);
data/antpm-1.19/src/SerialUsb.cpp:431:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
SerialUsb::read(char& c)
data/antpm-1.19/src/SerialUsb.cpp:445:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
SerialUsb::read(char* dst, const size_t sizeBytes, size_t& bytesRead)
data/antpm-1.19/src/SerialUsb.hpp:39:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual bool read(char& c);
data/antpm-1.19/src/SerialUsb.hpp:40:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual bool read(char* dst, const size_t sizeBytes, size_t& bytesRead);
data/antpm-1.19/src/common.cpp:167:12:  [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(e0 && strlen(e0) > 0)
data/antpm-1.19/src/common.cpp:177:12:  [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(e1 && strlen(e1) > 0)
data/antpm-1.19/src/common.cpp:179:17:  [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).
  else if(e2 && strlen(e2) > 0)
data/antpm-1.19/src/common.cpp:183:12:  [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(e3 && strlen(e3) > 0)
data/antpm-1.19/src/gant/antlib.c:73: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(10*1000);
data/antpm-1.19/src/gant/antlib.c:124:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  nr = read(fd, buf+bufc, 20);
data/antpm-1.19/src/gant/antlib.c:464:7:  [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 (strlen((char*)key) != 16) {
data/antpm-1.19/src/gant/antlib.c:546:7:  [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 (strlen((char*)data) != 16) {
data/antpm-1.19/src/gant/antlib.c:575:7:  [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 (strlen((char*)data) != 16*numpkts) {
data/antpm-1.19/src/gant/antlib.c:583:5:  [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(20*1000);
data/antpm-1.19/src/gant/antlib.c:600:5:  [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(20*1000);
data/antpm-1.19/src/gant/gant.c:199:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t rr = read(fd, &r, sizeof r);
data/antpm-1.19/src/gant/gant.c:954:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        nr = read(authfd, authdata, 32);
data/antpm-1.19/src/gant/gant.c:1130: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).
        ANT_SendBurstTransferA(chan, (uchar *) ackpkt, strlen(ackpkt) / 16);
data/antpm-1.19/src/gant/gant.c:1140: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).
      ANT_SendBurstTransferA(chan, (uchar *) ackpkt, strlen(ackpkt) / 16);
data/antpm-1.19/src/gant/gant.c:1191:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(pair.devname, fname, sizeof(pair.devname)-1);
data/antpm-1.19/src/gant/gant.c:1194:19:  [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).
        pair.u1 = strlen(pair.devname);
data/antpm-1.19/src/gant/gant.c:1337: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).
    authfile = malloc(strlen(h) + strlen("/.gant") + 1);
data/antpm-1.19/src/gant/gant.c:1337:35:  [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).
    authfile = malloc(strlen(h) + strlen("/.gant") + 1);
data/antpm-1.19/src/tests/sm1.cpp:162:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      boost::asio::read(socket, boost::asio::buffer(reply));
data/antpm-1.19/src/tests/sm1.cpp:204:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    virtual bool read(char* dst, const size_t sizeBytes, size_t& bytesRead) {return false;}
data/antpm-1.19/src/tests/sm1.cpp:230:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    virtual bool read(char* dst, const size_t sizeBytes, size_t& bytesRead) {return false;}
data/antpm-1.19/src/tests/sm1.cpp:270:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    virtual bool read(char* dst, const size_t sizeBytes, size_t& bytesRead) {return false;}

ANALYSIS SUMMARY:

Hits = 187
Lines analyzed = 16237 in approximately 0.40 seconds (40274 lines/second)
Physical Source Lines of Code (SLOC) = 11989
Hits@level = [0]  94 [1]  35 [2] 104 [3]   8 [4]  40 [5]   0
Hits@level+ = [0+] 281 [1+] 187 [2+] 152 [3+]  48 [4+]  40 [5+]   0
Hits/KSLOC@level+ = [0+] 23.4382 [1+] 15.5976 [2+] 12.6783 [3+] 4.00367 [4+] 3.33639 [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.