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/herculesstudio-1.5.0/HercConfiguration/DeviceListView.h
Examining data/herculesstudio-1.5.0/HercConfiguration/DevicesRename.h
Examining data/herculesstudio-1.5.0/HercConfiguration/DasdProperties.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/TerminalProperties.h
Examining data/herculesstudio-1.5.0/HercConfiguration/SystemConfigLine.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/DevicesPane.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/ConfigurationEditor.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/SysgProperties.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/ConfigurationFreeEditor.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/DeviceConfigLine.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/SystemConfigLine.h
Examining data/herculesstudio-1.5.0/HercConfiguration/ConfigurationFreeEditor.h
Examining data/herculesstudio-1.5.0/HercConfiguration/ConsoleProperties.h
Examining data/herculesstudio-1.5.0/HercConfiguration/DasdProperties.h
Examining data/herculesstudio-1.5.0/HercConfiguration/SysgProperties.h
Examining data/herculesstudio-1.5.0/HercConfiguration/NewReaderFile.h
Examining data/herculesstudio-1.5.0/HercConfiguration/DeviceMenuProcessor.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/TapeProperties.h
Examining data/herculesstudio-1.5.0/HercConfiguration/TerminalProperties.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/DeviceConfigView.h
Examining data/herculesstudio-1.5.0/HercConfiguration/ConfigFile.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/ConfigLine.h
Examining data/herculesstudio-1.5.0/HercConfiguration/StatusUpdateCollector.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/DeviceConfigView.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/DeviceTypes.h
Examining data/herculesstudio-1.5.0/HercConfiguration/DevicesWidget.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/CtcProperties.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/DeviceTypes.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/CtcProperties.h
Examining data/herculesstudio-1.5.0/HercConfiguration/ReaderFileListView.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/Configuration.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/DeviceMenuProcessor.h
Examining data/herculesstudio-1.5.0/HercConfiguration/CardReaderProperties.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/VisualizedDeviceEntry.h
Examining data/herculesstudio-1.5.0/HercConfiguration/GenericDeviceProperties.h
Examining data/herculesstudio-1.5.0/HercConfiguration/Extended_Ui_CardReaderProperties.h
Examining data/herculesstudio-1.5.0/HercConfiguration/Extended_Ui_CardReaderProperties.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/Configuration.h
Examining data/herculesstudio-1.5.0/HercConfiguration/CardReaderProperties.h
Examining data/herculesstudio-1.5.0/HercConfiguration/DevicesWidget.h
Examining data/herculesstudio-1.5.0/HercConfiguration/DeviceConfigLine.h
Examining data/herculesstudio-1.5.0/HercConfiguration/StatusUpdateCollector.h
Examining data/herculesstudio-1.5.0/HercConfiguration/ReaderFileListView.h
Examining data/herculesstudio-1.5.0/HercConfiguration/PrinterProperties.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/TapeProperties.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/DevicesRename.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/ConfigFile.h
Examining data/herculesstudio-1.5.0/HercConfiguration/ConfigurationEditor.h
Examining data/herculesstudio-1.5.0/HercConfiguration/DevicesPane.h
Examining data/herculesstudio-1.5.0/HercConfiguration/ConfigLine.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/PunchProperties.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/VisualizedDeviceEntry.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/ConsoleProperties.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/PrinterProperties.h
Examining data/herculesstudio-1.5.0/HercConfiguration/GenericDeviceProperties.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/NewReaderFile.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/DeviceListView.cpp
Examining data/herculesstudio-1.5.0/HercConfiguration/PunchProperties.h
Examining data/herculesstudio-1.5.0/HercPrinter/DecolationRules.h
Examining data/herculesstudio-1.5.0/HercPrinter/PrinterInterface.cpp
Examining data/herculesstudio-1.5.0/HercPrinter/PaperDialog.cpp
Examining data/herculesstudio-1.5.0/HercPrinter/PagePrinter.cpp
Examining data/herculesstudio-1.5.0/HercPrinter/PaperDialog.h
Examining data/herculesstudio-1.5.0/HercPrinter/PrinterItem.h
Examining data/herculesstudio-1.5.0/HercPrinter/Trigger.cpp
Examining data/herculesstudio-1.5.0/HercPrinter/PrintRunner.cpp
Examining data/herculesstudio-1.5.0/HercPrinter/DecolationDialog.h
Examining data/herculesstudio-1.5.0/HercPrinter/StationeryDialog.h
Examining data/herculesstudio-1.5.0/HercPrinter/PagePrinter.h
Examining data/herculesstudio-1.5.0/HercPrinter/PrinterController.h
Examining data/herculesstudio-1.5.0/HercPrinter/Trigger.h
Examining data/herculesstudio-1.5.0/HercPrinter/PrinterItem.cpp
Examining data/herculesstudio-1.5.0/HercPrinter/DecolationRules.cpp
Examining data/herculesstudio-1.5.0/HercPrinter/PrinterDialog.cpp
Examining data/herculesstudio-1.5.0/HercPrinter/DecolationDialog.cpp
Examining data/herculesstudio-1.5.0/HercPrinter/PrinterInterface.h
Examining data/herculesstudio-1.5.0/HercPrinter/PrintRunner.h
Examining data/herculesstudio-1.5.0/HercPrinter/Stationery.h
Examining data/herculesstudio-1.5.0/HercPrinter/PrinterDialog.h
Examining data/herculesstudio-1.5.0/HercPrinter/StationeryDialog.cpp
Examining data/herculesstudio-1.5.0/HercPrinter/PrinterController.cpp
Examining data/herculesstudio-1.5.0/HercPrinter/Stationery.cpp
Examining data/herculesstudio-1.5.0/HercStudio/Runner.h
Examining data/herculesstudio-1.5.0/HercStudio/MipsGauge.cpp
Examining data/herculesstudio-1.5.0/HercStudio/Regs32.cpp
Examining data/herculesstudio-1.5.0/HercStudio/MainPanelClassic.h
Examining data/herculesstudio-1.5.0/HercStudio/Psw.h
Examining data/herculesstudio-1.5.0/HercStudio/MipsLed.cpp
Examining data/herculesstudio-1.5.0/HercStudio/IplConfig.cpp
Examining data/herculesstudio-1.5.0/HercStudio/CommandLine.cpp
Examining data/herculesstudio-1.5.0/HercStudio/StatusRunner.h
Examining data/herculesstudio-1.5.0/HercStudio/NamedPipe.cpp
Examining data/herculesstudio-1.5.0/HercStudio/FieldTip.cpp
Examining data/herculesstudio-1.5.0/HercStudio/StringedObject.h
Examining data/herculesstudio-1.5.0/HercStudio/Mips.cpp
Examining data/herculesstudio-1.5.0/HercStudio/MainPanelModern.h
Examining data/herculesstudio-1.5.0/HercStudio/Regs64.h
Examining data/herculesstudio-1.5.0/HercStudio/Fonts.cpp
Examining data/herculesstudio-1.5.0/HercStudio/MainPanel.cpp
Examining data/herculesstudio-1.5.0/HercStudio/Watchdog.h
Examining data/herculesstudio-1.5.0/HercStudio/Environment.cpp
Examining data/herculesstudio-1.5.0/HercStudio/Preferences.cpp
Examining data/herculesstudio-1.5.0/HercStudio/Recovery.cpp
Examining data/herculesstudio-1.5.0/HercStudio/HerculesStudio.h
Examining data/herculesstudio-1.5.0/HercStudio/Preferences.h
Examining data/herculesstudio-1.5.0/HercStudio/PanelButton.h
Examining data/herculesstudio-1.5.0/HercStudio/MainPanel.h
Examining data/herculesstudio-1.5.0/HercStudio/Recovery.h
Examining data/herculesstudio-1.5.0/HercStudio/Regs64.cpp
Examining data/herculesstudio-1.5.0/HercStudio/Psw.cpp
Examining data/herculesstudio-1.5.0/HercStudio/MainPanelClassic.cpp
Examining data/herculesstudio-1.5.0/HercStudio/HerculesExecutor.h
Examining data/herculesstudio-1.5.0/HercStudio/MainPanelModern.cpp
Examining data/herculesstudio-1.5.0/HercStudio/SynchronizedQueue.cpp
Examining data/herculesstudio-1.5.0/HercStudio/Runner.cpp
Examining data/herculesstudio-1.5.0/HercStudio/Arguments.h
Examining data/herculesstudio-1.5.0/HercStudio/PreferencesWin.h
Examining data/herculesstudio-1.5.0/HercStudio/MipsGauge.h
Examining data/herculesstudio-1.5.0/HercStudio/CommandLine.h
Examining data/herculesstudio-1.5.0/HercStudio/MainWindow.cpp
Examining data/herculesstudio-1.5.0/HercStudio/StatusRunner.cpp
Examining data/herculesstudio-1.5.0/HercStudio/FontPreferences.cpp
Examining data/herculesstudio-1.5.0/HercStudio/Watchdog.cpp
Examining data/herculesstudio-1.5.0/HercStudio/FieldTip.h
Examining data/herculesstudio-1.5.0/HercStudio/MipsLed.h
Examining data/herculesstudio-1.5.0/HercStudio/HelpAbout.cpp
Examining data/herculesstudio-1.5.0/HercStudio/MainWindow.h
Examining data/herculesstudio-1.5.0/HercStudio/FontPreferences.h
Examining data/herculesstudio-1.5.0/HercStudio/IpValidator.cpp
Examining data/herculesstudio-1.5.0/HercStudio/Regs32.h
Examining data/herculesstudio-1.5.0/HercStudio/LogWidget.h
Examining data/herculesstudio-1.5.0/HercStudio/main.cpp
Examining data/herculesstudio-1.5.0/HercStudio/Mips.h
Examining data/herculesstudio-1.5.0/HercStudio/LogRunner.cpp
Examining data/herculesstudio-1.5.0/HercStudio/LogRunner.h
Examining data/herculesstudio-1.5.0/HercStudio/StringTokenizer.h
Examining data/herculesstudio-1.5.0/HercStudio/HelpAbout.h
Examining data/herculesstudio-1.5.0/HercStudio/IpValidator.h
Examining data/herculesstudio-1.5.0/HercStudio/NamedPipe.h
Examining data/herculesstudio-1.5.0/HercStudio/Environment.h
Examining data/herculesstudio-1.5.0/HercStudio/LogWidget.cpp
Examining data/herculesstudio-1.5.0/HercStudio/Fonts.h
Examining data/herculesstudio-1.5.0/HercStudio/IplConfig.h
Examining data/herculesstudio-1.5.0/HercStudio/StringedObject.cpp
Examining data/herculesstudio-1.5.0/HercStudio/PreferencesWin.cpp
Examining data/herculesstudio-1.5.0/HercStudio/SynchronizedQueue.h
Examining data/herculesstudio-1.5.0/HercStudio/Arguments.cpp
Examining data/herculesstudio-1.5.0/HercStudio/PanelButton.cpp
Examining data/herculesstudio-1.5.0/HercStudio/HerculesExecutor.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/LineEditWithFocus.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/Dasdcopy.h
Examining data/herculesstudio-1.5.0/HercUtilities/DasdLoad.h
Examining data/herculesstudio-1.5.0/HercUtilities/HetUpd.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/DasdLoad.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/HetUpd.h
Examining data/herculesstudio-1.5.0/HercUtilities/HetInit.h
Examining data/herculesstudio-1.5.0/HercUtilities/UtilityExecutor.h
Examining data/herculesstudio-1.5.0/HercUtilities/Dasdconv.h
Examining data/herculesstudio-1.5.0/HercUtilities/TapeCopy.h
Examining data/herculesstudio-1.5.0/HercUtilities/TapeCopy.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/Dasdls.h
Examining data/herculesstudio-1.5.0/HercUtilities/HetMap.h
Examining data/herculesstudio-1.5.0/HercUtilities/HetMap.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/UtilityRunner.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/HetGet.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/TapeMap.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/DasdIsup.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/Dasdcopy.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/GenericUtility.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/DasdTab.h
Examining data/herculesstudio-1.5.0/HercUtilities/SystemUtils.h
Examining data/herculesstudio-1.5.0/HercUtilities/UtilityRunner.h
Examining data/herculesstudio-1.5.0/HercUtilities/TapeMap.h
Examining data/herculesstudio-1.5.0/HercUtilities/Dasdls.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/LineEditWithFocus.h
Examining data/herculesstudio-1.5.0/HercUtilities/Dasdcat.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/HetGet.h
Examining data/herculesstudio-1.5.0/HercUtilities/DasdInit.h
Examining data/herculesstudio-1.5.0/HercUtilities/Dasdconv.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/SystemUtils.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/HetInit.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/DasdInit.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/DasdIsup.h
Examining data/herculesstudio-1.5.0/HercUtilities/Dasdcat.h
Examining data/herculesstudio-1.5.0/HercUtilities/TapeSplt.h
Examining data/herculesstudio-1.5.0/HercUtilities/GenericUtility.h
Examining data/herculesstudio-1.5.0/HercUtilities/DasdTab.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/TapeSplt.cpp
Examining data/herculesstudio-1.5.0/HercUtilities/UtilityExecutor.cpp

