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/mgen-5.02.b+dfsg1/include/mgenPayloadMgrApp.h
Examining data/mgen-5.02.b+dfsg1/include/mgenApp.h
Examining data/mgen-5.02.b+dfsg1/include/mgenEvent.h
Examining data/mgen-5.02.b+dfsg1/include/mgenSequencer.h
Examining data/mgen-5.02.b+dfsg1/include/gpsPub.h
Examining data/mgen-5.02.b+dfsg1/include/mgenGlobals.h
Examining data/mgen-5.02.b+dfsg1/include/mgenPayload.h
Examining data/mgen-5.02.b+dfsg1/include/mgenFlow.h
Examining data/mgen-5.02.b+dfsg1/include/mgenMsg.h
Examining data/mgen-5.02.b+dfsg1/include/mgen.h
Examining data/mgen-5.02.b+dfsg1/include/mgenVersion.h
Examining data/mgen-5.02.b+dfsg1/include/mgenPayloadMgr.h
Examining data/mgen-5.02.b+dfsg1/include/mgenTransport.h
Examining data/mgen-5.02.b+dfsg1/include/mgenPattern.h
Examining data/mgen-5.02.b+dfsg1/src/common/mgenPayload.cpp
Examining data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp
Examining data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp
Examining data/mgen-5.02.b+dfsg1/src/common/mgenAppSinkTransport.cpp
Examining data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp
Examining data/mgen-5.02.b+dfsg1/src/common/mpmgr.cpp
Examining data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp
Examining data/mgen-5.02.b+dfsg1/src/common/gpsPub.cpp
Examining data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp
Examining data/mgen-5.02.b+dfsg1/src/common/mgenBlast.cpp
Examining data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgrApp.cpp
Examining data/mgen-5.02.b+dfsg1/src/common/mgenSequencer.cpp
Examining data/mgen-5.02.b+dfsg1/src/common/pcap2mgen.cpp
Examining data/mgen-5.02.b+dfsg1/src/common/mgenTransport.cpp
Examining data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp
Examining data/mgen-5.02.b+dfsg1/src/common/mgen.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoChannel.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/manetGraph.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/manetMsg.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protokit.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoSpace.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoSerial.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoBitmask.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoAverage.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoLFSR.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoRouteTable.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoCap.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoVersion.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoGraph.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoAddress.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoPktARP.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoTimer.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoPkt.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoDetour.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoBase64.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoTime.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoNet.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/ns3ProtoSimAgent.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/manetGraphML.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoPktRTP.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoVif.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoDispatcher.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/wxProtoApp.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/unix/zebraRouteMgr.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoCheck.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoDebug.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoPktETH.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoList.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoApp.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoPktTCP.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoPktIP.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/manetGraphML2.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoPktRIP.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoPipe.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoQueue.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoSocket.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoSimAgent.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoDefs.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoXml.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoRouteMgr.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoFile.h
Examining data/mgen-5.02.b+dfsg1/protolib/include/protoTree.h
Examining data/mgen-5.02.b+dfsg1/protolib/doc/doxygen/mainpages/buildingExamplesWithWaf.h
Examining data/mgen-5.02.b+dfsg1/protolib/doc/doxygen/mainpages/class_summary.h
Examining data/mgen-5.02.b+dfsg1/protolib/doc/doxygen/mainpages/buildingWithVisualStudio.h
Examining data/mgen-5.02.b+dfsg1/protolib/doc/doxygen/mainpages/introduction.h
Examining data/mgen-5.02.b+dfsg1/protolib/doc/doxygen/mainpages/buildingWithWaf.h
Examining data/mgen-5.02.b+dfsg1/protolib/doc/doxygen/mainpages/buildingProtolibJNI.h
Examining data/mgen-5.02.b+dfsg1/protolib/doc/doxygen/mainpages/building.h
Examining data/mgen-5.02.b+dfsg1/protolib/doc/doxygen/mainpages/buildingWithMake.h
Examining data/mgen-5.02.b+dfsg1/protolib/doc/doxygen/mainpages/mainpage.h
Examining data/mgen-5.02.b+dfsg1/protolib/src/python/protokit.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/manet/manetMsg.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraph.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoList.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoDispatcher.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoSerial.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoSimSocket.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoQueue.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoTime.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoCap.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoLFSR.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoGraph.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoTree.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoRouteTable.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoBase64.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktRTP.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktETH.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/pcapCap.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoPkt.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktARP.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoTimer.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoBitmask.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoRouteMgr.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoAverage.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktRIP.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoNet.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktTCP.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoSpace.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoCheck.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoSocket.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoVif.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoXml.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoSimAgent.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/common/protoChannel.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxRouteMgr.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxNet.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxCap.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxPacketeer.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/unix/unixSerial.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/unix/bpfCap.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/unix/zebraRouteMgr.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/wx/wxProtoApp.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdCap.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdNet.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdRouteMgr.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/pipe2SockExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/pcapExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/lfsrExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/arposer.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/protoCapExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/msg2MsgExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/vifLan.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/pipeExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/riposer.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/detourExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/protoFileExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/msgExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/simpleTcpExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/serialExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/graphExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/pcmd.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/queueExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/sock2PipeExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/averageExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/netExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/threadExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/base64Example.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/wxProtoExample.cpp
Examining data/mgen-5.02.b+dfsg1/protolib/examples/timerTest.cpp

FINAL RESULTS:

data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:448:13:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
        if (chmod(pipeName, CLI_PERM) < 0)
