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/java3d-1.5.2+dfsg/j3d-core/release-info/fcs-1_3_1/README.release.cpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dUtil.hpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dDisplayList.hpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dVertexBuffer.hpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/Canvas3D.cpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dVertexBuffer.cpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/Lights.cpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dDeviceInfo.hpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/NativeConfigTemplate3D.cpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/GraphicsContext3D.cpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dDriverInfo.cpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dDeviceInfo.cpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/GeometryArrayRetained.cpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dCtx.cpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dUtil.cpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/StdAfx.h
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dDriverInfo.hpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dDisplayList.cpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/Attributes.cpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dCtx.hpp
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/Canvas3D.c
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/CgWrapper.c
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/Attributes.c
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/j3dsys.h
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/Lights.c
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/GeometryArrayRetained.c
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/CgWrapper.h
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/GraphicsContext3D.c
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/CgShaderProgram.c
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/glext.h
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/GLSLShaderProgram.c
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/panoramiXext.h
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/GLSLInfo.h
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/NativeConfigTemplate3D.c
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/NativeScreenInfo.c
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/DrawingSurfaceObjectAWT.c
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/OglCheck.c
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/MasterControl.c
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/wglext.h
Examining data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/gldefs.h

FINAL RESULTS:

data/java3d-1.5.2+dfsg/j3d-core/release-info/fcs-1_3_1/README.release.cpp:893:27:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
4667088  sas applications gets VerifyError running with 64-bit JVM
data/java3d-1.5.2+dfsg/j3d-core/release-info/fcs-1_3_1/README.release.cpp:79:14:  [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.
  the window system when running a Java 3D program with more than
data/java3d-1.5.2+dfsg/j3d-core/release-info/fcs-1_3_1/README.release.cpp:815:38:  [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.
  the Java Sound API.  All low-level access to the platforms audio device
data/java3d-1.5.2+dfsg/j3d-core/release-info/fcs-1_3_1/README.release.cpp:860:43:  [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.
4780878 ConfiguredUniverse needs a way to access multiple behaviors
data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dCtx.cpp:973:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(message, "%s - %s", s, DXGetErrorString9(hr));
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/CgShaderProgram.c:258:2:  [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(errMsg, errString);
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/CgShaderProgram.c:259:2:  [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(errMsg, delimeter1);
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/CgShaderProgram.c:260:2:  [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(errMsg, listing);
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/MasterControl.c:39:22:  [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.
#define DPRINT(args) fprintf args
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/gldefs.h:172:2:  [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.
	fprintf(stderr,							\
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/glext.h:3774:71:  [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.
typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/glext.h:4393:74:  [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.
typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dDriverInfo.cpp:408:26:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
    HINSTANCE hD3D9DLL = LoadLibrary( "D3D9.DLL" );
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/CgShaderProgram.c:173:42:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
        cgWrapperInfo->cgLibraryHandle = LoadLibrary(libnameStr);
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/NativeConfigTemplate3D.c:512:6:  [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.
	if (getenv("J3D_NO_STEREO") != NULL) {
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/NativeConfigTemplate3D.c:1689:13:  [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.
        if (getenv("J3D_NO_STEREO") != NULL) {
data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dCtx.cpp:439:2:  [2] (buffer) CopyMemory:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	CopyMemory(&screenRect, &savedClientRect, sizeof (RECT));
data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dCtx.cpp:972: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 message[400];
data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dCtx.cpp:1249:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		    requiredDriverID = atoi(chars);
data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dCtx.cpp:1319:22:  [2] (integer) atol:
  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).
		    long vbLimit = atol(chars);
data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dDeviceInfo.hpp: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 deviceName[40];         // One of above name
data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dDisplayList.cpp:289:2:  [2] (buffer) CopyMemory:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	CopyMemory(bdst, bsrc, len);
data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dDriverInfo.cpp:202: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 version[ 128 ];
data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dDriverInfo.cpp:203: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( version, "%x.%x.%x.%x", HIWORD( identifier->DriverVersion.HighPart ),
data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dDriverInfo.cpp:263: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(pDevice->deviceName, "Transform & Light Hardware Rasterizer");
data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dDriverInfo.cpp:265: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(pDevice->deviceName, "Hardware Rasterizer");
data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dDriverInfo.cpp:267: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(pDevice->deviceName, "Reference Rasterizer");
data/java3d-1.5.2+dfsg/j3d-core/src/native/d3d/D3dVertexBuffer.cpp:215:6:  [2] (buffer) CopyMemory:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    CopyMemory(p, numVertices, numVerticesLen*sizeof(USHORT));
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/Canvas3D.c:111:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	numbers[0] = atoi(majorNumStr);
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/Canvas3D.c:113:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	numbers[1] = atoi(minorNumStr);
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/OglCheck.c:217:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	numbers[0] = atoi(majorNumStr);
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/OglCheck.c:219:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	numbers[1] = atoi(minorNumStr);
data/java3d-1.5.2+dfsg/j3d-core/release-info/fcs-1_3_1/README.release.cpp:803:38:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
 only partially implemented.  Please read the README.release document in
data/java3d-1.5.2+dfsg/j3d-core/release-info/fcs-1_3_1/README.release.cpp:827:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  Please read the README.release document in programs/examples/Sound.
data/java3d-1.5.2+dfsg/j3d-core/release-info/fcs-1_3_1/README.release.cpp:864:69:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
4822988 SceneGraphIO throws NullPointerException when Morph Node is read
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/Canvas3D.c:142: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).
	terminator = where + strlen(extension);
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/CgShaderProgram.c:251: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).
	    malloc(strlen(errString) + strlen(delimeter1) + strlen(listing) + 1);
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/CgShaderProgram.c:251: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).
	    malloc(strlen(errString) + strlen(delimeter1) + strlen(listing) + 1);
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/CgShaderProgram.c:251: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).
	    malloc(strlen(errString) + strlen(delimeter1) + strlen(listing) + 1);
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/GLSLShaderProgram.c:776: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).
        len = (int) strlen(name);
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/NativeConfigTemplate3D.c:729: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).
	const char *q = p + strlen(extension_string);
data/java3d-1.5.2+dfsg/j3d-core/src/native/ogl/OglCheck.c:178: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).
	const char *q = p + strlen(extension_string);

ANALYSIS SUMMARY:

Hits = 42
Lines analyzed = 56294 in approximately 1.56 seconds (36143 lines/second)
Physical Source Lines of Code (SLOC) = 44504
Hits@level = [0] 492 [1]  10 [2]  16 [3]   4 [4]  11 [5]   1
Hits@level+ = [0+] 534 [1+]  42 [2+]  32 [3+]  16 [4+]  12 [5+]   1
Hits/KSLOC@level+ = [0+] 11.9989 [1+] 0.943735 [2+] 0.719036 [3+] 0.359518 [4+] 0.269639 [5+] 0.0224699
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.