FINAL RESULTS:

data/herculesstudio-1.5.0/HercConfiguration/DevicesPane.cpp:189:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf(ss,"%4.4X %s",ent.getDeviceNumber(), def.substr(25).c_str());
data/herculesstudio-1.5.0/HercStudio/HerculesExecutor.cpp:111:8:  [4] (shell) execlp:
  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.
		rc = execlp(hercules.c_str(),hercules.c_str(),"-d","-f",configName.c_str(),"EXTERNALGUI",NULL);
data/herculesstudio-1.5.0/HercStudio/HerculesExecutor.cpp:153:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(&buffer[0],format,arg1);
data/herculesstudio-1.5.0/HercStudio/HerculesExecutor.cpp:160:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(&buffer[0],format,arg1);
data/herculesstudio-1.5.0/HercStudio/HerculesExecutor.cpp:202:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(&buffer[0],format,arg1);
data/herculesstudio-1.5.0/HercStudio/HerculesExecutor.cpp:210:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(&buffer[0],format,arg1);
data/herculesstudio-1.5.0/HercStudio/NamedPipe.cpp:169:12:  [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.
    return system(command.c_str()); // TODO: temp
data/herculesstudio-1.5.0/HercStudio/Environment.cpp:50:19:  [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 * path = getenv("HERCULES_ICONS");
data/herculesstudio-1.5.0/HercStudio/NamedPipe.cpp:70:19:  [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 * home = getenv("HOME");
data/herculesstudio-1.5.0/HercConfiguration/ConfigFile.cpp:56:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	mFile = fopen(mFileName.c_str(), "r");
data/herculesstudio-1.5.0/HercConfiguration/ConfigFile.cpp:79:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buff[MAX_CONFIG_LINE];
data/herculesstudio-1.5.0/HercConfiguration/ConfigFile.cpp:97:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buff[MAX_CONFIG_LINE];
data/herculesstudio-1.5.0/HercConfiguration/ConfigFile.cpp:237:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE * f = fopen(fileName.c_str(), "w");
data/herculesstudio-1.5.0/HercConfiguration/Configuration.cpp:404:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char formatted[5];
data/herculesstudio-1.5.0/HercConfiguration/Configuration.cpp:406: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(formatted,"%4.4X",(value));
data/herculesstudio-1.5.0/HercConfiguration/Configuration.cpp:408:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(formatted,"0000");
data/herculesstudio-1.5.0/HercConfiguration/CtcProperties.cpp:427: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).
        int port = atoi(configLine.getToken(2).c_str());
data/herculesstudio-1.5.0/HercConfiguration/CtcProperties.cpp:431:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        port = atoi(configLine.getToken(4).c_str());
data/herculesstudio-1.5.0/HercConfiguration/CtcProperties.cpp:435: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 size = atoi(configLine.getToken(5).c_str());
data/herculesstudio-1.5.0/HercConfiguration/DasdProperties.cpp:242:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        ui.portSpinBox->setValue(atoi(vec[1].c_str()));
data/herculesstudio-1.5.0/HercConfiguration/DasdProperties.cpp:243:35:  [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).
        ui.devnoSpinBox->setValue(atoi(vec[2].c_str()));
data/herculesstudio-1.5.0/HercConfiguration/DevicesPane.cpp:181: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 ss[255];
data/herculesstudio-1.5.0/HercConfiguration/DevicesPane.cpp:503:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char formatted[5];
data/herculesstudio-1.5.0/HercConfiguration/DevicesPane.cpp:505: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(formatted,"%4.4X",(value));
data/herculesstudio-1.5.0/HercConfiguration/DevicesPane.cpp:507:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(formatted,"0000");
data/herculesstudio-1.5.0/HercConfiguration/DevicesPane.h:57:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char    DEV[3];
data/herculesstudio-1.5.0/HercConfiguration/DevicesPane.h:60:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char    devNo[4];
data/herculesstudio-1.5.0/HercConfiguration/DevicesPane.h:62:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char    devTypeN[4];
data/herculesstudio-1.5.0/HercConfiguration/DevicesPane.h:64: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    devType[4];
data/herculesstudio-1.5.0/HercConfiguration/DevicesPane.h:66: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    statusBytes[4];
data/herculesstudio-1.5.0/HercPrinter/PrintRunner.h:45: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 mBuff[2048];
data/herculesstudio-1.5.0/HercPrinter/PrintRunner.h:65: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 mBuff[MAX_LINE];
data/herculesstudio-1.5.0/HercPrinter/Stationery.cpp:89: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(fill, barsColors[index], 3*sizeof(int));
data/herculesstudio-1.5.0/HercPrinter/StationeryDialog.cpp:217: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 hexBuf[3];
data/herculesstudio-1.5.0/HercPrinter/StationeryDialog.cpp:220: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(hexBuf,"%2x", rgbSet[i]);
data/herculesstudio-1.5.0/HercStudio/LogWidget.cpp:140: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(mTimeStamp+8, " ", 2);
data/herculesstudio-1.5.0/HercStudio/LogWidget.cpp:161:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if (!file.open(QIODevice::Append | QIODevice::Text))
data/herculesstudio-1.5.0/HercStudio/LogWidget.h:61:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char  mTimeStamp[64];
data/herculesstudio-1.5.0/HercStudio/MainWindow.cpp:1277:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
data/herculesstudio-1.5.0/HercStudio/NamedPipe.cpp:99:23:  [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 * fstr = fopen(pidPath.c_str(),"r");
data/herculesstudio-1.5.0/HercStudio/NamedPipe.cpp:176:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE * fPid = fopen(pidPath.c_str(),"w");
data/herculesstudio-1.5.0/HercStudio/NamedPipe.cpp:195: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(mFifo0.c_str(),
data/herculesstudio-1.5.0/HercStudio/NamedPipe.cpp:206:28:  [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).
            mStdinOutput = fopen(mFifo0.c_str(),"w");
data/herculesstudio-1.5.0/HercStudio/NamedPipe.cpp:216:23:  [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).
            mStdout = fopen(mFifo1.c_str(),"w");
data/herculesstudio-1.5.0/HercStudio/NamedPipe.cpp:226:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		mStdoutInput->open(QIODevice::ReadOnly);
data/herculesstudio-1.5.0/HercStudio/NamedPipe.cpp:235:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        mStderr = fopen(mFifo2.c_str(),"w");
data/herculesstudio-1.5.0/HercStudio/NamedPipe.cpp:245:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		mStderrInput->open(QIODevice::ReadOnly);
data/herculesstudio-1.5.0/HercStudio/NamedPipe.cpp:255:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE * f = fopen(procPath.str().c_str(),"r");
data/herculesstudio-1.5.0/HercStudio/NamedPipe.cpp:257: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 buff[255];
data/herculesstudio-1.5.0/HercStudio/Preferences.cpp:771:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	file.open(QIODevice::ReadOnly);
data/herculesstudio-1.5.0/HercStudio/Preferences.cpp:775: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 line[PREF_LINE_LENGTH];
data/herculesstudio-1.5.0/HercStudio/Preferences.cpp:856:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	file.open(QIODevice::WriteOnly);
data/herculesstudio-1.5.0/HercStudio/Preferences.cpp:1103:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	file.open(QIODevice::ReadOnly);
data/herculesstudio-1.5.0/HercStudio/Preferences.cpp:1107: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 line[Preferences_1_2_0::PREF_LINE_LENGTH];
data/herculesstudio-1.5.0/HercStudio/Preferences.cpp:1155:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	file.open(QIODevice::WriteOnly);
data/herculesstudio-1.5.0/HercUtilities/HetInit.cpp:177: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 num[6];
data/herculesstudio-1.5.0/HercConfiguration/ConfigFile.cpp:375:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buff,from, len);
data/herculesstudio-1.5.0/HercConfiguration/ConfigFile.cpp:385:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(buff,mEditorIterator.text().toUtf8().data(),len-1);
data/herculesstudio-1.5.0/HercPrinter/PrintRunner.cpp:51:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            qint64 len = read(mBuffPos, 255);
data/herculesstudio-1.5.0/HercStudio/HelpAbout.cpp:37:6:  [1] (buffer) strlen:
  Does not handle 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(HERCSTUDIO_REVISION) < 16)
data/herculesstudio-1.5.0/HercStudio/HerculesExecutor.cpp:152: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).
	std::vector<char> buffer(strlen(format) + strlen(arg1) + 2);
data/herculesstudio-1.5.0/HercStudio/HerculesExecutor.cpp:152: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).
	std::vector<char> buffer(strlen(format) + strlen(arg1) + 2);