data/mgen-5.02.b+dfsg1/include/mgen.h:242:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buffer, "%02d:%02d:%02.0f%s", 
data/mgen-5.02.b+dfsg1/include/mgenTransport.h:220:11:  [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(interface_name,interfaceName);
data/mgen-5.02.b+dfsg1/protolib/examples/graphExample.cpp:373:18:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        if (2 != sscanf(buffer, "%s at %lf", sim, &time))
data/mgen-5.02.b+dfsg1/protolib/examples/graphExample.cpp:397:18:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        if (4 != sscanf(ptr, "%s setdest %lf %lf %lf", nodeName, &x, &y, &vel))
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:107:9:  [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(node_name, nodeName);
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:251:18:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        if (1 == sscanf(buffer, "node %s", nameString))
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:300:22:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            if (1 == sscanf(buffer, "link %s", nameString))
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:302:27:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            else if (1 == sscanf(buffer, "unlink %s", nameString))
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:54:13:  [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(index,theIndex);
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:56:13:  [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(name,theName);
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:565:17:  [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(inputFilePath,argv[i]);
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:588:17:  [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(outputFilePath,argv[i]);
data/mgen-5.02.b+dfsg1/protolib/examples/pcmd.cpp:33:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(cmdBuffer, argv[i]);
data/mgen-5.02.b+dfsg1/protolib/examples/pipe2SockExample.cpp:207:13:  [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(listen_pipe_name,argv[i]);
data/mgen-5.02.b+dfsg1/protolib/examples/sock2PipeExample.cpp:217:13:  [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(send_pipe_name,argv[i]);
data/mgen-5.02.b+dfsg1/protolib/include/protoFile.h:114:26:  [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.
            return (0 == access(path, F_OK));
data/mgen-5.02.b+dfsg1/protolib/include/protoFile.h:131:26:  [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.
            return (0 == access(path, W_OK));
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:182:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(rule, "%s add divert %hu %s ", cmd, (UINT16)DIVERT_PORT, f);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:219:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(rule, target);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:223:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(rule, "%s delete %d\n", cmd, hookFlags - 1);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:230:19:  [4] (shell) popen:
  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.
        FILE* p = popen(rule, "r");
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdNet.cpp:273:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(ifName, "%s%d", dat->if_name, dat->if_unit);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdNet.cpp:368:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(ifName, "%s%d", dat->link_data.if_name, dat->link_data.if_unit);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdNet.cpp:407:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(ifName, "%s%d", dat->link_data.if_name, dat->link_data.if_unit);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:51:18:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        if (1 == sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:99:13:  [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(argv[argc-1], fieldBuffer);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:127:18:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        if (1 == sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:179:18:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        if (1 == sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:234:13:  [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(argv[argc-1], fieldBuffer);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoCheck.cpp:125:5:  [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(file_name, item.file_name); 
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:538:13:  [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(debugLog, format, args);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:610:13:  [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(buffer, header);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:614:13:  [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(buffer, header);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:615:48:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
            unsigned int count = (unsigned int)vsnprintf(buffer + headerLen, 8191-headerLen, format, args) + 1;
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:629:17:  [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, format, args);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:667:13:  [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(debugLog, format, args);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:808:9:  [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(debugLog, format, args);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:821:5:  [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(debugLog, format, args);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:601:20:  [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 (thePath && access(thePath, X_OK))
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:710:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			strcat(fileName, ptr);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:778:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(fileName, dp->d_name);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:290:5:  [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(sockAddr.sun_path, pipeName);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoXml.cpp:111:9:  [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(ptr, nodeName);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoXml.cpp:127:9:  [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(ptr, (char*)nodeName);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoXml.cpp:148:9:  [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(ptr, nodeName);
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:143:5:  [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(if_name, ifName);
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:219:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(rule, "%s %s %s -j QUEUE ", cmd, mode, target);
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:256:19:  [4] (shell) popen:
  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.
        FILE* p = popen(rule, "r");
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:356:13:  [4] (shell) popen:
  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.
        p = popen("/sbin/modprobe ip_queue 2>&1", "r");
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:358:13:  [4] (shell) popen:
  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.
        p = popen("/sbin/modprobe ip6_queue 2>&1", "r");
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:220:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(rule, "%s %s %s -j NFQUEUE --queue-num %hu ", cmd, mode, target, nfqNum);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:256:19:  [4] (shell) popen:
  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.
        FILE* p = popen(rule, "r");
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:360:15:  [4] (shell) popen:
  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.
    FILE* p = popen("/sbin/modprobe -l nfnetlink_queue 2>&1", "r");
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraph.cpp:78:5:  [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(name_ptr, theName);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:65:9:  [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(oldindex,theOldIndex);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:67:5:  [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(name,theName);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:68:5:  [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(index,theIndex);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:119:9:  [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(oldindex,theOldIndex);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:121:5:  [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(name,theName);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:122:5:  [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(index,theIndex);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:238:9:  [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).
    if(!strcpy(defaultvalue,theDefault))
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:287:5:  [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(XMLName,theName);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:309:9:  [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(tempIndex,theKey->GetIndex()); //we need to copy it over because setting it will delete the old value.
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:345:9:  [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(tempIndex,theIndex); //we need to copy it over because setting it will delete the old value.
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:383:9:  [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(tempIndex,theIndex); //we need to copy it over because setting it will delete the old value.
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:555:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(theLookup,"node:%s",GetString(node));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:565:5:  [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(sourceName,GetString(link.GetSrc()->GetNode()));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:567:5:  [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(sourcePortName,GetString(*link.GetSrc()));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:569:5:  [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(targetName,GetString(link.GetDst()->GetNode()));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:571:5:  [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(targetPortName,GetString(*link.GetDst()));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:581:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(theLookup,"edge:source:%s:%s:dest:%s:%s",sourceName,sourcePortName,targetName,targetPortName);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:594:5:  [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(portName,GetString(interface));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:601:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(theLookup,"node:%s:port:%s",GetString(interface.GetNode()),portName);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:676:5:  [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(lookupvalue,theLookupvalue);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:677:5:  [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(value,theValue);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:678:5:  [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(index,theIndex);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:756:9:  [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(parentXMLNodeID,(const char*)nodeId);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:956:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(newlookup,"node:%s",parentXMLNodeID);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:966:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(newlookup,"node:%s:port:%s",parentXMLNodeID,portName);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:996:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(newlookup,"edge:source:%s:%s:dest:%s:%s",sourceName,sourcePortName,targetName,targetPortName);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:1438:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(key,"node:%s",GetString(theNode));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:1466:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(key,"node:%s",GetString(theInterface.GetNode()));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:1467:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(key,"%s:port:%s",key,GetString(theInterface));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:1492:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(key,"edge:source:%s",GetString(theLink.GetSrc()->GetNode()));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:1493:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(key,"%s:%s",key,GetString(*theLink.GetSrc()));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:1494:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(key,"%s:dest:%s",key,GetString(theLink.GetDst()->GetNode()));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:1495:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(key,"%s:%s",key,GetString(*theLink.GetDst()));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:92:5:  [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(attr_name, name);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:101:9:  [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(attr_id, id);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:507:9:  [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(graph_id, graphId);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:624:9:  [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(parentXMLNodeID,(const char*)nodeId);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:814:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(newlookup,"node:%s",parentXMLNodeID);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:824:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(newlookup,"node:%s:port:%s",parentXMLNodeID,portName);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:846:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(newlookup,"edge:source:%s:%s:dest:%s:%s",sourceName,sourcePortName,targetName,targetPortName);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:1254:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(key,"node:%s",GetString(theNode));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:1282:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(key,"node:%s",GetString(theInterface.GetNode()));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:1283:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(key,"%s:port:%s",key,GetString(theInterface));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:1307:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(key,"edge:source:%s",GetString(theLink.GetSrc()->GetNode()));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:1308:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(key,"%s:%s",key,GetString(*theLink.GetSrc()));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:1309:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(key,"%s:dest:%s",key,GetString(theLink.GetDst()->GetNode()));
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:1310:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(key,"%s:%s",key,GetString(*theLink.GetDst()));
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:834:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(cmd, "ip addr add %s/%u dev %s", ifaceAddr.GetHostString(), maskLen, ifaceName); 
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:901:29:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                            sprintf(cmd, "/sbin/ifconfig %s %s broadcast 0.0.0.0 netmask 255.255.255.255", aliasName, ifaceAddr.GetHostString());
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:903:29:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                            sprintf(cmd, "/sbin/ifconfig %s %s/%u", aliasName, ifaceAddr.GetHostString(), maskLen);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:919:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf(cmd, "/sbin/ifconfig %s %s broadcast 0.0.0.0 netmask 255.255.255.255", ifaceName, ifaceAddr.GetHostString());
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:921:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf(cmd, "/sbin/ifconfig %s %s/%u", ifaceName, ifaceAddr.GetHostString(), maskLen);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:927:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(cmd, "/sbin/ifconfig %s add %s/%u", ifaceName, ifaceAddr.GetHostString(), maskLen);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:941:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(cmd, "/sbin/ifconfig %s %s/%u alias", ifaceName, ifaceAddr.GetHostString(), maskLen);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:945:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(cmd, "/sbin/ifconfig %s inet6 %s/%u alias", ifaceName, ifaceAddr.GetHostString(), maskLen);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:953:9:  [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 (system(cmd) < 0)
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:966:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(cmd, "ip addr del %s/%u dev %s", ifaceAddr.GetHostString(), maskLen, ifaceName);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:983:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(cmd, "/sbin/ifconfig %s 0.0.0.0", ifname);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:988:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(cmd, "/sbin/ifconfig %s down", ifname);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:997:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(cmd, "/sbin/ifconfig %s del %s/%d", ifaceName, ifaceAddr.GetHostString(), maskLen);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:999:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(cmd, "/sbin/ifconfig %s del %s", ifaceName, ifaceAddr.GetHostString());
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:1014:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(cmd, "/sbin/ifconfig %s %s -alias", ifaceName, ifaceAddr.GetHostString());
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:1018:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(cmd, "/sbin/ifconfig %s inet6 %s -alias", ifaceName, ifaceAddr.GetHostString());
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:1026:9:  [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 (system(cmd) < 0)
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:132:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(cmd, "ip link set %s up", vif_name);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:135:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(cmd, "/sbin/ifconfig %s %s/%d up", vif_name, ipAddr.GetHostString(), maskLen);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:137:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(cmd, "/sbin/ifconfig %s up", vif_name);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:139:9:  [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 (system(cmd) < 0)
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:184:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(cmd, "/sbin/ifconfig %s %s", vif_name, status ? "arp" : "-arp");
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:185:9:  [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 (system(cmd) < 0)
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:205:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(cmd, "/sbin/ifconfig %s down", vif_name);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:206:9:  [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 (system(cmd) < 0)
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:212:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(cmd, "/sbin/ifconfig %s hw ether %02x:%02x:%02x:%02x:%02x:%02x", 
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:215:9:  [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 (system(cmd) < 0)
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:221:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(cmd, "/sbin/ifconfig %s up", vif_name);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:222:9:  [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 (system(cmd) < 0)
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:231:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(cmd, "/sbin/ifconfig %s lladdr %02x:%02x:%02x:%02x:%02x:%02x", 
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:233:9:  [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 (system(cmd) < 0)
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:23:31:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
Mgen::LogFunction Mgen::Log = fprintf;
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:25:31:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
Mgen::LogFunction Mgen::Log = fprintf;
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:120:21:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                    strcat(buffer, MGEN_VERSION);
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:940:15:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        Log = fprintf;
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1028:14:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1041:18:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1065:24:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
              if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1084:24:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
              if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1576:19:  [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(path, arg);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:189:9:  [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(buffer, cmd);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:252:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(string, "0.0 LISTEN UDP %s", val);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:289:9:  [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(convert_path, val);  // save path of file to convert
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:595:15:  [4] (shell) popen:
  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.
    FILE* p = popen("netstat -i", "r");
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:635:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(format, "%s %%lu %%lu %%lu %%lu %%lu %%lu %%lu", ifName);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:637:22:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
            if (7 == sscanf(linebuffer, format, &mtu, &metric, &rxOk, &rxErr, &rxDrp, &rxOvr, &txOk))
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:650:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(format, "%s %%lu %%s %%s %%lu %%lu %%lu", ifName);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:651:22:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
            if (6 == sscanf(linebuffer, format, &mtu, net, addr, &ipkts, &ierrs, &opkts))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:205:14:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:217:18:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:241:14:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:263:18:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:296:24:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
              if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:336:24:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
              if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:362:24:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
              if (1 != sscanf(ptr,"%s",fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:419:24:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
              if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:447:24:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
              if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:471:24:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
              if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:491:20:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
          if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:519:20:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
          if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:533:24:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
              if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:558:24:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
              if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:603:15:  [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(payload,fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:610:24:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
              if (1 != sscanf(ptr,"%s",fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:793:14:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:804:18:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:829:22:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:848:26:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:861:34:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                        if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:875:34:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                        if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:893:34:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                        if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:943:22:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:958:22:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:975:22:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:980:26:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:492:9:  [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(payload,tmpPayload);
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:853:21:  [4] (shell) popen:
  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.
    FILE* filePtr = popen(cmd, "r");
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1601:18:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        if (1 == sscanf(ptr, "type=%s", fileType))
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:312:22:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:326:22:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:344:22:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:394:22:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:440:15:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	    if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:454:15:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	    if (1 != sscanf(ptr,"%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:459:6:  [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(clone_fname,fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:296:20:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
          if (1 != sscanf(arg,"%s",tmpOutput))
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:302:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
          sprintf(buffer," LOG %s",tmpOutput);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:309:20:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
          if (1 != sscanf(arg,"%s",tmpOutput))
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:315:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
          sprintf(buffer," OUTPUT %s",tmpOutput);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:322:20:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
          if (1 != sscanf(arg,"%s",tmpOutput))
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:328:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
          sprintf(buffer," SAVE %s",tmpOutput);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:441:20:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
          if (1 != sscanf(arg,"%s",tmpOutput))
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:448:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
          sprintf(buffer," INTERFACE %s",tmpOutput);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:575:14:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:588:18:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        if (1 != sscanf(ptr, "%s", fieldBuffer))
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgrApp.cpp:222:9:  [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(buffer, cmd);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgrApp.cpp:280:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(msgBuffer,"type>Error action>mgenCmd cmd>\"%s\"",val);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgrApp.cpp:321:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(buffer,"src>%s flow_id>%d",msg.GetSrcAddr().GetHostString(),msg.GetFlowId());
data/mgen-5.02.b+dfsg1/protolib/examples/arposer.cpp:117:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand((unsigned int)currentTime.tv_usec);
data/mgen-5.02.b+dfsg1/protolib/examples/lfsrExample.cpp:12:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(t.usec());
data/mgen-5.02.b+dfsg1/protolib/examples/msgExample.cpp:67:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(currentTime.tv_usec);
data/mgen-5.02.b+dfsg1/protolib/examples/riposer.cpp:130:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand((unsigned int)currentTime.tv_usec);
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:209:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand((unsigned int)currentTime.tv_usec);
data/mgen-5.02.b+dfsg1/protolib/include/protoDispatcher.h:279:37:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
        static void Init(Mutex& m) {InitializeCriticalSection(&m);}
data/mgen-5.02.b+dfsg1/protolib/include/protoDispatcher.h:281:37:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        static void Lock(Mutex& m) {EnterCriticalSection(&m);}
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:263:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
    InitializeCriticalSection(&buffer_section);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:264:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&buffer_section);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:352:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&buffer_section);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:449:13:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
            EnterCriticalSection(&dbg->buffer_section);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:133:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        char* cp = getenv("PROTO_NFQ_NUM_BASE");
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:452:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(currentTime.tv_usec);
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:300:13:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            srand(time(NULL));
data/mgen-5.02.b+dfsg1/include/mgen.h:79: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                    interface_name[16];
data/mgen-5.02.b+dfsg1/include/mgen.h:297: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         savebuf[BUFSIZE];
data/mgen-5.02.b+dfsg1/include/mgen.h:404: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               default_interface[16]; // multicast interface name  
data/mgen-5.02.b+dfsg1/include/mgen.h:415: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               sink_path[PATH_MAX];
data/mgen-5.02.b+dfsg1/include/mgen.h:416: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               source_path[PATH_MAX];
data/mgen-5.02.b+dfsg1/include/mgenApp.h:52: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                        cmd_buffer[8192];
data/mgen-5.02.b+dfsg1/include/mgenApp.h:62: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              convert_path[PATH_MAX];
data/mgen-5.02.b+dfsg1/include/mgenApp.h:63: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              ifinfo_name[64];
data/mgen-5.02.b+dfsg1/include/mgenEvent.h:93: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            interface_name[16];
data/mgen-5.02.b+dfsg1/include/mgenEvent.h:194: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             interface_name[16];
data/mgen-5.02.b+dfsg1/include/mgenPattern.h:93: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            clone_fname[PATH_MAX+NAME_MAX];
data/mgen-5.02.b+dfsg1/include/mgenPayloadMgr.h:44: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         savebuf[BUFSIZE];
data/mgen-5.02.b+dfsg1/include/mgenTransport.h:239: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            interface_name[16];
data/mgen-5.02.b+dfsg1/include/mgenTransport.h:362: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                    tx_msg_buffer[TX_BUFFER_SIZE];
data/mgen-5.02.b+dfsg1/include/mgenTransport.h:371: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                    rx_msg_buffer[TX_BUFFER_SIZE];
data/mgen-5.02.b+dfsg1/include/mgenTransport.h:373: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                    rx_checksum_buffer[4];
data/mgen-5.02.b+dfsg1/include/mgenTransport.h:419: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 path[PATH_MAX];
data/mgen-5.02.b+dfsg1/include/mgenTransport.h:424:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                        msg_buffer[MAX_SIZE];
data/mgen-5.02.b+dfsg1/protolib/examples/arposer.cpp:47: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           if_name[256]; 
data/mgen-5.02.b+dfsg1/protolib/examples/arposer.cpp:232:23:  [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).
        SetDebugLevel(atoi(val));
data/mgen-5.02.b+dfsg1/protolib/examples/base64Example.cpp:16: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 encodeBuffer[256];
data/mgen-5.02.b+dfsg1/protolib/examples/base64Example.cpp:17: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 decodeBuffer[256];
data/mgen-5.02.b+dfsg1/protolib/examples/graphExample.cpp:36: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         savebuf[BUFSIZE];
data/mgen-5.02.b+dfsg1/protolib/examples/graphExample.cpp:235: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* infile = fopen(argv[1], "r");
data/mgen-5.02.b+dfsg1/protolib/examples/graphExample.cpp:354: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[MAX_LINE];
data/mgen-5.02.b+dfsg1/protolib/examples/graphExample.cpp:371: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 sim[32];
data/mgen-5.02.b+dfsg1/protolib/examples/graphExample.cpp:395: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 nodeName[32];
data/mgen-5.02.b+dfsg1/protolib/examples/graphExample.cpp:408: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 nodeNamePrefix[32];
data/mgen-5.02.b+dfsg1/protolib/examples/graphExample.cpp:755: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(buffer, saveptr, ncopy);
data/mgen-5.02.b+dfsg1/protolib/examples/graphExample.cpp:813: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, savebuf, ncopy);
data/mgen-5.02.b+dfsg1/protolib/examples/graphExample.cpp:870:25:  [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(savebuf, buffer, count);
data/mgen-5.02.b+dfsg1/protolib/examples/graphExample.cpp:877:25:  [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(savebuf, buffer+count-BUFSIZE, BUFSIZE);
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:167:49:  [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).
                    return (NULL != (file_ptr = fopen(fileName, "r")));
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:183: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.
                char         savebuf[BUFSIZE];
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:218: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[MAX_LINE];
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:250: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 nameString[256];
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:263: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.
                char nodeNamePrefix[32];
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:578: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(buffer, saveptr, ncopy);
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:637: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, savebuf, ncopy);
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:694:25:  [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(savebuf, buffer, count);
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:701:25:  [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(savebuf, buffer+count-BUFSIZE, BUFSIZE);
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:93: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         savebuf[BUFSIZE];
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:247: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 prioStr[50];
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:248:9:  [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(prioStr,"%d",prio);
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:305: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 value[100];
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:306: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(value,"%f",(static_cast<MyLink&>(theLink)).GetCost().GetValue());
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:760: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 spaces[255];
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:1037: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(buffer, saveptr, ncopy);
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:1095: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, savebuf, ncopy);
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:1152:25:  [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(savebuf, buffer, count);
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:1159:25:  [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(savebuf, buffer+count-BUFSIZE, BUFSIZE);
data/mgen-5.02.b+dfsg1/protolib/examples/lfsrExample.cpp:142: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 syncBuf[32];  // overkill buffer size
data/mgen-5.02.b+dfsg1/protolib/examples/msg2MsgExample.cpp:71: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         msg_buffer[8191];
data/mgen-5.02.b+dfsg1/protolib/examples/msg2MsgExample.cpp:204: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 pipeName[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/examples/msg2MsgExample.cpp:403: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 charAddr[255];
data/mgen-5.02.b+dfsg1/protolib/examples/msg2MsgExample.cpp:417: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).
        rcv_port = atoi(index+1);
data/mgen-5.02.b+dfsg1/protolib/examples/msg2MsgExample.cpp:421: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).
        rcv_port = atoi(socketAddrStr);
data/mgen-5.02.b+dfsg1/protolib/examples/msg2MsgExample.cpp:453: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 charAddr[255];
data/mgen-5.02.b+dfsg1/protolib/examples/msg2MsgExample.cpp:468: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).
        dst_port = atoi(index+1);
data/mgen-5.02.b+dfsg1/protolib/examples/msgExample.cpp:159: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 addrString[32];
data/mgen-5.02.b+dfsg1/protolib/examples/msgExample.cpp:160:9:  [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(addrString, "192.168.%d.1", i+2);
data/mgen-5.02.b+dfsg1/protolib/examples/msgExample.cpp:219: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 addrString[32];
data/mgen-5.02.b+dfsg1/protolib/examples/msgExample.cpp:220:9:  [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(addrString, "192.168.2.%d", i);
data/mgen-5.02.b+dfsg1/protolib/examples/msgExample.cpp:261: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* infile = fopen(file, "r");
data/mgen-5.02.b+dfsg1/protolib/examples/netExample.cpp:116: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 ifName[256];
data/mgen-5.02.b+dfsg1/protolib/examples/pcapExample.cpp:207: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 ifName[256];
data/mgen-5.02.b+dfsg1/protolib/examples/pcapExample.cpp:215: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 errbuf[PCAP_ERRBUF_SIZE+1];
data/mgen-5.02.b+dfsg1/protolib/examples/pcmd.cpp:20: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 cmdBuffer[8192];
data/mgen-5.02.b+dfsg1/protolib/examples/pipe2SockExample.cpp:39: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         listen_pipe_name[8191];
data/mgen-5.02.b+dfsg1/protolib/examples/pipe2SockExample.cpp:47: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         msg_buffer[8191];
data/mgen-5.02.b+dfsg1/protolib/examples/pipe2SockExample.cpp:65: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(listen_pipe_name,"sdt");
data/mgen-5.02.b+dfsg1/protolib/examples/pipe2SockExample.cpp:174: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 pipeName[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/examples/pipe2SockExample.cpp:215: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.
                char charAddr[255];
data/mgen-5.02.b+dfsg1/protolib/examples/pipe2SockExample.cpp:223: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).
                dst_port = atoi(index+1);
data/mgen-5.02.b+dfsg1/protolib/examples/pipe2SockExample.cpp:234: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).
            snd_port = atoi(argv[i]);
data/mgen-5.02.b+dfsg1/protolib/examples/pipeExample.cpp:154: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).
        msg_repeat = atoi(val);
data/mgen-5.02.b+dfsg1/protolib/examples/pipeExample.cpp:166: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(msg_buffer, val, msg_len);
data/mgen-5.02.b+dfsg1/protolib/examples/pipeExample.cpp:230: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 buffer[8192];
data/mgen-5.02.b+dfsg1/protolib/examples/pipeExample.cpp:253: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 pipeName[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/examples/pipeExample.cpp:417: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 buffer[1024];
data/mgen-5.02.b+dfsg1/protolib/examples/protoCapExample.cpp:44: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            rcvr_interface[64];
data/mgen-5.02.b+dfsg1/protolib/examples/protoCapExample.cpp:45: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            sndr_interface[64];
data/mgen-5.02.b+dfsg1/protolib/examples/protoCapExample.cpp:134: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 ifName[256];
data/mgen-5.02.b+dfsg1/protolib/examples/protoCapExample.cpp:290: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 ifName[256];
data/mgen-5.02.b+dfsg1/protolib/examples/protoCapExample.cpp:318: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 ifName[256];
data/mgen-5.02.b+dfsg1/protolib/examples/protoCapExample.cpp:354: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 ifName[256];
data/mgen-5.02.b+dfsg1/protolib/examples/protoCapExample.cpp:392: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[4096];
data/mgen-5.02.b+dfsg1/protolib/examples/protoCapExample.cpp:410:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		            memcpy(&type, buffer+12, 2);
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:188: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 nameBuffer[256];
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:394: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 string[256];
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:406:30:  [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).
            dst_addr.SetPort(atoi(ptr));
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:421: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 string[256];
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:478: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 string[256];
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:491: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).
            server.SetPort(atoi(ptr));
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:581: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 buffer[1024];
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:589:21:  [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 dstAddrString[32];
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:670: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 buffer[1024];
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:756: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 buffer[1024];
data/mgen-5.02.b+dfsg1/protolib/examples/protoFileExample.cpp:243: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 buffer[1024];
data/mgen-5.02.b+dfsg1/protolib/examples/protoFileExample.cpp:261:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[1024];
data/mgen-5.02.b+dfsg1/protolib/examples/queueExample.cpp:47: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            name[PRODUCT_NAME_MAX+1];
data/mgen-5.02.b+dfsg1/protolib/examples/queueExample.cpp:312: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 name[9];
data/mgen-5.02.b+dfsg1/protolib/examples/riposer.cpp:45: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          rip_iface[256]; 
data/mgen-5.02.b+dfsg1/protolib/examples/riposer.cpp:262: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 tempTxt[256];
data/mgen-5.02.b+dfsg1/protolib/examples/riposer.cpp:314:23:  [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).
        SetDebugLevel(atoi(val));
data/mgen-5.02.b+dfsg1/protolib/examples/riposer.cpp:383:25:  [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 routeAddr[64];
data/mgen-5.02.b+dfsg1/protolib/examples/riposer.cpp:386:25:  [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 nextHop[64];
data/mgen-5.02.b+dfsg1/protolib/examples/serialExample.cpp:40: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          device_name[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/examples/serialExample.cpp:248: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).
        baud_rate = atoi(val);
data/mgen-5.02.b+dfsg1/protolib/examples/serialExample.cpp:272: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 buffer[256];
data/mgen-5.02.b+dfsg1/protolib/examples/simpleTcpExample.cpp:103: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 buffer[256];
data/mgen-5.02.b+dfsg1/protolib/examples/simpleTcpExample.cpp:153:21:  [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/mgen-5.02.b+dfsg1/protolib/examples/simpleTcpExample.cpp:202: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.
                char buffer[8];
data/mgen-5.02.b+dfsg1/protolib/examples/sock2PipeExample.cpp:39: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         send_pipe_name[8191];
data/mgen-5.02.b+dfsg1/protolib/examples/sock2PipeExample.cpp:45: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         msg_buffer[8191];
data/mgen-5.02.b+dfsg1/protolib/examples/sock2PipeExample.cpp:61: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(send_pipe_name,"sdt");
data/mgen-5.02.b+dfsg1/protolib/examples/sock2PipeExample.cpp:199: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.
                char charAddr[255];
data/mgen-5.02.b+dfsg1/protolib/examples/sock2PipeExample.cpp:207: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).
                port = atoi(index+1);
data/mgen-5.02.b+dfsg1/protolib/examples/sock2PipeExample.cpp:211: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).
                port = atoi(argv[i]);
data/mgen-5.02.b+dfsg1/protolib/examples/timerTest.cpp:301:23:  [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).
        SetDebugLevel(atoi(val));
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:352: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            item_key[16+2];  // room for IPv6 addr and port number 
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:619: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                mcast_iface[256];
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:634: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(item_key, theAddr.GetRawHostAddress(), addrLen);
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:636: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(item_key + addrLen, &port, 2);
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:645: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 key[16+2];
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:647: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(key, addr.GetRawHostAddress(), addrLen);
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:649: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(key+addrLen, &port, 2);
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:664: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.
       char matchKey[16+2];
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:666:8:  [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(matchKey, matchAddr->GetRawHostAddress(), addrLen);
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:668:8:  [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(matchKey + addrLen, &port, 2);
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:716: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 observerName[256];
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:859: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((char*)(buffer_ptr+OFFSET_SRC_ADDR), srcAddr.GetRawHostAddress(), addrLen);
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:1559:41:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                if (NULL == (log_file = fopen(val, "w+")))
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:1589: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 addrText[256];
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:1660: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 addr[256];
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:83: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           vif_name[ProtoVif::VIF_NAME_MAX]; 
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:87: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           if_name[ProtoVif::VIF_NAME_MAX]; 
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:112: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            mne_block_list[6*MNE_BLOCK_MAX];  
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:439: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 addrString[32] = "\0";
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:560:23:  [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).
        SetDebugLevel(atoi(val));
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:575: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[8192];
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:613: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(mne_block_list, arg, argLen);
data/mgen-5.02.b+dfsg1/protolib/include/manetMsg.h:587:14:  [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(target, (char*)buffer_ptr+OffsetOriginator(), GetAddressLength());}
data/mgen-5.02.b+dfsg1/protolib/include/protoBase64.h:48:16:  [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 BASE64_DECODE[255];
data/mgen-5.02.b+dfsg1/protolib/include/protoBitmask.h:106:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static const unsigned char WEIGHT[256];
data/mgen-5.02.b+dfsg1/protolib/include/protoBitmask.h:107:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static const unsigned char BITLOCS[256][8];
data/mgen-5.02.b+dfsg1/protolib/include/protoDebug.h:120: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.
    static char errorString[256];
data/mgen-5.02.b+dfsg1/protolib/include/protoDebug.h:144: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.
    static char errorString[256];
data/mgen-5.02.b+dfsg1/protolib/include/protoDetour.h:85: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.
                char buffer[8192];
data/mgen-5.02.b+dfsg1/protolib/include/protoDispatcher.h:416:21:  [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 byte[32];
data/mgen-5.02.b+dfsg1/protolib/include/protoFile.h:66: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 savebuf[BLOCKSIZE];
data/mgen-5.02.b+dfsg1/protolib/include/protoFile.h:107:13:  [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 wideBuffer[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/include/protoFile.h:122:13:  [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 wideBuffer[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/include/protoFile.h:173: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.
                char            path[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/include/protoFile.h:246: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.
                char			 path[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/include/protoNet.h:121:21:  [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            iface_name[IFNAME_MAX+1];
data/mgen-5.02.b+dfsg1/protolib/include/protoPipe.h:49: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         read_buffer[BUFFER_MAX];
data/mgen-5.02.b+dfsg1/protolib/include/protoPipe.h:52: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         write_buffer[BUFFER_MAX];
data/mgen-5.02.b+dfsg1/protolib/include/protoPipe.h:58: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        path[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/include/protoPkt.h:105: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(&value, ptr, sizeof(UINT16));
data/mgen-5.02.b+dfsg1/protolib/include/protoPkt.h:111: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(&value, ptr, sizeof(UINT32));
data/mgen-5.02.b+dfsg1/protolib/include/protoPkt.h:117: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(ptr, &value, sizeof(UINT16));
data/mgen-5.02.b+dfsg1/protolib/include/protoPkt.h:122: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(ptr, &value, sizeof(UINT32));
data/mgen-5.02.b+dfsg1/protolib/include/protoPkt.h:128: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(&value, (char*)buffer_ptr + byteOffset, 2);
data/mgen-5.02.b+dfsg1/protolib/include/protoPkt.h:134: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(&value, (char*)buffer_ptr + byteOffset, 4);
data/mgen-5.02.b+dfsg1/protolib/include/protoPkt.h:140: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((char*)buffer_ptr + byteOffset, &value, 2);
data/mgen-5.02.b+dfsg1/protolib/include/protoPkt.h:145: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((char*)buffer_ptr + byteOffset, &value, 4);
data/mgen-5.02.b+dfsg1/protolib/include/protoPktETH.h:98:14:  [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(((char*)buffer_ptr)+OFFSET_SRC, srcAddr.GetRawHostAddress(), ADDR_LEN);}
data/mgen-5.02.b+dfsg1/protolib/include/protoPktETH.h:100:14:  [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(((char*)buffer_ptr)+OFFSET_DST, dstAddr.GetRawHostAddress(), ADDR_LEN);}  
data/mgen-5.02.b+dfsg1/protolib/include/protoPktETH.h:105: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(((char*)buffer_ptr)+OFFSET_PAYLOAD, payload, numBytes);
data/mgen-5.02.b+dfsg1/protolib/include/protoPktIP.h:352: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(AccessPayload(), payload, numBytes);
data/mgen-5.02.b+dfsg1/protolib/include/protoPktIP.h:686:14:  [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((char*)(buffer_ptr+OFFSET_SRC_ADDR), addr.GetRawHostAddress(), 16);}
data/mgen-5.02.b+dfsg1/protolib/include/protoPktIP.h:688:14:  [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((char*)(buffer_ptr+OFFSET_DST_ADDR), addr.GetRawHostAddress(), 16);}
data/mgen-5.02.b+dfsg1/protolib/include/protoPktIP.h:1076: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((char*)(buffer_ptr+OFFSET_PAYLOAD), payload, numBytes);
data/mgen-5.02.b+dfsg1/protolib/include/protoPktRTP.h:220: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((char*)AccessPayload(), dataPtr, numBytes);
data/mgen-5.02.b+dfsg1/protolib/include/protoPktTCP.h:117: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((char*)(buffer_ptr+OffsetPayload()), payload, numBytes);
data/mgen-5.02.b+dfsg1/protolib/include/protoSocket.h:149: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.
			static char errorString[256];
data/mgen-5.02.b+dfsg1/protolib/include/protoSpace.h:75:22:  [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(key, &theNode, sizeof(Node*));}
data/mgen-5.02.b+dfsg1/protolib/include/protoSpace.h:79:21:  [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(&node, key, sizeof(Node*));
data/mgen-5.02.b+dfsg1/protolib/include/protoSpace.h:83:22:  [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(key+sizeof(Node*), &theValue, sizeof(double));}
data/mgen-5.02.b+dfsg1/protolib/include/protoSpace.h:87:21:  [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(&value, key+sizeof(Node*), sizeof(double));
data/mgen-5.02.b+dfsg1/protolib/include/protoSpace.h:94:22:  [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(key+sizeof(double), &theNode, sizeof(Node*));}
data/mgen-5.02.b+dfsg1/protolib/include/protoSpace.h:98:21:  [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(&node, key+sizeof(double), sizeof(Node*));
data/mgen-5.02.b+dfsg1/protolib/include/protoSpace.h:102:22:  [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(key, &theValue, sizeof(double));}
data/mgen-5.02.b+dfsg1/protolib/include/protoSpace.h:106:21:  [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(&value, key, sizeof(double));
data/mgen-5.02.b+dfsg1/protolib/include/protoSpace.h:112: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.
                char   key[sizeof(double)+sizeof(Node*)];
data/mgen-5.02.b+dfsg1/protolib/include/protoTree.h:174:28:  [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 text[256];
data/mgen-5.02.b+dfsg1/protolib/include/protoVif.h:57: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            vif_name[VIF_NAME_MAX+1];
data/mgen-5.02.b+dfsg1/protolib/include/protoXml.h:49:21:  [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 filter_path[FILTER_PATH_MAX+1];
data/mgen-5.02.b+dfsg1/protolib/include/protoXml.h:56: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             path_current[FILTER_PATH_MAX+1];    
data/mgen-5.02.b+dfsg1/protolib/include/unix/zebraRouteMgr.h:199: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.
        unsigned char ibuf[ZEBRA_MAX_PACKET_SIZE];
data/mgen-5.02.b+dfsg1/protolib/include/unix/zebraRouteMgr.h:200: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.
        unsigned char obuf[ZEBRA_MAX_PACKET_SIZE];
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdCap.cpp:86: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 buffer[256];
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdCap.cpp:238: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(&type, buffer+12, 2);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:148: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 rule[RULE_MAX+1];
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:185:17:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
                strcat(rule, "from ");
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:193:17:  [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(rule+len, "/%u ", srcFilterMask);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:198:17:  [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(rule+len, "from any ");
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:202:17:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
                strcat(rule, "to ");
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:210:17:  [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(rule+len, "/%u ", dstFilterMask);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:215:17:  [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(rule+len, "to any ");
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:228:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
        strcat(rule, " 2>&1");
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:233: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 feedback[256];
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdNet.cpp:59: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.
                char            iface_name[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdNet.cpp:149: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 ifaceName[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdNet.cpp:271: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.
                char ifName[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdNet.cpp:366: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.
                char ifName[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdNet.cpp:405: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.
                char ifName[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdRouteMgr.cpp:375:21:  [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(addr, &dst.GetSockAddr(), sockaddrLen);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdRouteMgr.cpp:382:25:  [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(addr, &gw.GetSockAddr(), sockaddrLen);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdRouteMgr.cpp:663:21:  [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(addr, &dst.GetSockAddr(), sockaddrLen);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdRouteMgr.cpp:670:25:  [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(addr, &gw.GetSockAddr(), sockaddrLen);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdRouteMgr.cpp:945:21:  [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(addr, &dst.GetSockAddr(), sockaddrLen);
data/mgen-5.02.b+dfsg1/protolib/src/common/pcapCap.cpp: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 buffer[256];
data/mgen-5.02.b+dfsg1/protolib/src/common/pcapCap.cpp:102: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 errbuf[PCAP_ERRBUF_SIZE+1];
data/mgen-5.02.b+dfsg1/protolib/src/common/pcapCap.cpp:205: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, data, copyLen);
data/mgen-5.02.b+dfsg1/protolib/src/common/pcapCap.cpp:231: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(&type, buffer+12, 2);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:137:28:  [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 unsigned char temp[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:290: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.
    static char altBuffer[256];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:369:32:  [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.
                        len += sprintf(buffer+len, "%02x", ((unsigned char*)&addr)[i]);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:371:32:  [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.
                        len += sprintf(buffer+len, ":%02x", ((unsigned char*)&addr)[i]);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:383: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 text[32];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:385:13:  [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(text, "%u", ((struct sockaddr_sim*)&addr)->addr);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:457: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 fill[16];   
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:504: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(&addr, &theAddr, sizeof(struct sockaddr_in));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:513: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(&addr, &theAddr, sizeof(struct sockaddr_in6));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:562: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(&((struct sockaddr_in*)&addr)->sin_addr, buffer, buflen);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:574: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(&((struct sockaddr_in6*)&addr)->sin6_addr, buffer, buflen);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:586: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((char*)&addr, buffer, buflen);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:594: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(&((struct sockaddr_sim*)&addr)->addr, buffer, buflen);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:974: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(((char*)&(((struct sockaddr_in6&)addr).sin6_addr))+12, &endIdentifier, 4);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:980: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(&vendorHash, (char*)&endIdentifier, 1);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:983: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(addrPtr+3, (((char*)&endIdentifier)+1), 3);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:1018: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((char*)&temp32, &vendorHash, 1);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:1019: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((((char*)&temp32)+1), addrPtr+3, 3);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:1117: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 b[6];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:1303: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((char*)&addrPtr->sin_addr,  hp->h_addr,  hp->h_length);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:1428: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 hostName[256];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:36: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(argv[0], "protoApp");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:46: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 fieldBuffer[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:68: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(fieldBuffer, ptr, len);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:88: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(tempv, argv, (argc-1)*sizeof(char*));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:122: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 fieldBuffer[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:163: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(argv[0], "protoApp");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:198: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(fieldBuffer, ptr, len);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:221: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(tempv, argv, (argc-1)*sizeof(char*));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoBitmask.cpp:437: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(mask, b.mask, b.mask_len);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoBitmask.cpp:1243: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(mask, b.mask+startIndex, b.mask_len - startIndex);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoBitmask.cpp:1246: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(mask+b.mask_len-startIndex, b.mask, endIndex);    // new
data/mgen-5.02.b+dfsg1/protolib/src/common/protoBitmask.cpp:1263: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(mask, b.mask+startIndex, endIndex-startIndex+1);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoCap.cpp:50: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+6, if_addr.GetRawHostAddress(), 6);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoCap.cpp:70: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+6, srcMacAddr.GetRawHostAddress(), 6);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoCheck.cpp:35: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    file_name[256];  // TBD PATH_MAX
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:95: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* ptr = fopen(path, "w+");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:195: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[BUFFER_MAX+2];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:283:5:  [2] (buffer) TCHAR:
  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.
    TCHAR moduleName[256];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:355: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(buffer, text + len - BUFFER_MAX, BUFFER_MAX);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:363: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(buffer+count-move, text, len);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:448: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 tempBuffer[BUFFER_MAX+2];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:450: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(tempBuffer, dbg->buffer, BUFFER_MAX+2);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:522: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 charBuffer[2048];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:526:13:  [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 wideBuffer[2048];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:583: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 charBuffer[8192];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:587:13:  [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 wideBuffer[8192];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:604: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 buffer[8192];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:718:4:  [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 pszNewWindowTitle[MY_BUFSIZE]; // Contains fabricated
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:720:4:  [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 pszOldWindowTitle[MY_BUFSIZE]; // Contains original
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:723: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 pszNewWindowTitle[MY_BUFSIZE]; // Contains fabricated
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:725: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 pszOldWindowTitle[MY_BUFSIZE]; // Contains original
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:789: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 charBuffer[2048];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:793:9:  [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 wideBuffer[2048];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDispatcher.cpp:1371: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(hPtr, stream_handles_array, stream_count*sizeof(HANDLE));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDispatcher.cpp:1372: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(iPtr, stream_ptrs_array, stream_count*sizeof(Stream*));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDispatcher.cpp:1441: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 errorString[256];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:48: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 tempPath[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:79:13:  [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 wideBuffer[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:106: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_ptr = fopen(thePath, "rb");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:108: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_ptr = fopen(thePath, "w+b");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:130:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if((descriptor = open(thePath, theFlags, 0640)) >= 0)
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:219:9:  [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 wideBuffer[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:249: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 tempPath[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:277:13:  [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 wideBuffer[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:300: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 wideOldName[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:301: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 wideNewName[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:387: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(buffer,saveptr,ncopy);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:409: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, savebuf, ncopy);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:662:4:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
			strcat(fileName, "\\*");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:664:13:  [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 wideBuffer[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:685: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 cFileName[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:813: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 path[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:862: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 fullName[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:869: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 wideBuffer[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:928: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 wideBuffer[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:956: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 wideBuffer[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:999: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 wideBuffer[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:1089: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 wideBuffer[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:1367:6:  [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 tempPath[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoLFSR.cpp:372: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(lfsrx_poly, polynomial, numWords*sizeof(UINT32));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoLFSR.cpp:375: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(lfsrx_state, initialState, numWords*sizeof(UINT32));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoLFSR.cpp:397: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(lfsrx_state, initialState, lfsrx_words*sizeof(UINT32));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoLFSR.cpp:536: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(c, lfsrx_state, lfsrx_words*sizeof(UINT32));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoLFSR.cpp:549: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(lfsrx_state, c, lfsrx_words*sizeof(UINT32));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoNet.cpp:12: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 ifName[256];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoNet.cpp:28: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 ifName[256];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoNet.cpp:106: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 ifName[256];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoNet.cpp:121: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 ifName[256];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoNet.cpp:136: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 ifName[256];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoNet.cpp:164: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(iface_name, "???");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:53:13:  [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 wideBuffer[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:93: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 pipeName[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:94: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(pipeName, "Global\\protoPipe-");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:97: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 wideBuffer[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:182:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char pipeName[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:183: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(pipeName, "Global\\protoPipe-");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:186: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 wideBuffer[MAX_PATH];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:277: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 pipeName[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:281: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(pipeName, "/data/local/tmp/");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:283: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(pipeName, "/tmp/");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:335: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 pipeName[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:339: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(pipeName, "/data/local/tmp/");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:341: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(pipeName, "/tmp/");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:415: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 pipeName[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:417: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(pipeName, "/data/local/tmp/protoSocketXXXXXX");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:419: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(pipeName, "/tmp/protoSocketXXXXXX");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:421:18:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
        int fd = mkstemp(pipeName); 
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:463: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(serverAddr.sun_path, "/data/local/tmp/");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:465: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(serverAddr.sun_path, "/tmp/");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktARP.cpp:166: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(((char*)buffer_ptr) + OffsetSenderHardwareAddr(), addr.GetRawHostAddress(), addr.GetLength());
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktARP.cpp:188: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(((char*)buffer_ptr) + OffsetSenderProtocolAddr(), addr.GetRawHostAddress(), addr.GetLength());
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktARP.cpp:203: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(((char*)buffer_ptr) + OffsetTargetHardwareAddr(), addr.GetRawHostAddress(), addr.GetLength());
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktARP.cpp:225: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(((char*)buffer_ptr) + OffsetTargetProtocolAddr(), addr.GetRawHostAddress(), addr.GetLength());
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp:279: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((char*)(buffer_ptr+OFFSET_SRC_ADDR), addr.GetRawHostAddress(), 4); // (TBD) leverage alignment?
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp:285: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((char*)(buffer_ptr+OFFSET_DST_ADDR), addr.GetRawHostAddress(), 4); // (TBD) leverage alignment?     
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp:504: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(dataPtr, data, length); 
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp:725: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(ptr, (const char*)ext.GetBuffer(), ext.GetLength());
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp:750: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((char*)oldExt.AccessBuffer(), (char*)newExt.GetBuffer(), newExt.GetLength());
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp:802: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(ptr, (const char*)ext.GetBuffer(), ext.GetLength());
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp:846: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(((char*)buffer_ptr) + pkt_length, dataPtr, dataLen);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp:885: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_ptr, ext.GetBuffer(), ext.GetLength());
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp:1034: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(oldOpt.AccessBuffer(), newOpt.GetBuffer(), newOpt.GetLength());
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp:1241: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(buffer_ptr + OFFSET_DATA, dataPtr, dataLen);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp:1581: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(&value, buffer_ptr+OffsetPktId(), 2);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp:1595: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(&value, buffer_ptr+OffsetPktId(), 4);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp:1627: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(ptr, hashAssistValue, numBytes);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp:1641: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(buffer_ptr + OFFSET_TID_VALUE, taggerId, taggerIdLength);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktIP.cpp:1673: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_ptr + offsetPktId, pktId, pktIdLength);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktRIP.cpp:175: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(AccessBuffer() + OFFSET_ADDR, addr.GetRawHostAddress(), 4);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktRIP.cpp:186: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(AccessBuffer() + OFFSET_MASK, addr.GetRawHostAddress(), 4);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktRIP.cpp:209: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(AccessBuffer() + OFFSET_NHOP, nextHop.GetRawHostAddress(), 4);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktRTP.cpp:145: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(reinterpret_cast<UINT8*>(buffer_ptr)+pkt_length, paddingPtr, 
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPktRTP.cpp:208: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((char*)AccessData(), dataPtr, numBytes);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoSocket.cpp:1567: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 cdata[64];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoSocket.cpp:1684: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 cdata[256];
data/mgen-5.02.b+dfsg1/protolib/src/common/protoSpace.cpp:167: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(orig, originOrdinates, dim*sizeof(double));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoSpace.cpp:278: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(orig, originOrdinates, dim*sizeof(double));
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:215: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 rule[RULE_MAX+1];
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:222:13:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
            strcat(rule, "-s ");
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:230:13:  [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(rule+len, "/%hu ", srcFilterMask);
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:234:13:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
            strcat(rule, "-d ");
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:242:13:  [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(rule+len, "/%hu ", dstFilterMask);
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:249:13:  [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(rule+len, "-m dscp --dscp %d ", dscpValue);
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:255:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
        strcat(rule, " 2>&1");
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:259: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 errorMsg[256];
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:362: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 errorMsg[256];
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:463: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 ifName[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxCap.cpp:52: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 buffer[256];
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxCap.cpp:114: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(ifaceAddr.sll_addr, if_addr.GetRawHostAddress(), 6);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxCap.cpp:151: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(&type, buffer+12, 2);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:135:36:  [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).
            nfq_num_next = (UINT16)atoi(cp);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:216: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 rule[RULE_MAX+1];
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:223:13:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
            strcat(rule, "-s ");
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:231:13:  [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(rule+len, "/%hu ", srcFilterMask);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:235:13:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
            strcat(rule, "-d ");
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:243:13:  [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(rule+len, "/%hu ", dstFilterMask);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:251:13:  [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(rule+len, "-m dscp --dscp %d ", dscpValue);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:255:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
        strcat(rule, " 2>&1");
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:259: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 errorMsg[256];
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:364: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 errorMsg[256];
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:501: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 nfqBuffer[NFQ_BUFFER_SIZE];
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:526: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(buffer, nfq_pkt_data, numBytes);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:528: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(buffer, nfq_pkt_data, nfq_pkt_len);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxNet.cpp:246: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 ifName[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxNet.cpp:723: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.
                char            iface_name[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxNet.cpp:824: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[4096];
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxNet.cpp:947:21:  [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 ifName[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxPacketeer.cpp:93: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(&frameType, buffer+12, 2);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxRouteMgr.cpp:119:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int fd = open("/proc/sys/net/ipv4/ip_forward", O_WRONLY);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxRouteMgr.cpp:196: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(RTA_DATA(rta), data, len);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxRouteMgr.cpp:205: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/mgen-5.02.b+dfsg1/protolib/src/linux/linuxRouteMgr.cpp:284: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[1024];
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxRouteMgr.cpp:460: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            buf[1024];
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxRouteMgr.cpp:610: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            buf[512];   
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxRouteMgr.cpp:805:41:  [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(&interfaceIndex, RTA_DATA(rta), 4);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxRouteMgr.cpp:812:41:  [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(&priority, RTA_DATA(rta), 4);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxRouteMgr.cpp:1077:41:  [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(&ifIndex, RTA_DATA(rta), RTA_PAYLOAD(rta));
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxRouteMgr.cpp:1084:41:  [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(&priority, RTA_DATA(rta), 4);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxRouteMgr.cpp:1225: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[4096];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:308: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 tempIndex[20];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:332: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 theLookup[250];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:344: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 tempIndex[20];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:365: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 theLookup[250];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:382: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 tempIndex[20];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:403: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 theLookup[250];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:443: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 theIndex[20];//this will work as we are only using d%d as our indexes.
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:444: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(theIndex,"d%d",indexes++);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:475: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 theLookup[250];    //TBD
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:504: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 theLookup[250];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:533: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 theLookup[250];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:948: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 newlookup[250];//this really should be dynamic and checks on size should take place TBD
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:1044: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 parentXMLNodeID[MAXXMLIDLENGTH+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:1437: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 key[255];//this should be dynamic or checks added TBD
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:1465: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 key[255];//this should be dynamic or checks added TBD
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:1491: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 key[255];//this should be dynamic or checkes added TBD
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:8: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 text[8];  // all of our type names are less than 8 chars
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:41: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 text[8];  // all of our domain names are less than 8 chars
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:216: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(item_key, &itemPtr, itemPtrLen);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:217: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(item_key + itemPtrLen, keyLen - itemPtrLen);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:315: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(itemKey, &itemPtr, itemPtrLen);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:316: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(itemKey + itemPtrLen, idLen);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:528: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 parentXMLNodeID[MAXXMLIDLENGTH+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:806: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 newlookup[250];//this really should be dynamic and checks on size should take place TBD
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:1253: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 key[255];//this should be dynamic or checks added TBD
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:1281: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 key[255];//this should be dynamic or checks added TBD
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:1306: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 key[255];//this should be dynamic or checkes added TBD
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetMsg.cpp:248: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((char*)buffer_ptr + offsetValue + newTlvOffset, value, valueLength);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetMsg.cpp:328: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(value, valuePtr, valueLength);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetMsg.cpp:443: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((char*)buffer_ptr+pkt_length, (char*)tlv.GetBuffer(), tlvLength);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetMsg.cpp:547: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((char*)buffer_ptr+ OFFSET_HEAD, addr.GetRawHostAddress(), hlen);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetMsg.cpp:592: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((char*)buffer_ptr + offsetTail, tailPtr, tlen);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetMsg.cpp:634: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((char*)buffer_ptr + offset, addr.GetRawHostAddress() + GetHeadLength(), mlen);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetMsg.cpp:767: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 addrBuffer[16]; // supports up to IPv6
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetMsg.cpp:772: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(addrBuffer, (char*)buffer_ptr+OFFSET_HEAD, hlen);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetMsg.cpp:777: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(addrBuffer+hlen, (char*)buffer_ptr + OffsetMid() + index*GetMidLength(), mlen);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetMsg.cpp:785: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(addrBuffer+hlen+mlen, (char*)buffer_ptr + OffsetTail(), tlen);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetMsg.cpp:864: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((char*)buffer_ptr + offsetOriginator, addr.GetRawHostAddress(), addrLen);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetMsg.cpp:1177: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((char*)buffer_ptr + pkt_length, (char*)msg.GetBuffer(), msgLength);
data/mgen-5.02.b+dfsg1/protolib/src/unix/bpfCap.cpp:81: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 buffer[256];
data/mgen-5.02.b+dfsg1/protolib/src/unix/bpfCap.cpp:109: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 bpfName[256];
data/mgen-5.02.b+dfsg1/protolib/src/unix/bpfCap.cpp:112:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fd = open(bpfName, O_RDWR);
data/mgen-5.02.b+dfsg1/protolib/src/unix/bpfCap.cpp:301: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, bpf_buffer+bpf_index+bpfHdr->bh_hdrlen, bpfHdr->bh_caplen);
data/mgen-5.02.b+dfsg1/protolib/src/unix/bpfCap.cpp:337: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(&type, buffer+12, 2);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:176: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 deviceName[32];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:184: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).
        int ifNumber = atoi(ptr);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:186:25:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if ((socketFd = open(deviceName, O_RDWR)) < 0)
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:394: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 ifname[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:443: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.
                char nameBuffer[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:469: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 nameBuffer[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:546: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 ifname[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:582:25:  [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(&maddr, ptr->ifa_netmask, sizeof(sockaddr));
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:600: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.
                char nameBuffer[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:733: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 nameBuffer[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:744: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 ifName[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:818: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 ifaceName[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:831: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 cmd[1024];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:853:21:  [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 ifname[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:866: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.
                char aliasName[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:963: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 cmd[1024];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:973: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 ifname[IFNAMSIZ+1];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixSerial.cpp:71:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((descriptor = open(deviceName, flags)) < 0)
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:65:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    descriptor = open(devName, O_RDWR);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:71:27:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if ((descriptor = open(devName, O_RDWR)) < 0)
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:107: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 devName[PATH_MAX];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:111:9:  [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(devName, "/dev/tap%d", i);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:112:27:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if ((descriptor = open(devName, O_RDWR)) < 0)
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:117:9:  [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(vif_name, "tap%d", i);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:129: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 cmd[1024];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:183: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 cmd[64];
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:201: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 cmd[64];
data/mgen-5.02.b+dfsg1/protolib/src/unix/zebraRouteMgr.cpp:140: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(s,&ipLong,prefixInBytes); // copy the prefix addr
data/mgen-5.02.b+dfsg1/protolib/src/unix/zebraRouteMgr.cpp:149: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(s,&ipLong,4); // copy the prefix addr
data/mgen-5.02.b+dfsg1/protolib/src/unix/zebraRouteMgr.cpp:155: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(s,&ipLong,4); // copy the ifindex 
data/mgen-5.02.b+dfsg1/protolib/src/unix/zebraRouteMgr.cpp:203: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(s,&ipLong,prefixInBytes); // copy the prefix addr
data/mgen-5.02.b+dfsg1/protolib/src/unix/zebraRouteMgr.cpp:212: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(s,&ipLong,4); // copy the prefix addr
data/mgen-5.02.b+dfsg1/protolib/src/unix/zebraRouteMgr.cpp:218: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(s,&ipLong,4); // copy the ifindex 
data/mgen-5.02.b+dfsg1/protolib/src/unix/zebraRouteMgr.cpp:339: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/mgen-5.02.b+dfsg1/src/common/gpsPub.cpp:25:21:  [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* filePtr = fopen(keyFile, "r");
data/mgen-5.02.b+dfsg1/src/common/gpsPub.cpp:35: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(&theSize, posPtr, sizeof(unsigned int));
data/mgen-5.02.b+dfsg1/src/common/gpsPub.cpp:72:24:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if ((filePtr = fopen(keyFile, "w+")))
data/mgen-5.02.b+dfsg1/src/common/gpsPub.cpp:78: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(posPtr, &size, sizeof(unsigned int));
data/mgen-5.02.b+dfsg1/src/common/gpsPub.cpp:105:21:  [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* filePtr = fopen(keyFile, "r");
data/mgen-5.02.b+dfsg1/src/common/gpsPub.cpp:137:21:  [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* filePtr = fopen(keyFile, "r");
data/mgen-5.02.b+dfsg1/src/common/gpsPub.cpp:178: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((char*)gpsHandle, (char*)currentPosition, sizeof(GPSPosition));   
data/mgen-5.02.b+dfsg1/src/common/gpsPub.cpp:183: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((char*)currentPosition, (char*)gpsHandle, sizeof(GPSPosition));
data/mgen-5.02.b+dfsg1/src/common/gpsPub.cpp:191: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(&size, ptr, sizeof(unsigned int));
data/mgen-5.02.b+dfsg1/src/common/gpsPub.cpp:204: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(ptr, buffer, len);
data/mgen-5.02.b+dfsg1/src/common/gpsPub.cpp:212: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(&size, ptr, sizeof(unsigned int));
data/mgen-5.02.b+dfsg1/src/common/gpsPub.cpp:221: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(&size, ptr, sizeof(unsigned int));
data/mgen-5.02.b+dfsg1/src/common/gpsPub.cpp:238: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(&size, ptr, sizeof(unsigned int));
data/mgen-5.02.b+dfsg1/src/common/gpsPub.cpp:253: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, ptr, len);
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:35: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 charBuffer[2048];
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:115: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.
                char buffer[128];
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:119: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.
                    strcpy(buffer, "mgen version=");
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:121:21:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
                    strcat(buffer, " type=binary_log\n");
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:131: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(buffer+index, &temp16, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:135: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(buffer+index, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:138: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(buffer+index, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:216: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(&now, gmtime((time_t*)&currentTime.tv_sec), sizeof(struct tm));
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:218: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(&now, localtime((time_t*)&currentTime.tv_sec), sizeof(struct tm));
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:552:21:  [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[128];
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:558:21:  [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+index, &temp16, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:562:21:  [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+index, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:565:21:  [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+index, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:599:30:  [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* saveFile = fopen(save_path, "w+");
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:878:9:  [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 wideBuffer[PATH_MAX];
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:921:21:  [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* logFile = fopen(path, mode);
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:978:24:  [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* scriptFile = fopen(path, "r");
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:992: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 lineBuffer[SCRIPT_LINE_MAX+1];
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1026: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 fieldBuffer[SCRIPT_LINE_MAX+1];
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1297: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 upperString[16];
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1319: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 upperCmd[32];  // all commands < 32 characters
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1368:15:  [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[32];
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1455: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.
          char temp[4];
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1570:27:  [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* filePtr = fopen(arg, "w+");
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1598: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).
      SetDebugLevel(atoi(arg));
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1631: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.
          char temp[4];
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1904: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(buffer, saveptr, ncopy);
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1916: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, savebuf, ncopy);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:92: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 lowerCmd[32];  // all commands < 32 characters    
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:188: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[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:209: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 lowerCmd[32];  // all commands < 32 characters    
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:328: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 status[4];  // valid status is "on" or "off"
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:372: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.
       char status[4];  // valid status is "on" or "off"
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:395: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 status[4];  // valid status is "on" or "off"
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:413: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 status[4];  // valid status is "on" or "off"
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:498: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 startTime[256];
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:604: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 linebuffer[256];
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:633: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 format[256];
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:647: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 format[256];
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:648: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 net[64], addr[64];
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:677: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[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:763:26:  [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).
        cmd_descriptor = open(path, O_RDONLY | O_NONBLOCK);
data/mgen-5.02.b+dfsg1/src/common/mgenAppSinkTransport.cpp:141:22:  [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).
        descriptor = open(path, flags);
data/mgen-5.02.b+dfsg1/src/common/mgenAppSinkTransport.cpp:179: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(msg_buffer, txBuffer, len);
data/mgen-5.02.b+dfsg1/src/common/mgenAppSinkTransport.cpp:354: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).
      descriptor = open(path, O_RDONLY | O_NONBLOCK);
data/mgen-5.02.b+dfsg1/src/common/mgenAppSinkTransport.cpp:413: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(&tmpLen,msg_buffer,2);
data/mgen-5.02.b+dfsg1/src/common/mgenAppSinkTransport.cpp:443: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 read_buffer[BUFFER_MAX];
data/mgen-5.02.b+dfsg1/src/common/mgenAppSinkTransport.cpp:476: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(buffer+got_pending, read_buffer, bytes_read);
data/mgen-5.02.b+dfsg1/src/common/mgenBlast.cpp:136: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 txBuffer[MAX_SIZE];
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:40: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 upperString[16];
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:81: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 upperString[16];
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:150: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 upperString[16];
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:204: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 fieldBuffer[Mgen::SCRIPT_LINE_MAX];
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:710: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 upperString[16];
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:753: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 upperString[16];
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:792: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 fieldBuffer[Mgen::SCRIPT_LINE_MAX];
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:1031: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 fieldBuffer[32];
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:1082: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(newArray, array, count*sizeof(UINT16));
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:593: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.
	      char buffer [512];
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:594:8:  [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(buffer, "offevent flow>%lu", (unsigned long)flow_id);
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:679: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 buffer [512];
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:680:7:  [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(buffer, "stopFlow flow>%lu", (unsigned long)flow_id);
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:731: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 [512];
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:732: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(buffer, "offevent flow>%lu",(unsigned long)flow_id);
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:890: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 txBuffer[MAX_SIZE];
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:1005:6:  [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 [512];
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:1006:6:  [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(buffer, "offevent flow>%lu", (unsigned long)flow_id);
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:105: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+len,&temp16,sizeof(UINT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:117: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+len, &temp32, sizeof(INT32)); 
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:122: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+len, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:127: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+len, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:131: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+len, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:136: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+len, &temp16, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:163: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+len, dst_addr.GetRawHostAddress(), addrLen);
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:201: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(buffer+len, &temp16, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:209:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(buffer+len, host_addr.GetRawHostAddress(), addrLen);
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:229: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(buffer+len, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:233: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(buffer+len, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:237: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(buffer+len, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:264: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(buffer+len, &temp16, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:266: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(buffer+len, payload->GetRaw(), payload->GetPayloadLen());
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:280: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+len, &temp16, sizeof(short));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:283: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+len,mp_payload,mp_payload_len);
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:353: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(&temp16,buffer+len,sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:372: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(&temp32, buffer+len, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:377: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(&temp32, buffer+len, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:382: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(&temp32, buffer+len, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:386: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(&temp32, buffer+len, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:391: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(&temp16, buffer+len, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:426: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(&temp16, buffer+len, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:475: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(&temp32, buffer+len, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:479: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(&temp32, buffer+len, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:483: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(&temp32, buffer+len, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:508: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(&temp16, buffer+len, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:518:8:  [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(tmpStr,buffer+len,payload_len);
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:545: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(buffer+checksumPosition,&tx_checksum,4);
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:687: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 header[128];
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:696: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(header+index, &temp16, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:700: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(header+index, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:703: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(header+index, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:707: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(header+index, &temp16, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:727: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(header+index, src_addr.GetRawHostAddress(), addrLen);
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:733: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(header+index, &errorCode, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:808: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 header[128];
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:823: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(header+index, &temp16, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:828: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(header+index, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:832: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(header+index, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:837: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(header+index, &temp16, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:858: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(header+index, addr.GetRawHostAddress(), addrLen);
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:862: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(header+index,&temp16,sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:870: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(header+index,&flowID,sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:877: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(header+index,&temp16,sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:899: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(header+index,host_addr.GetRawHostAddress(),addrLen);
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1016: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 header[128];
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1027: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(header+index, &temp16, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1031: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(header+index, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1034: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(header+index, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1039: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(header+index, &temp16, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1062: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(header+index, src_addr.GetRawHostAddress(), addrLen);
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1206: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 header[128];
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1225: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(header+index, &temp16, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1239: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(header+index,&temp32,sizeof(UINT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1326: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[128];
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1340: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(buffer+index, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1343: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(buffer+index, &temp32, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1357: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(buffer+index, &temp16, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.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(buffer+index, &temp16, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1386: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(buffer+index, addr.GetRawHostAddress(), len);
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1393: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(buffer+index, interfaceName, len);
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1406: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(buffer+RECORD_LENGTH_OFFSET, &temp16, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1538: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* file = fopen(path, "rb");
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1545: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 buffer[BINARY_RECORD_MAX];
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1600: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 fileType[128];
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1625: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 header[4];
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1642: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(&recordLength, header+2, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1666:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp32, buffer+index, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1669:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp32, buffer+index, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1690:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp16, buffer+index, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1735:19:  [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(&temp32,buffer+index,sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1753:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp32, buffer+index, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1756:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp32, buffer+index, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1766:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp16, buffer+index, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1798:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp32, buffer+index, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1801:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp32, buffer+index, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1806:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp16, buffer+index, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1832:15:  [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 ifaceName[128];
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1833:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(ifaceName, buffer+index, ifaceNameLen);
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1872:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp32, buffer+index, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1875:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp32, buffer+index, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1909:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp32, buffer+index, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1912:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp32, buffer+index, sizeof(INT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1934:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp16, buffer+index, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1962:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp16,buffer+index,sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1970:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&temp32,buffer+index,sizeof(UINT32));
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1979:19:  [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(&temp16, buffer+index, sizeof(INT16));
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:49: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 upperString[16];
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:89:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char upperString[16];
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:129: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 upperString[16];
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:168: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 upperString[16];
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:308: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 fieldBuffer[Mgen::SCRIPT_LINE_MAX+1];
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:436:6:  [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 fieldBuffer[Mgen::SCRIPT_LINE_MAX+1];
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:503: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 errbuf[PCAP_ERRBUF_SIZE+1];
data/mgen-5.02.b+dfsg1/src/common/mgenPayload.cpp:47: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(tmp,payload+i,1);
data/mgen-5.02.b+dfsg1/src/common/mgenPayload.cpp:54: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(tmp,payload+i,1);
data/mgen-5.02.b+dfsg1/src/common/mgenPayload.cpp:127: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(payload,inStr,inSize);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:110: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 upperCmd[32];  // all commands < 32 characters
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:179: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 upperString[16];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:217:15:  [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[32];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:295: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.
          char tmpOutput[512];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:301: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.
          char buffer[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:308: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.
          char tmpOutput[512];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:314: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.
          char buffer[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:321: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.
          char tmpOutput[512];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:327: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.
          char buffer[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:334: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).
          SetDebugLevel(atoi(arg));
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:340: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.
          char buffer[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:341:11:  [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(buffer," TXLOG");
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:347: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.
          char buffer [8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:348:11:  [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(buffer," LOCALTIME");
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:355: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.
          char buffer[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:356:11:  [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(buffer," NOLOG");
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:362: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.
          char buffer[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:363:11:  [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(buffer," BINARY");
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:373: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.
          char buffer[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:374:11:  [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(buffer," FLUSH");
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:392: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.
          char buffer [8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:393:11:  [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(buffer," RXBUFFER %d",sizeTemp);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:405: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.
          char buffer [8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:406:11:  [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(buffer," TXBUFFER %d",sizeTemp);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:419: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.
          char buffer [8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:420:11:  [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(buffer," TOS %i",tosTemp);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:433: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.
          char buffer[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:434:11:  [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(buffer," TTL %i",ttlTemp);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:440: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.
          char tmpOutput[512];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:447: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.
          char buffer[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:454: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.
          char buffer[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:455:11:  [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(buffer," CHECKSUM");
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:461: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.
          char buffer[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:462:11:  [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(buffer," TXCHECKSUM");
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:468: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.
          char buffer[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:469:11:  [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(buffer," RXCHECKSUM");
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:536:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!(log_file = fopen(path, mode)))
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:573: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 fieldBuffer[SCRIPT_LINE_MAX+1];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:641:24:  [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* scriptFile = fopen(path,"r");
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:655: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 lineBuffer[SCRIPT_LINE_MAX+1];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:703: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(buffer, saveptr, ncopy);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:715: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, savebuf, ncopy);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgrApp.cpp:92: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[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgrApp.cpp:221: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[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgrApp.cpp:279: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 msgBuffer[512];
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgrApp.cpp:318: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[8192];
data/mgen-5.02.b+dfsg1/src/common/mgenSequencer.cpp:133: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(&last_seq_time,&time1,sizeof(struct timeval));
data/mgen-5.02.b+dfsg1/src/common/mgenSequencer.cpp:134: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(seq_space,tmp,sizeof(int)*size);
data/mgen-5.02.b+dfsg1/src/common/mgenSequencer.cpp:158: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(tmp,seq_space,size*sizeof(int));
data/mgen-5.02.b+dfsg1/src/common/mgenTransport.cpp:842: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.
          char buffer[MAX_SIZE];
data/mgen-5.02.b+dfsg1/src/common/mgenTransport.cpp:869:27:  [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(&recvdChecksum,buffer+checksumPosition,4);
data/mgen-5.02.b+dfsg1/src/common/mgenTransport.cpp:1029: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.
	      char buffer[TX_BUFFER_SIZE] = "";
data/mgen-5.02.b+dfsg1/src/common/mgenTransport.cpp:1198: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.
                char txBuffer[MAX_SIZE];     
data/mgen-5.02.b+dfsg1/src/common/mgenTransport.cpp:1342: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(rx_checksum_buffer,buffer+checksumPosition,4);
data/mgen-5.02.b+dfsg1/src/common/mgenTransport.cpp:1349: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(rx_checksum_buffer+rx_buffer_index,buffer+bufferIndex,numBytes);
data/mgen-5.02.b+dfsg1/src/common/mgenTransport.cpp:1354: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(&recvdChecksum,rx_checksum_buffer,4);
data/mgen-5.02.b+dfsg1/src/common/mgenTransport.cpp:1372: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(rx_checksum_buffer,buffer+(bufferIndex + msgBytes),checksumBytes);
data/mgen-5.02.b+dfsg1/src/common/mgenTransport.cpp:1499: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(&tmp_msg_len,buffer,sizeof(UINT16));
data/mgen-5.02.b+dfsg1/src/common/mgenTransport.cpp:1565:6:  [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 txBuffer[MAX_SIZE];    
data/mgen-5.02.b+dfsg1/src/common/mgenTransport.cpp:1775: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(rx_msg_buffer+bufferIndex,buffer+bufferIndex,(TX_BUFFER_SIZE - bufferIndex));
data/mgen-5.02.b+dfsg1/src/common/mgenTransport.cpp:1778: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(rx_msg_buffer+bufferIndex,buffer+bufferIndex,numBytes);
data/mgen-5.02.b+dfsg1/src/common/mgenTransport.cpp:1877: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(&recvdChecksum,buffer+checksumPosition,4);
data/mgen-5.02.b+dfsg1/src/common/mpmgr.cpp:50: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 buffer[PAYLOAD_MAX+1];
data/mgen-5.02.b+dfsg1/src/common/mpmgr.cpp:84: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 buffer[512];
data/mgen-5.02.b+dfsg1/src/common/pcap2mgen.cpp:58:35:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if (NULL == (infile = fopen(argv[1 + argOffset], "r")))
data/mgen-5.02.b+dfsg1/src/common/pcap2mgen.cpp:66:35:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if (NULL == (infile = fopen(argv[1 + argOffset], "r")))
data/mgen-5.02.b+dfsg1/src/common/pcap2mgen.cpp:71:36:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if (NULL == (outfile = fopen(argv[2 + argOffset], "w+")))
data/mgen-5.02.b+dfsg1/src/common/pcap2mgen.cpp:83: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 pcapErrBuf[PCAP_ERRBUF_SIZE+1];
data/mgen-5.02.b+dfsg1/src/common/pcap2mgen.cpp:105: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(ethBuffer, pktData, numBytes);
data/mgen-5.02.b+dfsg1/include/mgen.h:64:15:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
              strncpy(interface_name, interfaceName, 16);
data/mgen-5.02.b+dfsg1/include/mgen.h:204:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(sink_path, theSinkPath, PATH_MAX);
data/mgen-5.02.b+dfsg1/include/mgen.h:208:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(source_path, theSourcePath, PATH_MAX);
data/mgen-5.02.b+dfsg1/include/mgen.h:355:15:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
              strncpy(default_interface, interfaceName, 16);
data/mgen-5.02.b+dfsg1/include/mgenTransport.h:399:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		 strncpy(path,theSinkPath,(strlen(theSinkPath) + 1));
data/mgen-5.02.b+dfsg1/include/mgenTransport.h:399:30:  [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(path,theSinkPath,(strlen(theSinkPath) + 1));
data/mgen-5.02.b+dfsg1/protolib/examples/arposer.cpp:83:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/arposer.cpp:127:14:  [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 (0 == strlen(if_name))
data/mgen-5.02.b+dfsg1/protolib/examples/arposer.cpp:213: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).
    size_t len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/arposer.cpp:227:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(if_name, val, 255);
data/mgen-5.02.b+dfsg1/protolib/examples/base64Example.cpp:11:25:  [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).
    unsigned int tlen = strlen(text);
data/mgen-5.02.b+dfsg1/protolib/examples/detourExample.cpp:77:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/detourExample.cpp:230: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).
    size_t len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:100:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t nameLen = strlen(nodeName) + 1;
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:254:52:  [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).
            unsigned int nameBits = (unsigned int)(strlen(nameString)+1) << 3;
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:317:73:  [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).
            Node* node1 = static_cast<Node*>(node_tree.Find(nodeName1, (strlen(nodeName1)+1) << 3));
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:318:73:  [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).
            Node* node2 = static_cast<Node*>(node_tree.Find(nodeName2, (strlen(nodeName2)+1) << 3));
data/mgen-5.02.b+dfsg1/protolib/examples/graphRider.cpp:772:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t len = strlen(argv[i]);
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:70:57:  [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).
        virtual unsigned int GetKeysize() const {return strlen(index);}
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:207:30:  [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(addrPtr);i++)
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:558:42:  [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).
                inputFilePath = new char[strlen(argv[i])];
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:564:40:  [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).
                memset(inputFilePath,0,strlen(argv[i]));
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:581:43:  [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).
                outputFilePath = new char[strlen(argv[i])];
data/mgen-5.02.b+dfsg1/protolib/examples/graphXMLExample.cpp:587:41:  [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).
                memset(outputFilePath,0,strlen(argv[i]));
data/mgen-5.02.b+dfsg1/protolib/examples/msg2MsgExample.cpp:205:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(pipeName,thePipePtr->GetName(),PATH_MAX);
data/mgen-5.02.b+dfsg1/protolib/examples/msg2MsgExample.cpp:259:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(msg_buffer);
data/mgen-5.02.b+dfsg1/protolib/examples/msg2MsgExample.cpp:411:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(charAddr,socketAddrStr,index-socketAddrStr);
data/mgen-5.02.b+dfsg1/protolib/examples/msg2MsgExample.cpp:462:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(charAddr,socketAddrStr,index-socketAddrStr);
data/mgen-5.02.b+dfsg1/protolib/examples/pcapExample.cpp:95:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/pcapExample.cpp:197:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/pcapExample.cpp:223: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).
        if (0 != strlen(errbuf))
data/mgen-5.02.b+dfsg1/protolib/examples/pcmd.cpp:25:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t argLen = strlen(argv[i]);
data/mgen-5.02.b+dfsg1/protolib/examples/pcmd.cpp:40:17:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
                strcat(cmdBuffer, " ");
data/mgen-5.02.b+dfsg1/protolib/examples/pipe2SockExample.cpp:175:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(pipeName, listen_pipe.GetName(), PATH_MAX);
data/mgen-5.02.b+dfsg1/protolib/examples/pipe2SockExample.cpp:192:28:  [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).
        unsigned int len = strlen(msg_buffer);
data/mgen-5.02.b+dfsg1/protolib/examples/pipe2SockExample.cpp:217:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(charAddr,argv[i],index-argv[i]);
data/mgen-5.02.b+dfsg1/protolib/examples/pipeExample.cpp:126:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/pipeExample.cpp:159:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        msg_len = strlen(val) + 1;
data/mgen-5.02.b+dfsg1/protolib/examples/pipeExample.cpp:254:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(pipeName, server_pipe.GetName(), PATH_MAX);
data/mgen-5.02.b+dfsg1/protolib/examples/pipeExample.cpp:299:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/pipeExample.cpp:382: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).
            unsigned int len = strlen(argv[i]) + 1;
data/mgen-5.02.b+dfsg1/protolib/examples/protoCapExample.cpp:98:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/protoCapExample.cpp:280:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/protoCapExample.cpp:303:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(rcvr_interface, ifName, 64);
data/mgen-5.02.b+dfsg1/protolib/examples/protoCapExample.cpp:338:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(sndr_interface, ifName, 64);
data/mgen-5.02.b+dfsg1/protolib/examples/protoCapExample.cpp:374:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(sndr_interface, ifName, 64);
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:139:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:381:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:395:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(string, val, 256);
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:422:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(string, val, 256);
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:479:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(string, val, 256);
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:537:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(string) + 1;
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:648: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).
            unsigned int len = strlen(string) + 1;
data/mgen-5.02.b+dfsg1/protolib/examples/protoExample.cpp:769: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).
                    len = strlen(string) + 1;
data/mgen-5.02.b+dfsg1/protolib/examples/protoFileExample.cpp:114:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/protoFileExample.cpp:212:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/queueExample.cpp:59:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(name, theName, PRODUCT_NAME_MAX);
data/mgen-5.02.b+dfsg1/protolib/examples/queueExample.cpp:86:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            {return (8*strlen(static_cast<const ProductRecord&>(item).GetName()));}
data/mgen-5.02.b+dfsg1/protolib/examples/riposer.cpp:96:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/riposer.cpp:147:14:  [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 (0 != strlen(rip_iface))
data/mgen-5.02.b+dfsg1/protolib/examples/riposer.cpp:233: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).
    size_t len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/riposer.cpp:247:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(rip_iface, val, 255);
data/mgen-5.02.b+dfsg1/protolib/examples/riposer.cpp:264:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(tempTxt, txtPtr, txtLen);
data/mgen-5.02.b+dfsg1/protolib/examples/riposer.cpp:282:22:  [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).
            txtLen = strlen(txtPtr);
data/mgen-5.02.b+dfsg1/protolib/examples/riposer.cpp:284:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(tempTxt, txtPtr, txtLen);
data/mgen-5.02.b+dfsg1/protolib/examples/serialExample.cpp:88:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/serialExample.cpp:229: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).
    size_t len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/serialExample.cpp:243:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(device_name, val, PATH_MAX);
data/mgen-5.02.b+dfsg1/protolib/examples/serialExample.cpp:302:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int numBytes = strlen(buffer);
data/mgen-5.02.b+dfsg1/protolib/examples/serialExample.cpp:305:25:  [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 (numBytes != strlen(buffer))
data/mgen-5.02.b+dfsg1/protolib/examples/simpleTcpExample.cpp:32:41:  [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 (!strncmp("listen", argv[1], strlen(argv[1])))
data/mgen-5.02.b+dfsg1/protolib/examples/simpleTcpExample.cpp:43:42:  [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 (!strncmp("connect", argv[1], strlen(argv[1])))
data/mgen-5.02.b+dfsg1/protolib/examples/simpleTcpExample.cpp:83:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        unsigned int length = strlen(clientRequest) + 1;
data/mgen-5.02.b+dfsg1/protolib/examples/simpleTcpExample.cpp:183: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).
                unsigned int length = strlen(serverResponse) + 1;
data/mgen-5.02.b+dfsg1/protolib/examples/sock2PipeExample.cpp:176:28:  [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).
        unsigned int len = strlen(msg_buffer);
data/mgen-5.02.b+dfsg1/protolib/examples/sock2PipeExample.cpp:201:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(charAddr,argv[i],index-argv[i]);
data/mgen-5.02.b+dfsg1/protolib/examples/timerTest.cpp:138:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/timerTest.cpp:264: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).
    size_t len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:1542:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:1575:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(mcast_iface, val, 255);
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:1590:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(addrText, val, 256);
data/mgen-5.02.b+dfsg1/protolib/examples/ting.cpp:1661:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(addr, cmd, 256);
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:175:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:219:14:  [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 (0 == strlen(vif_name))
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:225:14:  [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 (0 == strlen(if_name))
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:419: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).
    size_t len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:433:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(vif_name, val, ProtoVif::VIF_NAME_MAX);
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:440:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(addrString,val,addrLen);
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:483:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(if_name, val, ProtoVif::VIF_NAME_MAX);
data/mgen-5.02.b+dfsg1/protolib/examples/vifExample.cpp:600:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            unsigned int cmdLen = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/examples/vifLan.cpp:107:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/protolib/include/manetGraph.h:897:77:  [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).
                            {return static_cast<MY_TYPE*>(FindVertice(name,(strlen(name) & 0x01) ? (strlen(name) << 3) : ((strlen(name)+1) << 3)));}
data/mgen-5.02.b+dfsg1/protolib/include/manetGraph.h:897:101:  [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).
                            {return static_cast<MY_TYPE*>(FindVertice(name,(strlen(name) & 0x01) ? (strlen(name) << 3) : ((strlen(name)+1) << 3)));}
data/mgen-5.02.b+dfsg1/protolib/include/manetGraph.h:897:124:  [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).
                            {return static_cast<MY_TYPE*>(FindVertice(name,(strlen(name) & 0x01) ? (strlen(name) << 3) : ((strlen(name)+1) << 3)));}
data/mgen-5.02.b+dfsg1/protolib/include/manetGraphML.h:81: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).
                {return 8*strlen(static_cast<const AttributeKey&>(item).GetIndex());}
data/mgen-5.02.b+dfsg1/protolib/include/manetGraphML.h:88: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).
                {return 8*strlen(static_cast<const AttributeKey&>(item).GetName());}
data/mgen-5.02.b+dfsg1/protolib/include/manetGraphML.h:95: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).
                {return 8*strlen(static_cast<const AttributeKey&>(item).GetOldIndex());}
data/mgen-5.02.b+dfsg1/protolib/include/manetGraphML.h:117: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).
                {return 8*strlen(static_cast<const Attribute&>(item).GetLookup());}
data/mgen-5.02.b+dfsg1/protolib/include/manetGraphML2.h:101:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    {return 8*strlen(static_cast<const AttributeKey&>(item).GetName());}
data/mgen-5.02.b+dfsg1/protolib/include/manetGraphML2.h:110:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    {return 8*strlen(static_cast<const AttributeKey&>(item).GetId());}
data/mgen-5.02.b+dfsg1/protolib/include/manetGraphML2.h:140:30:  [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).
                    {return (strlen(attr_key.GetId() << 3);}
data/mgen-5.02.b+dfsg1/protolib/include/manetGraphML2.h:190:52:  [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).
                    {return ((sizeof(ITEM_TYPE*) + strlen(attr_key.GetId())) << 3);}
data/mgen-5.02.b+dfsg1/protolib/include/protoDispatcher.h:417:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    while (read(break_pipe_fd[0], byte, 32) > 0);
data/mgen-5.02.b+dfsg1/protolib/include/protoFile.h:108: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).
            size_t count = mbstowcs(wideBuffer, path, strlen(path)+1);
data/mgen-5.02.b+dfsg1/protolib/include/protoFile.h:123: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).
            size_t count = mbstowcs(wideBuffer, path, strlen(path)+1);
data/mgen-5.02.b+dfsg1/protolib/include/protoNet.h:101:25:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                        strncpy(iface_name, name, IFNAME_MAX);
data/mgen-5.02.b+dfsg1/protolib/include/protoQueue.h:442:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            {return Find(keyString, (unsigned int)(8*strlen(keyString)));}
data/mgen-5.02.b+dfsg1/protolib/include/protoSocket.h:173:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            int result = read(handle, buffer, numBytes);
data/mgen-5.02.b+dfsg1/protolib/include/protoTree.h:110:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            {return Find(keyString, (unsigned int)(8*strlen(keyString)));}
data/mgen-5.02.b+dfsg1/protolib/include/protoTree.h:180:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(text, GetKey(), tlen);
data/mgen-5.02.b+dfsg1/protolib/include/protoTree.h:520:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            {return Find(keyString, (unsigned int)(8*strlen(keyString)));}
data/mgen-5.02.b+dfsg1/protolib/include/protoXml.h:48:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        {return (strlen(filter_path) << 3);}
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdCap.cpp:122:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char*)sa.snd_name, interfaceName, IFNAMSIZ);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdCap.cpp:196:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ssize_t result = read(descriptor, buffer, numBytes);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:186:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                size_t len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:192:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:197:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                size_t len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:203:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                size_t len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:209:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdDetour.cpp:214:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                size_t len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdNet.cpp:75:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(iface_name, name, IFNAMSIZ);
data/mgen-5.02.b+dfsg1/protolib/src/bsd/bsdNet.cpp:76:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    iface_name_bits = strlen(iface_name) << 3;
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:331:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    size_t len = strlen(buffer);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:356:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buffer, inet_ntoa(((struct sockaddr_in *)&addr)->sin_addr), buflen);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:389:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buffer, text, buflen);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:1371:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buffer, hp->h_name, buflen);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:1372:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        nameLen = strlen(hp->h_name);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:1399:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                size_t alen = strlen(*alias);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:1405:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(buffer, *alias, buflen);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoAddress.cpp:1489:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        if (buffer) strncpy(buffer, hostName, buflen);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:30:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (!(argv[0] = new char[strlen("protoApp") + 1])) //dummy argument which is usually pointer to app
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:74:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:92:43:  [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 (!(argv[argc-1] = new char[strlen(fieldBuffer)+1]))
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:115:15:  [1] (buffer) wcslen:
  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 = wcslen((wchar_t*) cmdline);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:133:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                size_t len = strlen(ptr) + 1;
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:134: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).
                size_t bgLen = strlen("background");
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:138:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:155:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (!(argv[0] = new char[strlen("protoApp") + 1]))
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:160:13:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            getchar();
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:169:9:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        getchar();
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:193:21:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    getchar();
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:204:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:216:17:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                getchar();
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:225:43:  [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 (!(argv[argc-1] = new char[strlen(fieldBuffer)+1]))
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:231:17:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                getchar();
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:297:13:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            getchar();
data/mgen-5.02.b+dfsg1/protolib/src/common/protoApp.cpp:317:9:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        getchar();
data/mgen-5.02.b+dfsg1/protolib/src/common/protoCheck.cpp:111:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(file_name, file, 255);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoCheck.cpp:118:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(file_name, item.file_name, 255); 
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:287:9:  [1] (buffer) _tcsncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or
  automatically resizing strings. Risk is low because the source is a
  constant string.
        _tcsncat(moduleName, _T(" Debug"), 256 - nameLen);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDebug.cpp:578:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t headerLen = strlen(header);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoDispatcher.cpp:1216:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                if (read(timer_fd, &expirations, sizeof(expirations)) < 0)
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:49:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(tempPath, thePath, PATH_MAX);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:80:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t pathLen = strlen(tempPath) + 1;
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:220:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t pathLen = strlen(newName) + 1;
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:250:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(tempPath, newName, PATH_MAX);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:278:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t pathLen = strlen(tempPath) + 1;
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:354:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ssize_t result = read(descriptor, buffer, numBytes);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:610:25:  [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).
        path_len = (int)strlen(current->Path());
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:640:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(pathBuffer, d->Path(), PATH_MAX);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:703:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				if ((1 == strlen(ptr)) ||
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:704: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).
					((ptr[1] == '.') && (2 == strlen(ptr))))
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:714:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                size_t nameLen = strlen(fileName);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:771:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if ((1 == strlen(dp->d_name)) ||
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:772:51:  [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).
                ((dp->d_name[1] == '.' ) && (2 == strlen(dp->d_name))))
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:782: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).
            int nameLen = strlen(fileName);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:845:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(path, thePath, PATH_MAX);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:846:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len  = MIN(PATH_MAX, strlen(path));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:865: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).
    size_t len = MIN(PATH_MAX, strlen(fullName));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:917: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).
    size_t len = MIN(PATH_MAX, strlen(ptr));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:918:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(ptr, path, PATH_MAX-len);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:1185:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t pathLen = strlen(path);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:1189:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t nameLen = strlen(nextItem->Path());
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:1251:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(pathBuffer, next->Path(), PATH_MAX);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:1252:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t len = strlen(pathBuffer);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:1266:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(pathBuffer, next->Path(), len);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:1285: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).
    size_t len = strlen(thePath);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:1287:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(path, thePath, PATH_MAX);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:1311:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(thePath, path, PATH_MAX);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:1359:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
     strncpy(thePath, path, PATH_MAX);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:1360:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     size_t len = strlen(thePath);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoFile.cpp:1371:10:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
         strncat(thePath, tempPath, maxLen);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:54:40:  [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).
            mbstowcs(wideBuffer, path, strlen(path)+1);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:95:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(pipeName, theName, MAX_PATH - strlen(pipeName));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:95:43:  [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).
    strncat(pipeName, theName, MAX_PATH - strlen(pipeName));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:98:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    mbstowcs(wideBuffer, pipeName, strlen(pipeName)+1);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:134:43:  [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).
            mbstowcs(wideBuffer, theName, strlen(theName)+1);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:164:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(path, theName, PATH_MAX);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:184:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(pipeName, theName, MAX_PATH - strlen(pipeName));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:184:43:  [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).
    strncat(pipeName, theName, MAX_PATH - strlen(pipeName));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:187:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    mbstowcs(wideBuffer, pipeName, strlen(pipeName)+1);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:199: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).
        mbstowcs(wideBuffer, theName, strlen(theName)+1);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:286:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(pipeName, theName, PATH_MAX-strlen(pipeName));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:286:41:  [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).
    strncat(pipeName, theName, PATH_MAX-strlen(pipeName));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:293:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	          strlen(sockAddr.sun_path) + 1;
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:295:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen(sockAddr.sun_path) + sizeof(sockAddr.sun_family);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:318:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(path, theName, PATH_MAX);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:344:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(pipeName, theName, PATH_MAX - strlen(pipeName));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:344:43:  [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).
    strncat(pipeName, theName, PATH_MAX - strlen(pipeName));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:468:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(serverAddr.sun_path, theName, PATH_MAX - strlen(serverAddr.sun_path));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:468:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strncat(serverAddr.sun_path, theName, PATH_MAX - strlen(serverAddr.sun_path));
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:471: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).
	              strlen(serverAddr.sun_path) + 1;
data/mgen-5.02.b+dfsg1/protolib/src/common/protoPipe.cpp:473:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int addrLen = strlen(serverAddr.sun_path) + sizeof(serverAddr.sun_family);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoSocket.cpp:2379:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t nameSize = strlen(ifaceName) + 1;  // includes NULL termination
data/mgen-5.02.b+dfsg1/protolib/src/common/protoXml.cpp:52:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(filter_path, filterPath, FILTER_PATH_MAX);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoXml.cpp:103:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t tailLen = strlen(ptr);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoXml.cpp:104:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t nameLen = strlen(nodeName);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoXml.cpp:118:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t nameLen = strlen((const char*)nodeName);
data/mgen-5.02.b+dfsg1/protolib/src/common/protoXml.cpp:142:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t nameLen = strlen((const char*)nodeName);
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:134:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t nameLen = strlen(ifName);
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:223:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:229:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:235:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:241:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:248:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:467:83:  [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).
            IfNameItem* item = static_cast<IfNameItem*>(if_name_tree.Find(ifName, strlen(ifName) << 3));
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:597:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                size_t nameLen = strlen(pkt_msg.outdev_name);
data/mgen-5.02.b+dfsg1/protolib/src/linux/androidDetour.cpp:613:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                size_t nameLen = strlen(pkt_msg.indev_name);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:224:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:230:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:236:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:242:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxDetour.cpp:250:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t len = strlen(rule);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxNet.cpp:263:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(buffer, ifName, buflen);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxNet.cpp:264:28:  [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).
                    return strlen(ifName);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxNet.cpp:282:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(req.ifr_name, interfaceName, IFNAMSIZ);
data/mgen-5.02.b+dfsg1/protolib/src/linux/linuxNet.cpp:711:22:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    {strncpy(iface_name, ifName, IFNAMSIZ);} 
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraph.cpp:56: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(theName);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraph.cpp:472:37:  [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).
            unsigned int nameSize = strlen(name_ptr);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraph.cpp:582:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int nameSize = strlen(theName);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraph.cpp:811:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int nameSize = strlen(theName);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:49:22:  [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).
    index = new char[strlen(theIndex)+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:50:21:  [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).
    name = new char[strlen(theName)+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:59:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        oldindex = new char[strlen(theOldIndex)+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:103:22:  [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).
    index = new char[strlen(theIndex)+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:104:21:  [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).
    name = new char[strlen(theName)+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:113:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        oldindex = new char[strlen(theOldIndex)+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:232:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    defaultvalue = new char[strlen(theDefault)+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:281:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    XMLName = new char[strlen(theName)+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:550:8:  [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(GetString(node))>maxlen)
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:564: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).
    sourceName = new char[strlen(GetString(link.GetSrc()->GetNode()))+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:566:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    sourcePortName = new char[strlen(GetString(*link.GetSrc()))+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:568: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).
    targetName = new char[strlen(GetString(link.GetDst()->GetNode()))+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:570:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    targetPortName = new char[strlen(GetString(*link.GetDst()))+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:572:8:  [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(sourceName)+strlen(sourcePortName)+strlen(targetName)+strlen(targetPortName)+21>maxlen)
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:572: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).
    if(strlen(sourceName)+strlen(sourcePortName)+strlen(targetName)+strlen(targetPortName)+21>maxlen)
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:572:50:  [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(sourceName)+strlen(sourcePortName)+strlen(targetName)+strlen(targetPortName)+21>maxlen)
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:572:69:  [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(sourceName)+strlen(sourcePortName)+strlen(targetName)+strlen(targetPortName)+21>maxlen)
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:593:25:  [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).
    portName = new char[strlen(GetString(interface))+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:595:8:  [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(portName)+strlen(GetString(interface.GetNode()))+12>maxlen)
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:595:25:  [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(portName)+strlen(GetString(interface.GetNode()))+12>maxlen)
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:609:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    AttributeKey* theKey = namedkeylist.Find(theName,strlen(theName)*8);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:621:38:  [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).
    return namedkeylist.Find(theName,strlen(theName)*8);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:625:45:  [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).
    return oldindexkeylist.Find(theOldIndex,strlen(theOldIndex)*8);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:668:28:  [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).
    lookupvalue = new char[strlen(theLookupvalue)+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:669:22:  [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).
    index = new char[strlen(theIndex)+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:670:22:  [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).
    value = new char[strlen(theValue)+1];
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:750:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if(strlen((const char*)nodeId) > MAXXMLIDLENGTH)
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:1349:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    AttributeList::Iterator it(*this,false,theLookup,strlen(theLookup)*8);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:1439:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    AttributeList::Iterator it(attributelist,false,key,strlen(key)*8);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:1468:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    AttributeList::Iterator it(attributelist,false,key,strlen(key)*8);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML.cpp:1497:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    AttributeList::Iterator it(attributelist,false,key,strlen(key)*8);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:86: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).
    if (NULL == (attr_name = new char[strlen(name)+1]))
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:95:41:  [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 (NULL == (attr_id = new char[strlen(id)+1]))
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:152:42:  [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 (NULL == (attr_default = new char[strlen(value)+1]))
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:180:44:  [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 (NULL == (attr_value = new char[strlen(value)+1]))
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:210:40:  [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).
    unsigned int keyLen = itemPtrLen + strlen(attr_key.GetName());
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:307:26:  [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).
    unsigned int idLen = strlen(attrKey->GetId());
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:502:42:  [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 (NULL == (graph_id = new char[strlen(graphId) + 1]))
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:619:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if(strlen((const char*)nodeId) > MAXXMLIDLENGTH)
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:1166:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    AttributeList::Iterator it(*this,false,theLookup,strlen(theLookup)*8);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:1255:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    AttributeList::Iterator it(attributelist,false,key,strlen(key)*8);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:1284:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    AttributeList::Iterator it(attributelist,false,key,strlen(key)*8);
data/mgen-5.02.b+dfsg1/protolib/src/manet/manetGraphML2.cpp:1313:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    AttributeList::Iterator it(attributelist,false,key,strlen(key)*8);
data/mgen-5.02.b+dfsg1/protolib/src/unix/bpfCap.cpp:146:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ifr.ifr_name, interfaceName, sizeof(ifr.ifr_name));
data/mgen-5.02.b+dfsg1/protolib/src/unix/bpfCap.cpp:268:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ssize_t result = read(descriptor, bpf_buffer, bpf_buflen);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:86:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    namelen = strlen(ptr->ifa_name);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:90:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(buffer, ptr->ifa_name, maxlen);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:115:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(req.ifr_name, interfaceName, IFNAMSIZ);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:396:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(ifname, ptr->ifa_name, IFNAMSIZ);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:548:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(ifname, ptr->ifa_name, IFNAMSIZ);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:715:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(req.ifr_name, interfaceName, IFNAMSIZ);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:747:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buffer, ifName, buflen);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:748: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).
        return strlen(ifName);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:780:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buffer, req.ifr_name, buflen);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:800:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(req.ifr_name, ifaceName, IFNAMSIZ);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:868:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(aliasName, ifaceName, IFNAMSIZ);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:869:40:  [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).
                unsigned int namelen = strlen(aliasName);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixNet.cpp:872:21:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
                    strcat(aliasName, ":");
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixSerial.cpp:116:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int result = read(descriptor, buffer, numBytes);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:86:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ifr.ifr_name, vifName, IFNAMSIZ);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:102:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(vif_name, vifName, VIF_NAME_MAX);
data/mgen-5.02.b+dfsg1/protolib/src/unix/unixVif.cpp:261:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int result = read(descriptor, buffer, numBytes);
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:122:50:  [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).
                    fwrite(buffer, sizeof(char), strlen(buffer)+1, log_file);
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:879:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int pathLen = strlen(path);
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1034:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1047: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).
        ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1071:22:  [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).
              ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1298:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(string);
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1320:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1369:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              unsigned int len = strlen(arg);
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1456:30:  [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).
          unsigned int len = strlen(arg);
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1573:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              char* path = new char[strlen(arg) + 1];
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1632:30:  [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).
          unsigned int len = strlen(arg);
data/mgen-5.02.b+dfsg1/src/common/mgen.cpp:1869:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(interface_name, interfaceName, 16);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:85:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:192:13:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
            strcat(buffer, " ");
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:193:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
            strncat(buffer, val, 8192 - strlen(buffer));
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:193:41:  [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).
            strncat(buffer, val, 8192 - strlen(buffer));
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:195:28:  [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).
        unsigned int len = strlen(buffer);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:208:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);    
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:245:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        char* string = new char[strlen(val) + 64];
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:323:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ifinfo_name, val, 63);  
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:329:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(status, val, 3);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:331:28:  [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).
        unsigned int len = strlen(status);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:373:8:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
       strncpy(status, val, 3);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:375: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).
       unsigned int len = strlen(status);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:396:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(status, val, 3);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:398:26:  [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).
      unsigned int len = strlen(status);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:414:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(status, val, 3);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:416:26:  [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).
      unsigned int len = strlen(status);
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:610:45:  [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 (!strncmp(linebuffer, "Unicast", strlen("Unicast")) ||
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:611:49:  [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).
            !strncmp(linebuffer, "Non-unicast", strlen("Non-unicast")))
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:630:42:  [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 (!strncmp(linebuffer, ifName, strlen(ifName)))
data/mgen-5.02.b+dfsg1/src/common/mgenApp.cpp:867:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t result = read(cmd_descriptor, buffer, numBytes);
data/mgen-5.02.b+dfsg1/src/common/mgenAppSinkTransport.cpp:483:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t result = read(descriptor, buffer, nBytes);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:41:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(string);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:82:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(string);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:151:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(string);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:215: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).
        ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:237:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:254:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:269: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).
        ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:329:22:  [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).
              ptr += strlen(fieldBuffer) + strlen(portPtr) + 1;
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:329:44:  [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).
              ptr += strlen(fieldBuffer) + strlen(portPtr) + 1;
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:356:22:  [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).
              ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:375:22:  [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).
              ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:405:15:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
              strncpy(fieldBuffer, pptr+1, ptr - pptr - 1);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:425:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              unsigned int len = strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:441:22:  [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).
              ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:465:22:  [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).
              ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:485:22:  [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).
              ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:507: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).
          ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:524:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(interface_name, fieldBuffer, 15);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:527: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).
          ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:551:22:  [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).
              ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:571:22:  [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).
              ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:599:15:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
              strncpy(fieldBuffer, pptr+1, ptr - pptr - 1);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:602:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              payload = new char[strlen(fieldBuffer) + 1];
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:623:22:  [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).
              ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:711:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(string);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:754:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(string);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:802: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).
        ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:822:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:841:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:855:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:866:25:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                        strncpy(interface_name, fieldBuffer, 15);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:869: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).
                        ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:887: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).
                        ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:922: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).
                        ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:955:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:971:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:987:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:1028:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            len = strlen(ptr);
data/mgen-5.02.b+dfsg1/src/common/mgenEvent.cpp:1033:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(fieldBuffer, ptr, len);
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:491:28:  [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).
        payload = new char[strlen(tmpPayload) + 1];
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:595: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).
	      unsigned int len = strlen(buffer);
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:681:26:  [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).
      unsigned int len = strlen(buffer);
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:733:22:  [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).
		unsigned int len = strlen(buffer);
data/mgen-5.02.b+dfsg1/src/common/mgenFlow.cpp:1007:25:  [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).
	    unsigned int len = strlen(buffer);
data/mgen-5.02.b+dfsg1/src/common/mgenMsg.cpp:1389: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).
                len = interfaceName ? strlen(interfaceName) : 0;
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:50:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(string);
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:90:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(string);
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:130:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(string);
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:169:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(string);
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:323:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            ptr += strlen(fieldBuffer);   
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:341:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            ptr += strlen(fieldBuffer);   
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:350:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:384:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(fieldBuffer, pptr+1, ptr - pptr - 1);
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:405:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:451: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).
	    ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:460: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).
	    ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenPattern.cpp:512:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (0 != strlen(errbuf))
data/mgen-5.02.b+dfsg1/src/common/mgenPayload.cpp:19:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size = (strlen(inStr) / 2) + (strlen(inStr) % 2);
data/mgen-5.02.b+dfsg1/src/common/mgenPayload.cpp:19: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).
	size = (strlen(inStr) / 2) + (strlen(inStr) % 2);
data/mgen-5.02.b+dfsg1/src/common/mgenPayload.cpp:27: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).
    int inLen = strlen(inStr);
data/mgen-5.02.b+dfsg1/src/common/mgenPayload.cpp:32: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(inStr) - i) % 2) == 1) {
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:111:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:180:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(string);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:218:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              unsigned int len = strlen(arg);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:581:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgr.cpp:594: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).
        ptr += strlen(fieldBuffer);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgrApp.cpp:139:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgrApp.cpp:225:13:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
            strcat(buffer, " ");
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgrApp.cpp:226:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
            strncat(buffer, val, 8192 - strlen(buffer));
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgrApp.cpp:226:41:  [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).
            strncat(buffer, val, 8192 - strlen(buffer));
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgrApp.cpp:228:28:  [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).
        unsigned int len = strlen(buffer);
data/mgen-5.02.b+dfsg1/src/common/mgenPayloadMgrApp.cpp:241:22:  [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).
  unsigned int len = strlen(cmd);
data/mgen-5.02.b+dfsg1/src/common/mgenTransport.cpp:725:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(interface_name, interfaceName, 16);

ANALYSIS SUMMARY:

Hits = 1336
Lines analyzed = 79635 in approximately 1.78 seconds (44713 lines/second)
Physical Source Lines of Code (SLOC) = 63374
Hits@level = [0] 373 [1] 399 [2] 723 [3]  14 [4] 199 [5]   1
Hits@level+ = [0+] 1709 [1+] 1336 [2+] 937 [3+] 214 [4+] 200 [5+]   1
Hits/KSLOC@level+ = [0+] 26.9669 [1+] 21.0812 [2+] 14.7852 [3+] 3.37678 [4+] 3.15587 [5+] 0.0157793
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.