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/dvgrab-3.5+git20160707.1.e46042e/rawdump.c
Examining data/dvgrab-3.5+git20160707.1.e46042e/avi.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/filehandler.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/iec13818-1.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/frame.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/v4l2reader.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/hdvframe.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/iec13818-1.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/smiltime.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/ieee1394io.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/main.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/dvframe.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/raw1394util.c
Examining data/dvgrab-3.5+git20160707.1.e46042e/io.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/avi.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/filehandler.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/raw1394util.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/stringutils.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/iec13818-2.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/affine.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/stringutils.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/riffdump.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/ieee1394io.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/srt.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/srt.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/frame.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/error.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/smiltime.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/io.c
Examining data/dvgrab-3.5+git20160707.1.e46042e/dvframe.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/iec13818-2.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/v4l2reader.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/riff.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/riff.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/hdvframe.h
Examining data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc
Examining data/dvgrab-3.5+git20160707.1.e46042e/error.cc

FINAL RESULTS:

data/dvgrab-3.5+git20160707.1.e46042e/dvframe.cc:688:36:  [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.
		if ( decoder->audio->aaux_as.pc3.system )
data/dvgrab-3.5+git20160707.1.e46042e/error.cc:96:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf( stderr, line, list );
data/dvgrab-3.5+git20160707.1.e46042e/io.c:74:4:  [4] (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).
			strcpy( input, input + 1 );
data/dvgrab-3.5+git20160707.1.e46042e/io.c:82:2:  [4] (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).
	strcpy( output, use );
data/dvgrab-3.5+git20160707.1.e46042e/io.c:86:4:  [4] (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).
			strcpy( output, use );
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:63:8:  [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 g_zeroes[ PADDING_SIZE ];
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:1437: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 soundbuf[ 20000 ];
data/dvgrab-3.5+git20160707.1.e46042e/dvframe.cc:67:20:  [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* libdv_log = fopen( "/dev/null", "w" );
data/dvgrab-3.5+git20160707.1.e46042e/dvframe.cc:318: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( pack.data, &decoder->audio->aaux_as, 5 );
data/dvgrab-3.5+git20160707.1.e46042e/dvframe.cc:323: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( pack.data, &decoder->audio->aaux_asc, 5 );
data/dvgrab-3.5+git20160707.1.e46042e/dvframe.cc:330: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( pack.data, decoder->audio->aaux_as1, 5 );
data/dvgrab-3.5+git20160707.1.e46042e/dvframe.cc:335: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( pack.data, decoder->audio->aaux_asc1, 5 );
data/dvgrab-3.5+git20160707.1.e46042e/dvframe.cc:854: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( ( uint8_t * ) image + width * ( i + 1 ), ( uint8_t * ) image + width * i, width );
data/dvgrab-3.5+git20160707.1.e46042e/dvframe.cc:859: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 * pixels[ 3 ];
data/dvgrab-3.5+git20160707.1.e46042e/dvframe.cc:884: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 * pixels[ 3 ];
data/dvgrab-3.5+git20160707.1.e46042e/dvframe.h:41: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 data[ 5 ];
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:440: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).
				m_timeSplit = atoi( optarg );
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:454:20:  [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).
			m_frame_count = atoi( optarg );
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:467:22:  [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).
			m_max_file_size = atoi( optarg );
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:799: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 tc_str[64], rd_str[128];
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:802: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( tc_str, "%2.2d:%2.2d:%2.2d.%2.2d", 
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:805: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( tc_str, "??:??:??.??" );
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:808: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( rd_str, "%4.4d.%2.2d.%2.2d %2.2d:%2.2d:%2.2d",
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:812: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( rd_str, "????.??.?? ??:??:??" );
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:940: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 tc[32], rd[32];
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:943: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( tc, "%2.2d:%2.2d:%2.2d.%2.2d",
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:946: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( tc, "??:??:??.??" );
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:949: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( rd, "%4.4d.%2.2d.%2.2d %2.2d:%2.2d:%2.2d",
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:953: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( rd, "????.??.?? ??:??:??" );
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:1088: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 s[ 32 ];
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:1123: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( s, "%8.2f", ( float ) m_writer->GetFramesWritten() / m_frame->GetFrameRate() );
data/dvgrab-3.5+git20160707.1.e46042e/error.cc:79: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 line[ 1024 ];
data/dvgrab-3.5+git20160707.1.e46042e/filehandler.cc:545: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( filename.c_str(), O_CREAT | O_TRUNC | O_RDWR | O_NONBLOCK, 0644 );
data/dvgrab-3.5+git20160707.1.e46042e/filehandler.cc:589: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 data[ 4 ];
data/dvgrab-3.5+git20160707.1.e46042e/filehandler.cc:598: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( s, O_RDWR | O_NONBLOCK );
data/dvgrab-3.5+git20160707.1.e46042e/filehandler.cc:1112: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( src, dest, width * height * 3 );
data/dvgrab-3.5+git20160707.1.e46042e/filehandler.cc:1146: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( src, dest, width * height * 3 );
data/dvgrab-3.5+git20160707.1.e46042e/filehandler.cc:1258:13:  [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).
		outfile = fopen( const_cast<char*>( this->temp.c_str() ), "wb" );
data/dvgrab-3.5+git20160707.1.e46042e/filehandler.cc:1260:13:  [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).
		outfile = fopen( const_cast<char*>( file.c_str() ), "wb" );
data/dvgrab-3.5+git20160707.1.e46042e/filehandler.cc:1321: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( filename.c_str(), O_CREAT | O_TRUNC | O_RDWR | O_NONBLOCK, 0644 );
data/dvgrab-3.5+git20160707.1.e46042e/filehandler.cc:1340: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( &buffer[bufferLen], frame->data, frame->GetDataLen() );
data/dvgrab-3.5+git20160707.1.e46042e/filehandler.h:345: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 buffer[MPEG2_BUFFER_SIZE];
data/dvgrab-3.5+git20160707.1.e46042e/frame.h:66: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 data[ DATA_BUFFER_LEN ];
data/dvgrab-3.5+git20160707.1.e46042e/hdvframe.cc:79: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( data, params->carryover_data, params->carryover_length );
data/dvgrab-3.5+git20160707.1.e46042e/hdvframe.cc:247: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( params->carryover_data, &data[lastDataLen], params->carryover_length );
data/dvgrab-3.5+git20160707.1.e46042e/hdvframe.h:46: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 carryover_data[CARRYOVER_DATA_MAX_SIZE];
data/dvgrab-3.5+git20160707.1.e46042e/iec13818-1.cc:486: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( &data[length], d, l );
data/dvgrab-3.5+git20160707.1.e46042e/iec13818-1.h:45:17:  [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 unsigned char bitmask[8] = { 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
data/dvgrab-3.5+git20160707.1.e46042e/iec13818-1.h:211: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 data[MAX_PES_SIZE];
data/dvgrab-3.5+git20160707.1.e46042e/ieee1394io.cc:540: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( &currentFrame->data[currentFrame->GetDataLen()], data, length );
data/dvgrab-3.5+git20160707.1.e46042e/ieee1394io.cc:945:5:  [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( timecode, "%2.2x:%2.2x:%2.2x:%2.2x",
data/dvgrab-3.5+git20160707.1.e46042e/ieee1394io.cc:967:4:  [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 currentGUIDStr[ 65 ];
data/dvgrab-3.5+git20160707.1.e46042e/ieee1394io.cc:1100:10:  [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 = fopen( input_file, "rb" );
data/dvgrab-3.5+git20160707.1.e46042e/io.c:95: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 temp[ 132 ];
data/dvgrab-3.5+git20160707.1.e46042e/io.c:100: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).
			* output = atoi( temp );
data/dvgrab-3.5+git20160707.1.e46042e/rawdump.c:12: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 buffer[4096];
data/dvgrab-3.5+git20160707.1.e46042e/rawdump.c:19: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).
  gfd = open(argv[1], O_RDONLY);
data/dvgrab-3.5+git20160707.1.e46042e/riff.cc:133: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).
	fd = open( s, O_RDWR | O_NONBLOCK | O_CREAT | O_TRUNC, 00644 );
data/dvgrab-3.5+git20160707.1.e46042e/riff.cc:149: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).
	fd = open( s, O_RDONLY | O_NONBLOCK );
data/dvgrab-3.5+git20160707.1.e46042e/smiltime.cc:251:13:  [2] (integer) atol:
  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).
	total += ( atol( hours.c_str() ) * 3600 + atol( minutes.c_str() ) * 60 +
data/dvgrab-3.5+git20160707.1.e46042e/smiltime.cc:251:44:  [2] (integer) atol:
  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).
	total += ( atol( hours.c_str() ) * 3600 + atol( minutes.c_str() ) * 60 +
data/dvgrab-3.5+git20160707.1.e46042e/smiltime.cc:252:13:  [2] (integer) atol:
  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).
	           atol( seconds.c_str() ) ) * 1000 + ( long ) ( atof( milliseconds.c_str() ) * 1000 );
data/dvgrab-3.5+git20160707.1.e46042e/smiltime.cc:485:13:  [2] (integer) atol:
  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).
	long min = atol( minutes.c_str() );
data/dvgrab-3.5+git20160707.1.e46042e/smiltime.cc:486:14:  [2] (integer) atol:
  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).
	timeValue = atol( hours.c_str() ) * ( 30 * 60 * 60 - 108 )
data/dvgrab-3.5+git20160707.1.e46042e/smiltime.cc:489:5:  [2] (integer) atol:
  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).
		+ atol( seconds.c_str() ) * 30
data/dvgrab-3.5+git20160707.1.e46042e/smiltime.cc:490:5:  [2] (integer) atol:
  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).
		+ atol( frames.c_str() );
data/dvgrab-3.5+git20160707.1.e46042e/smiltime.cc:571:16:  [2] (integer) atol:
  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).
	timeValue = ( atol( hours.c_str() ) * 3600 + atol( minutes.c_str() ) * 60 +
data/dvgrab-3.5+git20160707.1.e46042e/smiltime.cc:571:47:  [2] (integer) atol:
  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).
	timeValue = ( atol( hours.c_str() ) * 3600 + atol( minutes.c_str() ) * 60 +
data/dvgrab-3.5+git20160707.1.e46042e/smiltime.cc:572:7:  [2] (integer) atol:
  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).
				  atol( seconds.c_str() ) ) * 1000 + 