data/herculesstudio-1.5.0/HercStudio/HerculesExecutor.cpp:159: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).
	std::vector<char> buffer(strlen(format) + 64);
data/herculesstudio-1.5.0/HercStudio/HerculesExecutor.cpp:201: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).
	buffer.resize(strlen(format)+strlen(arg1)+2);
data/herculesstudio-1.5.0/HercStudio/HerculesExecutor.cpp:201: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).
	buffer.resize(strlen(format)+strlen(arg1)+2);
data/herculesstudio-1.5.0/HercStudio/HerculesExecutor.cpp:209: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).
	buffer.resize(strlen(format)+64);
data/herculesstudio-1.5.0/HercStudio/HerculesExecutor.cpp:228:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(buff, output.data(), (len>max? max : len));
data/herculesstudio-1.5.0/HercStudio/HerculesExecutor.cpp:254:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(buff, output.data(), (len>max? max : len));
data/herculesstudio-1.5.0/HercStudio/MainWindow.cpp:829:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(500000);
data/herculesstudio-1.5.0/HercStudio/MainWindow.cpp:860:2:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	usleep(100000);  // TODO32
data/herculesstudio-1.5.0/HercStudio/MainWindow.cpp:1226:2:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	usleep(500000);  // TODO32
data/herculesstudio-1.5.0/HercStudio/NamedPipe.cpp:137:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(0);
data/herculesstudio-1.5.0/HercStudio/Preferences.cpp:778:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(line) < 2)  // skip null/blank lines
data/herculesstudio-1.5.0/HercStudio/Preferences.cpp:838: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 (strncmp(line,keyword,strlen(keyword)) != 0)
data/herculesstudio-1.5.0/HercStudio/Preferences.cpp:845: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).
	char *p = line+strlen(keyword);
data/herculesstudio-1.5.0/HercStudio/Preferences.cpp:1110:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(line) < 2)  // skip null/blank lines
data/herculesstudio-1.5.0/HercStudio/Preferences.cpp:1135: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 (strncmp(line,keyword,strlen(keyword)) != 0)
data/herculesstudio-1.5.0/HercStudio/Preferences.cpp:1142: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).
	char *p = line+strlen(keyword);
data/herculesstudio-1.5.0/HercUtilities/HetInit.cpp:178:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(num,text().toUtf8().data(),6);

ANALYSIS SUMMARY:

Hits = 79
Lines analyzed = 24391 in approximately 0.59 seconds (41189 lines/second)
Physical Source Lines of Code (SLOC) = 17077
Hits@level = [0]   8 [1]  23 [2]  47 [3]   2 [4]   7 [5]   0
Hits@level+ = [0+]  87 [1+]  79 [2+]  56 [3+]   9 [4+]   7 [5+]   0
Hits/KSLOC@level+ = [0+] 5.09457 [1+] 4.62611 [2+] 3.27926 [3+] 0.527025 [4+] 0.409908 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.