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/kodi-pvr-argustv-3.5.4/src/EventsThread.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/EventsThread.h
Examining data/kodi-pvr-argustv-3.5.4/src/KeepAliveThread.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/KeepAliveThread.h
Examining data/kodi-pvr-argustv-3.5.4/src/activerecording.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/activerecording.h
Examining data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/argustvrpc.h
Examining data/kodi-pvr-argustv-3.5.4/src/channel.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/channel.h
Examining data/kodi-pvr-argustv-3.5.4/src/client.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/client.h
Examining data/kodi-pvr-argustv-3.5.4/src/epg.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/epg.h
Examining data/kodi-pvr-argustv-3.5.4/src/guideprogram.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/guideprogram.h
Examining data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/FileReader.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/FileReader.h
Examining data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/MultiFileReader.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/MultiFileReader.h
Examining data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/TSReader.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/TSReader.h
Examining data/kodi-pvr-argustv-3.5.4/src/pvrclient-argustv.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/pvrclient-argustv.h
Examining data/kodi-pvr-argustv-3.5.4/src/recording.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/recording.h
Examining data/kodi-pvr-argustv-3.5.4/src/recordinggroup.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/recordinggroup.h
Examining data/kodi-pvr-argustv-3.5.4/src/tools.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/tools.h
Examining data/kodi-pvr-argustv-3.5.4/src/upcomingrecording.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/upcomingrecording.h
Examining data/kodi-pvr-argustv-3.5.4/src/uri.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/uri.h
Examining data/kodi-pvr-argustv-3.5.4/src/utils.cpp
Examining data/kodi-pvr-argustv-3.5.4/src/utils.h

FINAL RESULTS:

data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:687:7:  [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(command, 256, ATV_GETEPG_45, 
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:86:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[1024];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:112:19:  [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 *ofile = fopen(filename.c_str(), "w+b");
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:129:20:  [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[1024];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:208:5:  [2] (buffer) wchar_t:
  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.
    wchar_t wpath[MAX_PATH];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:212: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 tmppath[MAX_PATH];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:238: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 command[512];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:407: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 command[128];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:539: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 command[512];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:684: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 command[256];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:798: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[512];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:817: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[512];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:899: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 command[256];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:1063: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 command[256];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:1137: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 formatbuffer[256];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:1212: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 formatbuffer[256];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:1262: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 command[256];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:1283: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 arguments[1024];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:1318: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 command[256];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:1345: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 command[256];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:1365: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 command[256];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:1394: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 command[256];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:1459: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).
    ticks = atoi(wcfdate.substr(6, 10).c_str()); //only take the first 10 chars (fits in a 32-bit time_t value)
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:1461: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).
    offsetv = atoi(wcfdate.substr(20, 4).c_str());
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:1495: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 ticks[15], offset[8];
data/kodi-pvr-argustv-3.5.4/src/argustvrpc.cpp:1498: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 result[29];
data/kodi-pvr-argustv-3.5.4/src/client.cpp:100: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 buffer[1024];
data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/TSReader.cpp:57: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 url[MAX_PATH];
data/kodi-pvr-argustv-3.5.4/src/pvrclient-argustv.cpp:95: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 buffer[256];
data/kodi-pvr-argustv-3.5.4/src/pvrclient-argustv.h:140: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 ofn[25];
data/kodi-pvr-argustv-3.5.4/src/utils.cpp:60:18:  [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 buffer[16];
data/kodi-pvr-argustv-3.5.4/src/utils.cpp:99: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 c_3[3];
data/kodi-pvr-argustv-3.5.4/src/utils.cpp:100: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 c_4[4];
data/kodi-pvr-argustv-3.5.4/src/client.h:60:39:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
#define PVR_STRCPY(dest, source) do { strncpy(dest, source, sizeof(dest)-1); dest[sizeof(dest)-1] = '\0'; } while(0)
data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/FileReader.cpp:86:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(pszFileName) > MAX_PATH)
data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/FileReader.cpp:96:32:  [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).
    m_pFileName = new char[1 + strlen(pszFileName)];
data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/FileReader.cpp:100:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(m_pFileName, pszFileName, strlen(pszFileName) + 1);
data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/FileReader.cpp:100:39:  [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).
    strncpy(m_pFileName, pszFileName, strlen(pszFileName) + 1);
data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/FileReader.cpp:142:7:  [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(20000);
data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/MultiFileReader.cpp:116:7:  [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(500000);
data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/MultiFileReader.cpp:131:9:  [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(100000);
data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/MultiFileReader.cpp:407:9:  [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(5000);
data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/TSReader.cpp:58:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(url, m_fileName.c_str(), MAX_PATH - 1);
data/kodi-pvr-argustv-3.5.4/src/lib/tsreader/TSReader.cpp:62:18:  [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(url);
data/kodi-pvr-argustv-3.5.4/src/pvrclient-argustv.cpp:71:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
  strncpy(ofn, "/tmp/atv.XXXXXX", sizeof(ofn));
data/kodi-pvr-argustv-3.5.4/src/pvrclient-argustv.cpp:132:10:  [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(1000000);
data/kodi-pvr-argustv-3.5.4/src/pvrclient-argustv.cpp:1270:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
    strncpy(ofn, "/tmp/atv.XXXXXX", sizeof(ofn));
data/kodi-pvr-argustv-3.5.4/src/pvrclient-argustv.cpp:1297: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(1000 * g_iTuneDelay);
data/kodi-pvr-argustv-3.5.4/src/pvrclient-argustv.cpp:1337:7:  [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(400000);
data/kodi-pvr-argustv-3.5.4/src/pvrclient-argustv.cpp:1354:7:  [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(40000);

ANALYSIS SUMMARY:

Hits = 50
Lines analyzed = 7667 in approximately 1.05 seconds (7298 lines/second)
Physical Source Lines of Code (SLOC) = 5153
Hits@level = [0]  24 [1]  17 [2]  32 [3]   0 [4]   1 [5]   0
Hits@level+ = [0+]  74 [1+]  50 [2+]  33 [3+]   1 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 14.3606 [1+] 9.70309 [2+] 6.40404 [3+] 0.194062 [4+] 0.194062 [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.