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/morse-simulator-1.4/examples/clients/arm/pocolibs_lwr_client.cpp
Examining data/morse-simulator-1.4/examples/clients/atrv/agv_motion-1.0.cpp
Examining data/morse-simulator-1.4/examples/clients/atrv/atrv_destination-1.0.cpp
Examining data/morse-simulator-1.4/examples/clients/atrv/pocolibs_movement_client.cpp
Examining data/morse-simulator-1.4/examples/clients/atrv/pocolibs_platine_client.cpp
Examining data/morse-simulator-1.4/examples/clients/playerRessac/playerRessac.cpp
Examining data/morse-simulator-1.4/examples/clients/ressac/ressac_client.cpp
Examining data/morse-simulator-1.4/examples/clients/scene/scene_init-2.0.cpp
Examining data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/stereopixel.c
Examining data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/velodyne.c
Examining data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/viam.c
Examining data/morse-simulator-1.4/src/morse/sensors/EGM9615.h
Examining data/morse-simulator-1.4/src/morse/sensors/GeomagnetismHeader.h
Examining data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c
Examining data/morse-simulator-1.4/src/morse/sensors/magnetometer.c
Examining data/morse-simulator-1.4/src/morse/sensors/zbufferto3d.c
Examining data/morse-simulator-1.4/src/morse/sensors/zbuffertodepth.c

FINAL RESULTS:

data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:583: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((*MagneticModel)->ModelName, ModelName);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1308: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(model->ModelName, values[MODELNAME]);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1726:5:  [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.
    sscanf(c_str, "%lf%s", &epoch, MagneticModel->ModelName);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1795:5:  [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.
    sscanf(c_str, "%lf%s", &epoch, MagneticModel->ModelName);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1933:21:  [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(paramvalues[i], paramvalue);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:2328:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(tempstring, "%4d%4s", DMS[i], tempstring2);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:2329: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(DMSstring, tempstring);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:3773: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(TimedMagneticModel->ModelName, MagneticModel->ModelName);
data/morse-simulator-1.4/examples/clients/atrv/agv_motion-1.0.cpp:69: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).
  toUGVPort.open((local_port_prefix + "/motion/out").c_str());
data/morse-simulator-1.4/examples/clients/atrv/agv_motion-1.0.cpp:70: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).
  fromUGVGPSPort.open((local_port_prefix + "/gps/in").c_str());
data/morse-simulator-1.4/examples/clients/atrv/atrv_destination-1.0.cpp:77: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).
  toATRVPort.open((local_port_prefix + "/out/destination").c_str());
data/morse-simulator-1.4/examples/clients/atrv/atrv_destination-1.0.cpp:78:19:  [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).
  fromATRVGPSPort.open((local_port_prefix + "/in/gps").c_str());
data/morse-simulator-1.4/examples/clients/playerRessac/playerRessac.cpp:63:24:  [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).
  toRessacPositionPort.open(("/" + ressac_port + "/position").c_str());
data/morse-simulator-1.4/examples/clients/playerRessac/playerRessac.cpp:64:24:  [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).
  toTargetPositionPort.open(("/" + target_port + "/position").c_str());
data/morse-simulator-1.4/examples/clients/playerRessac/playerRessac.cpp:78:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  file.open("data_sync_vol4.txt", ifstream::in);
data/morse-simulator-1.4/examples/clients/ressac/ressac_client.cpp:53:16:  [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).
  toRessacPort.open(("/" + local_port + "/out").c_str());
data/morse-simulator-1.4/examples/clients/ressac/ressac_client.cpp:54:21:  [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).
  fromRessacGPSPort.open(("/" + local_port + "/in/gps").c_str());
data/morse-simulator-1.4/examples/clients/ressac/ressac_client.cpp:55: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).
  fromRessacAltitudePort.open(("/" + local_port + "/in/altitude").c_str());
data/morse-simulator-1.4/examples/clients/ressac/ressac_client.cpp:56: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).
  fromRessacVelocityPort.open(("/" + local_port + "/in/acc/vxvyvz").c_str());
