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/vdr-plugin-markad-0.1.4+git20180120/command/global.h
Examining data/vdr-plugin-markad-0.1.4+git20180120/command/audio.cpp
Examining data/vdr-plugin-markad-0.1.4+git20180120/command/marks.cpp
Examining data/vdr-plugin-markad-0.1.4+git20180120/command/marks.h
Examining data/vdr-plugin-markad-0.1.4+git20180120/command/video.cpp
Examining data/vdr-plugin-markad-0.1.4+git20180120/command/streaminfo.cpp
Examining data/vdr-plugin-markad-0.1.4+git20180120/command/debug.h
Examining data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.h
Examining data/vdr-plugin-markad-0.1.4+git20180120/command/video.h
Examining data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp
Examining data/vdr-plugin-markad-0.1.4+git20180120/command/demux.h
Examining data/vdr-plugin-markad-0.1.4+git20180120/command/audio.h
Examining data/vdr-plugin-markad-0.1.4+git20180120/command/demux.cpp
Examining data/vdr-plugin-markad-0.1.4+git20180120/command/decoder.h
Examining data/vdr-plugin-markad-0.1.4+git20180120/command/streaminfo.h
Examining data/vdr-plugin-markad-0.1.4+git20180120/command/decoder.cpp
Examining data/vdr-plugin-markad-0.1.4+git20180120/plugin/setup.h
Examining data/vdr-plugin-markad-0.1.4+git20180120/plugin/status.cpp
Examining data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.h
Examining data/vdr-plugin-markad-0.1.4+git20180120/plugin/setup.cpp
Examining data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp
Examining data/vdr-plugin-markad-0.1.4+git20180120/plugin/menu.cpp
Examining data/vdr-plugin-markad-0.1.4+git20180120/plugin/status.h
Examining data/vdr-plugin-markad-0.1.4+git20180120/plugin/menu.h

FINAL RESULTS:

data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1379:13:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
        if (chown(File,statbuf.st_uid, statbuf.st_gid)==-1) return false;
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.cpp:731:21:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
                if (chown(fpath,statbuf.st_uid, statbuf.st_gid)) {};