data/dvgrab-3.5+git20160707.1.e46042e/smiltime.cc:636: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 s[ 12 ];
data/dvgrab-3.5+git20160707.1.e46042e/srt.cc:85: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 srtName[FILENAME_MAX];
data/dvgrab-3.5+git20160707.1.e46042e/srt.cc:99: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).
		os_tc.open( "datecode.srt1" );
data/dvgrab-3.5+git20160707.1.e46042e/srt.cc:100: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).
		os_fr.open( "datecode.srt" );
data/dvgrab-3.5+git20160707.1.e46042e/srt.cc:104: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( srtName, videoName, baseLen );
data/dvgrab-3.5+git20160707.1.e46042e/srt.cc:105:3:  [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( srtName + baseLen, ".srt1" );
data/dvgrab-3.5+git20160707.1.e46042e/srt.cc:106: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).
		os_tc.open( srtName );
data/dvgrab-3.5+git20160707.1.e46042e/srt.cc:107:3:  [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( srtName + baseLen, ".srt0" );
data/dvgrab-3.5+git20160707.1.e46042e/srt.cc:108: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).
		os_fr.open( srtName );
data/dvgrab-3.5+git20160707.1.e46042e/stringutils.cc:72: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 s[ 81 ];
data/dvgrab-3.5+git20160707.1.e46042e/stringutils.cc:74:2:  [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 ( s, "%ld", num );
data/dvgrab-3.5+git20160707.1.e46042e/stringutils.cc:80: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 s[ 81 ];
data/dvgrab-3.5+git20160707.1.e46042e/stringutils.cc:82:2:  [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 ( s, "%d", num );
data/dvgrab-3.5+git20160707.1.e46042e/v4l2reader.cc:66:20:  [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).
		fail_neg( m_fd = open( m_device, O_RDWR | O_NONBLOCK, 0 ) );
data/dvgrab-3.5+git20160707.1.e46042e/v4l2reader.cc:269: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( currentFrame->data, m_buffers[buf.index].start, length );
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:326:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			fail_neg( read( fd, ix[ 0 ], indx[ 0 ] ->aIndex[ i ].dwSize - RIFF_HEADERSIZE ) );
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:398:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	fail_neg( read( fd, frame->data, size ) );
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:431:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		fail_neg( read( fd, &main_avi_header, sizeof( MainAVIHeader ) ) );
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:453:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		fail_neg( read( fd, &avi_stream_header, sizeof( AVIStreamHeader ) ) );
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:487:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		fail_neg( read( fd, &avi_super_index, sizeof( AVISuperIndex ) ) );
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:517:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			fail_neg( read( fd, &waveformatex, sizeof( WAVEFORMATEX ) ) );
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:530:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			fail_neg( read( fd, &bitmapinfo, sizeof( BITMAPINFOHEADER ) ) );
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:547:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			fail_neg( read( fd, &dvinfo, sizeof( DVINFO ) ) );
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:567:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		fail_neg( read( fd, &avi_std_index, sizeof( AVIStdIndex ) ) );
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:600:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		fail_neg( read( fd, idx1, entry.length ) );
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:626:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		fail_neg( read( fd, dmlh, entry.length ) );
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:653:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	fail_neg( read( fd, &type, sizeof( type ) ) );
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:654:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	fail_neg( read( fd, &length, sizeof( length ) ) );
data/dvgrab-3.5+git20160707.1.e46042e/avi.cc:663:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	fail_neg( read( fd, &name, sizeof( name ) ) );
data/dvgrab-3.5+git20160707.1.e46042e/dvgrab.cc:244:2:  [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(10000);
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:105:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	T	read() const {
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:119:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		return read();
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:122:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		write(read() + 1);
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:126:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		write(read() + 1);
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:130:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		write(read() - 1);
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:134:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		write(read() - 1);
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:138:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		write(read() + t);
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:142:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		write(read() - t);
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:159:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	T	read() const {
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:173:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		return read();
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:176:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		write(read() + 1);
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:180:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		write(read() + 1);
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:184:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		write(read() - 1);
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:188:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		write(read() - 1);
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:192:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		write(read() + t);
data/dvgrab-3.5+git20160707.1.e46042e/endian_types.h:196:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		write(read() - t);
data/dvgrab-3.5+git20160707.1.e46042e/filehandler.cc:603:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ( read( fd, data, 4 ) < 0 )
data/dvgrab-3.5+git20160707.1.e46042e/filehandler.cc:620:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ( read( fd, frame->data, size ) > 0 )
data/dvgrab-3.5+git20160707.1.e46042e/io.c:41: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 length = strlen( input );
data/dvgrab-3.5+git20160707.1.e46042e/io.c:54: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 length = strlen( input );
data/dvgrab-3.5+git20160707.1.e46042e/io.c:175:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n = read( 0, &ch, 1 );
data/dvgrab-3.5+git20160707.1.e46042e/rawdump.c:23:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	result = read(gfd, &len, sizeof(len));
data/dvgrab-3.5+git20160707.1.e46042e/rawdump.c:26:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		result = read(gfd, buffer, len);
data/dvgrab-3.5+git20160707.1.e46042e/riff.cc:458:2:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	read( fd, &type, sizeof( type ) );
data/dvgrab-3.5+git20160707.1.e46042e/riff.cc:470:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		fail_neg( read( fd, &length, sizeof( length ) ) );
data/dvgrab-3.5+git20160707.1.e46042e/riff.cc:495:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	fail_neg( read( fd, &type, sizeof( type ) ) );
data/dvgrab-3.5+git20160707.1.e46042e/riff.cc:496:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	fail_neg( read( fd, &length, sizeof( length ) ) );
data/dvgrab-3.5+git20160707.1.e46042e/riff.cc:506:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	fail_neg( read( fd, &name, sizeof( name ) ) );
data/dvgrab-3.5+git20160707.1.e46042e/riff.cc:541:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ( ( read( fd, &type, sizeof( type ) ) > 0 ) &&
data/dvgrab-3.5+git20160707.1.e46042e/riff.cc:542:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	        ( read( fd, &length, sizeof( length ) ) > 0 ) &&
data/dvgrab-3.5+git20160707.1.e46042e/riff.cc:569:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	fail_neg( read( fd, data, entry.length ) );

ANALYSIS SUMMARY:

Hits = 130
Lines analyzed = 15054 in approximately 0.35 seconds (42819 lines/second)
Physical Source Lines of Code (SLOC) = 10814
Hits@level = [0]  39 [1]  46 [2]  79 [3]   0 [4]   5 [5]   0
Hits@level+ = [0+] 169 [1+] 130 [2+]  84 [3+]   5 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 15.6279 [1+] 12.0215 [2+] 7.76771 [3+] 0.462364 [4+] 0.462364 [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.