data/morse-simulator-1.4/examples/clients/ressac/ressac_client.cpp:57: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).
  fromRessacVelocityPort.open(("/" + local_port + "/in/acc/axayaz").c_str());
data/morse-simulator-1.4/examples/clients/scene/scene_init-2.0.cpp:67:19:  [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).
	LocalAdminInPort.open(local_admin_in_port.c_str());
data/morse-simulator-1.4/examples/clients/scene/scene_init-2.0.cpp:68: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).
	LocalAdminOutPort.open(local_admin_out_port.c_str());
data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/stereopixel.c:49: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 buf[1024];
data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/stereopixel.c:111: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( &im3d->imageLeftPos.mainToBase.euler, 
data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/stereopixel.c:118: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(&im3d->imageRightPos, &im3d->imageLeftPos, sizeof(POM_SENSOR_POS));
data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/velodyne.c:57: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 buf[1024];
data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/velodyne.c:120: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( &im3d->position.mainToBase.euler, 
data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/velodyne.c:244: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(p_im3d, im3d, sizeof(*im3d));
data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/viam.c:82: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(local_calibration->intrinsic, identity, sizeof(identity));
data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/viam.c:83: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(local_calibration->rectification, identity, sizeof(identity));
data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/viam.c:84: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(local_calibration->rotation, identity, sizeof(identity));
data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/viam.c:91: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(local_calibration->intrirect, local_calibration->intrinsic, sizeof(identity));
data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/viam.c:166: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 buf[1024];
data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/viam.c:227: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( &pos->mainToBase.euler, &pos->mainToOrigin.euler, sizeof(POM_EULER));
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismHeader.h:95: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 ModelName[32];
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismHeader.h:192: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 Longitude[40];
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismHeader.h:193: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 Latitude[40];
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:303: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).
        fileout = fopen(OutputFile, "w");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:538: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 line[MAXLINELENGTH], ModelName[] = "Enhanced Magnetic Model";/*Model Name must be no longer than 31 characters*/
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:541: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).
    MODELFILE = fopen(filename, "r");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:555: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).
    MODELFILE = fopen(filenameSV, "r");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:590: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 line[MAXLINELENGTH];
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:593: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).
    MODELFILE = fopen(filename, "r");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:927: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 DeclString[100];
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:928: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 InclString[100];
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1030:13:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            strcpy(Error, "\nError: Input contains an illegal character, legal characters for Degree, Minute, Second format are:\n '0-9' ',' '-' '[space]' '[Enter]'\n");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1048: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(Error, "\nError: Not enough numbers read for Degrees, Minutes, Seconds format\n or they were incorrectly formatted\n The legal format is DD,MM,SS or DD MM SS\n");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1054: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(Error, "\nError: Degree input is outside legal range\n The legal range is from -180 to 360\n");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1061: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(Error, "\nError: Minute input is outside legal range\n The legal minute range is from 0 to 60\n");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1068: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(Error, "\nError: Second input is outside legal range\n The legal second range is from 0 to 60\n");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1088: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 ans[20];
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1317:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    model->nMax = atoi(values[INTSTATICDEG]);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1318: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).
    model->nMaxSecVar = atoi(values[INTSECVARDEG]);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1577: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 Datestring[11];
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1581: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(Datestring, "%d/%d/%d", Date.Month, Date.Day, Date.Year);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1582:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    OUT = fopen(filename, "w");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1603: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 Datestring[11];
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1607: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(Datestring, "%d/%d/%d", Date.Month, Date.Day, Date.Year);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1608:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    OUT = fopen(filename, "w");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1622:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    OUT = fopen(filenameSV, "w");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1642:14:  [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).
	SHDF_file = fopen(filename, "w");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1710: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 c_str[81], c_new[5]; /*these strings are used to read a line from coefficient file*/
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1713: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).
    MAG_COF_File = fopen(filename, "r");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1780: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 c_str[81], c_str2[81]; /* these strings are used to read a line from coefficient file */
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1783: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).
    MAG_COF_File = fopen(filename, "r");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1784: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).
    MAG_COFSV_File = fopen(filenameSV, "r");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1854: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 paramkeys[NOOFPARAMS][MAXLINELENGTH] = {
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1872: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 paramvalues[NOOFPARAMS][MAXLINELENGTH];
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1875: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 paramvalue[MAXLINELENGTH];
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1893:14:  [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).
    stream = fopen(filename, READONLYMODE);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1936: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).
                        tempint = atoi(paramvalues[i]);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:2272: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(Error, "\nError: The Month entered is invalid, valid months are '1 to 12'\n");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:2278: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(Error, "\nError: The day entered is invalid\n");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:2304: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 tempstring[32] = "";
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:2305: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 tempstring2[32] = "";
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:2314:17:  [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(tempstring2, "Deg");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:2317:17:  [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(tempstring2, "Min");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:2320:17:  [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(tempstring2, "Sec");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:3982: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 DeclString[100];
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:3983: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 InclString[100];
data/morse-simulator-1.4/examples/clients/atrv/agv_motion-1.0.cpp:96:37:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    incomingBottle = fromUGVGPSPort.read(false);
data/morse-simulator-1.4/examples/clients/atrv/atrv_destination-1.0.cpp:105:38:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    incomingBottle = fromATRVGPSPort.read(false);
data/morse-simulator-1.4/examples/clients/playerRessac/playerRessac.cpp:114:7:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      usleep((nextTime-prevTime)*1000.0);
data/morse-simulator-1.4/examples/clients/ressac/ressac_client.cpp:78:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    incomingBottle = fromRessacGPSPort.read(false);
data/morse-simulator-1.4/examples/clients/ressac/ressac_client.cpp:90:45:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    incomingBottle = fromRessacVelocityPort.read(false);
data/morse-simulator-1.4/examples/clients/ressac/ressac_client.cpp:102:49:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    incomingBottle = fromRessacAccelerationPort.read(false);
data/morse-simulator-1.4/examples/clients/ressac/ressac_client.cpp:114:45:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    incomingBottle = fromRessacAltitudePort.read(false);
data/morse-simulator-1.4/examples/clients/scene/scene_init-2.0.cpp:91:37:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		incomingBottle = LocalAdminInPort.read(false);
data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/viam.c:106:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy ( header->name.id, init->name, VIAM_ID_MAX);
data/morse-simulator-1.4/src/morse/middleware/pocolibs/sensors/viam.c:180:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy ( bank->name.id, bank_name, VIAM_ID_MAX);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:726:9:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        getchar();
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:802:9:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        getchar();
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1024: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).
    n = (int) strlen(input);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1089:5:  [1] (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 character.
    strcpy(ans, "");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1278:5:  [1] (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 character.
    strcpy(MagneticModel->ModelName, "");
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1904: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(MAG_Trim(line)) == 0)
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1927: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).
                paramkeylength = strlen(paramkeys[i]);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1930: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).
                    paramvaluelength = strlen(line) - paramkeylength;
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:1931:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(paramvalue, line + paramkeylength, paramvaluelength);
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:2002: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).
    end = str + strlen(str) - 1;
data/morse-simulator-1.4/src/morse/sensors/GeomagnetismLibrary.c:2306:5:  [1] (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 character.
    strcpy(DMSstring, "");

ANALYSIS SUMMARY:

Hits = 101
Lines analyzed = 111539 in approximately 14.06 seconds (7935 lines/second)
Physical Source Lines of Code (SLOC) = 109100
Hits@level = [0] 330 [1]  21 [2]  72 [3]   0 [4]   8 [5]   0
Hits@level+ = [0+] 431 [1+] 101 [2+]  80 [3+]   8 [4+]   8 [5+]   0
Hits/KSLOC@level+ = [0+] 3.9505 [1+] 0.925756 [2+] 0.733272 [3+] 0.0733272 [4+] 0.0733272 [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.