data/vdr-plugin-markad-0.1.4+git20180120/command/debug.h:16:92:  [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.
extern void syslog_with_tid(int priority, const char *format, ...) __attribute__ ((format (printf, 2, 3)));
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:84:9:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vprintf(fmt,ap);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:3186:13:  [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(recDir,W_OK|R_OK)==-1)
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:80:18:  [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(optarg,R_OK | X_OK))!=-1)
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:94:18:  [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(optarg,R_OK))!=-1)
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:298:33:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                return cString::sprintf("Started markad for %s",Option);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:303:33:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                return cString::sprintf("Failed to start markad for %s",Option);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:309:29:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            return cString::sprintf("Missing filename");
data/vdr-plugin-markad-0.1.4+git20180120/plugin/setup.cpp:158:23:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    SetTitle(cString::sprintf("%s - %s '%s' %s",trVDR("Setup"),trVDR("Plugin"),Setup->PluginName,tr("list")));
data/vdr-plugin-markad-0.1.4+git20180120/plugin/setup.cpp:196:75:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                                    Add(new cSetupMarkAdListItem(cString::sprintf("%i\t%s",channel->Number(),channel->Name())));
data/vdr-plugin-markad-0.1.4+git20180120/plugin/status.cpp:75:28:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    cString cmd = cString::sprintf("\"%s\"/markad %s%s%s%s%s%s%s -l \"%s\" %s \"%s\"",
data/vdr-plugin-markad-0.1.4+git20180120/plugin/status.cpp:340:21:  [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(recs[actpos].FileName,R_OK)==-1) {
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2732:13:  [3] (buffer) getopt_long:
  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.
        c = getopt_long  (argc, argv, "abcd:i:jl:nop:r:s:vBCGIL:ORST:V",
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:3064:28:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
                    recDir=realpath(argv[optind],NULL);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:75:17:  [3] (buffer) getopt_long:
  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_long(argc, argv, "b:l:", long_options, NULL)) != -1)
data/vdr-plugin-markad-0.1.4+git20180120/command/decoder.cpp:42: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(dest, src, sizeof(*dest));
data/vdr-plugin-markad-0.1.4+git20180120/command/decoder.cpp:80: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(dest->obj, src->obj, size); \
data/vdr-plugin-markad-0.1.4+git20180120/command/decoder.cpp:151: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 libver[256];
data/vdr-plugin-markad-0.1.4+git20180120/command/demux.cpp:393: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(buffer,&buffer[outptr],inptr-outptr);
data/vdr-plugin-markad-0.1.4+git20180120/command/demux.cpp:416: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[inptr],Data,Size);
data/vdr-plugin-markad-0.1.4+git20180120/command/demux.cpp:1366: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(&tpkt,pkt,sizeof(AvPacket));
data/vdr-plugin-markad-0.1.4+git20180120/command/global.h:59: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 logoDirectory[1024];
data/vdr-plugin-markad-0.1.4+git20180120/command/global.h:60: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 LogoDir[1024];
data/vdr-plugin-markad-0.1.4+git20180120/command/global.h:61: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 markFileName[1024];
data/vdr-plugin-markad-0.1.4+git20180120/command/global.h:62: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 svdrphost[1024];
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:68: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 fmt[255];
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:76: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 buf[255]={0};
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:81: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 fmt[255];
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:161: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(&name.sin_addr.s_addr,host->h_addr,host->h_length);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:289: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 as[20];
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:293:13:  [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(as,"mono");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:296:13:  [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(as,"stereo");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:299:13:  [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(as,"dd5.1");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:302:13:  [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(as,"??");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:305: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 ad[20];
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:309:13:  [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(ad,"mono");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:312:13:  [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(ad,"stereo");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:315:13:  [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(ad,"dd5.1");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:318:13:  [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(ad,"??");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:669: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 szFilename[256];
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:672: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(szFilename, "/tmp/frame%06d.pgm", frame);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:673: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).
    pFile=fopen(szFilename, "wb");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:870:15:  [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 f=open(fbuf,O_RDONLY);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1076:11:  [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 f=open(fbuf,O_RDONLY);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1401:7:  [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).
    r=fopen(src,"r");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1409:7:  [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).
    w=fopen(dst,"w+");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1422: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 lang[4]="";
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1450:13:  [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 descr[256]="";
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1536:21:  [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.
    if (lang[0]==0) strcpy(lang,"und");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1701:7:  [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).
    f=fopen(buf,"r");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1707: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).
        f=fopen(buf,"r");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1719:13:  [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 channelname[256]="";
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1776:13:  [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 descr[256]="";
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1912: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(buf,O_RDONLY);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1943: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(buf,O_RDONLY);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1985: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(buf,O_RDONLY);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2128:18:  [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 *oldpid=fopen(buf,"r");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2135:13:  [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 procname[256]="";
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2158: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 *pidfile=fopen(buf,"w+");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2670:5:  [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(config.svdrphost,"127.0.0.1");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2671:5:  [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(config.logoDirectory,"/var/lib/markad");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2755:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            switch (atoi(optarg))
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2776:31:  [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).
            config.ignoreInfo=atoi(optarg);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2804:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                niceLevel = atoi(optarg);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2819:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                ioprio=atoi(str+1);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2822:26:  [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).
            ioprio_class=atoi(optarg);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2873:43:  [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).
                    config.logoExtraction=atoi(tok);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2882:38:  [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).
                    config.logoWidth=atoi(tok);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2891:39:  [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).
                    config.logoHeight=atoi(tok);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2923:28:  [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).
            config.threads=atoi(optarg);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2949:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            SysLogLevel=atoi(optarg);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2960:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                online=atoi(optarg);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2989:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            if (isnumber(optarg) && atoi(optarg) > 0 && atoi(optarg) < 65536)
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2989:57:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            if (isnumber(optarg) && atoi(optarg) > 0 && atoi(optarg) < 65536)
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2991:34:  [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).
                config.svdrpport=atoi(optarg);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:3019:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            if (isnumber(optarg) && atoi(optarg) >= 0 && atoi(optarg) <= 240)
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:3019:58:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            if (isnumber(optarg) && atoi(optarg) >= 0 && atoi(optarg) <= 240)
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:3021:34:  [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).
                config.astopoffs=atoi(optarg);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:3115:17:  [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("/dev/null", O_RDONLY);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:3131:17:  [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("/dev/null", O_WRONLY);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.h:161: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 const char frametypes[8];
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.h:175: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 title[80],*ptitle;
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.cpp:386:13:  [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 ifd=open(ipath,O_RDONLY);
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.cpp:507:17:  [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).
        indexfd=open(ipath,O_WRONLY|O_CREAT|O_TRUNC,0644);
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.cpp:547: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(ipath,O_RDONLY);
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.cpp:653:8:  [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).
    mf=fopen(fpath,"r+");
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.cpp:663: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 descr[256]="";
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.cpp:701:8:  [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).
    mf=fopen(fpath,"w+");
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.h:70: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[1024];
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.h:80:9:  [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(filename,"marks");
data/vdr-plugin-markad-0.1.4+git20180120/command/video.cpp:78: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).
    pFile=fopen(path, "rb");
data/vdr-plugin-markad-0.1.4+git20180120/command/video.cpp:153:17:  [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 *pFile=fopen(buf, "wb");
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:191:60:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    if (!strcasecmp(Name,"Execution")) setup.ProcessDuring=atoi(Value);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:192:71:  [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).
    else if (!strcasecmp(Name,"whileRecording")) setup.whileRecording=atoi(Value);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:193:71:  [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).
    else if (!strcasecmp(Name,"whileReplaying")) setup.whileReplaying=atoi(Value);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:194:63:  [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).
    else if (!strcasecmp(Name,"OSDMessage")) setup.OSDMessage=atoi(Value);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:195:59:  [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).
    else if (!strcasecmp(Name,"GenIndex")) setup.GenIndex=atoi(Value);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:196:57:  [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).
    else if (!strcasecmp(Name,"Verbose")) setup.Verbose=atoi(Value);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:197:65:  [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).
    else if (!strcasecmp(Name,"IgnoreMargins")) setup.NoMargins=atoi(Value);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:198:77:  [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).
    else if (!strcasecmp(Name,"HideMainMenuEntry")) setup.HideMainMenuEntry=atoi(Value)?true:false;
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:199:63:  [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).
    else if (!strcasecmp(Name,"SecondPass")) setup.SecondPass=atoi(Value);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:200:57:  [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).
    else if (!strcasecmp(Name,"Log2Rec")) setup.Log2Rec=atoi(Value);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:201:59:  [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).
    else if (!strcasecmp(Name,"LogoOnly")) setup.LogoOnly=atoi(Value);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:202:59:  [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).
    else if (!strcasecmp(Name,"SaveInfo")) setup.SaveInfo=atoi(Value);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:203:75:  [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).
    else if (!strcasecmp(Name,"DeferredShutdown")) setup.DeferredShutdown=atoi(Value);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:246:7:  [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).
    f=fopen(buf,"r");
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:256: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).
        f=fopen(buf,"r");
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.h:27: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 title[80];
data/vdr-plugin-markad-0.1.4+git20180120/plugin/setup.h:34: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.
    const char *processTexts[3];
data/vdr-plugin-markad-0.1.4+git20180120/plugin/status.cpp:274: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 procname[256]="";
data/vdr-plugin-markad-0.1.4+git20180120/plugin/status.cpp:276:17:  [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 *fstat=fopen(procname,"r");
data/vdr-plugin-markad-0.1.4+git20180120/plugin/status.cpp:304:16:  [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 *fpid=fopen(buf,"r");
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:79: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).
            buf[strlen(buf)-6]=0;
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:109: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(400000);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:125:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read(fd,&c,1)<0) return false;
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:186:55:  [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 (ret!=(ssize_t)-1) ret=write(sock,osd->msg,strlen(osd->msg));
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:897:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((dataread=read(f,data,datalen))>0)
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1094:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((dataread=read(f,data,datalen))>0)
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1609: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).
            mlen=strlen(ent->mnt_dir);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1676:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len=strlen(macontext.Info.ChannelName);
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1728: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).
                for (int i=0; i<(int) strlen(macontext.Info.ChannelName); i++)
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1917:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(fd,pes_buf,sizeof(pes_buf))!=sizeof(pes_buf))
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1949:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int ret=read(fd,peek_buf,sizeof(peek_buf));
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:1998:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(fd,patpmt_buf,sizeof(patpmt_buf))!=sizeof(patpmt_buf))
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2789:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(config.logoDirectory,optarg,sizeof(config.logoDirectory));
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2944:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(config.markFileName,optarg,sizeof(config.markFileName));
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:2984:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(config.svdrphost,optarg,sizeof(config.svdrphost));
data/vdr-plugin-markad-0.1.4+git20180120/command/markad-standalone.cpp:3153:15:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
        (void)umask((mode_t)0022);
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.cpp:401:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (read(ifd,&IndexTS,sizeof(IndexTS))!=sizeof(IndexTS))
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.cpp:419:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (read(ifd,&IndexTS,sizeof(IndexTS))!=sizeof(IndexTS))
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.cpp:442:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (read(ifd,&IndexVDR,sizeof(IndexVDR))!=sizeof(IndexVDR))
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.cpp:460:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (read(ifd,&IndexVDR,sizeof(IndexVDR))!=sizeof(IndexVDR))
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.cpp:591:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (read(fd,&IndexTS,sizeof(IndexTS))!=sizeof(IndexTS))
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.cpp:611:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (read(fd,&IndexVDR,sizeof(IndexVDR))!=sizeof(IndexVDR))
data/vdr-plugin-markad-0.1.4+git20180120/command/marks.h:92:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(filename,FileName,sizeof(filename)-1);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/markad.cpp:236: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(1000000); // wait 1 second
data/vdr-plugin-markad-0.1.4+git20180120/plugin/setup.cpp:188:55:  [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).
                                for (int i=0; i<(int) strlen(cname); i++)
data/vdr-plugin-markad-0.1.4+git20180120/plugin/status.cpp:90: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(1000000); // wait 1 second
data/vdr-plugin-markad-0.1.4+git20180120/plugin/status.cpp:94: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(200000);
data/vdr-plugin-markad-0.1.4+git20180120/plugin/status.cpp:186:27:  [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).
    for (int i=0; i<(int) strlen(cname); i++)

ANALYSIS SUMMARY:

Hits = 142
Lines analyzed = 10660 in approximately 0.23 seconds (47024 lines/second)
Physical Source Lines of Code (SLOC) = 9293
Hits@level = [0]  68 [1]  28 [2]  97 [3]   3 [4]  12 [5]   2
Hits@level+ = [0+] 210 [1+] 142 [2+] 114 [3+]  17 [4+]  14 [5+]   2
Hits/KSLOC@level+ = [0+] 22.5977 [1+] 15.2803 [2+] 12.2673 [3+] 1.82933 [4+] 1.50651 [5+] 0.215216
Symlinks skipped = 2 (--allowlink overrides but see doc for security issue)
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.