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/xserver-xorg-video-nouveau-1.0.16/src/nv04_exa.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv50_xv.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_copy85b5.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_local.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/vl_hwmc.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv_type.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nvc0_accel.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv30_exa.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv50_accel.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv04_accel.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv40_xv_tex.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv40_exa.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nvc0_accel.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv_driver.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_copya0b5.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_copy.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv04_xv_blit.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv_const.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv50_accel.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv_accel_common.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nvc0_xv.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv_proto.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_sync.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv_include.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv50_exa.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv_rop.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_sync.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/hwdefs/nv50_defs.xml.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/hwdefs/gm107_texture.xml.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/hwdefs/nv01_2d.xml.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/hwdefs/nvc0_m2mf.xml.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/hwdefs/nv_3ddefs.xml.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/hwdefs/nv_m2mf.xml.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/hwdefs/nv_object.xml.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/hwdefs/nv10_3d.xml.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/hwdefs/nv30-40_3d.xml.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/hwdefs/nv50_3d.xml.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/hwdefs/nv50_texture.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/hwdefs/nv50_2d.xml.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/hwdefs/nvc0_3d.xml.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv30_xv_tex.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_dri2.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv_dma.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv04_xv_ovl.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_wfb.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_present.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/compat-api.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_exa.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_xv.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv10_xv_ovl.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nvc0_exa.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_copy90b5.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_copy.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/drmmode_display.c
Examining data/xserver-xorg-video-nouveau-1.0.16/src/vl_hwmc.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_present.h
Examining data/xserver-xorg-video-nouveau-1.0.16/src/nv_shadow.c

FINAL RESULTS:

data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_local.h:151:73:  [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.
PUSH_REFN(struct nouveau_pushbuf *push, struct nouveau_bo *bo, uint32_t access)
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_local.h:153: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.
	nouveau_bufctx_refn(BUFCTX(push), 0, bo, access);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_local.h:158:54:  [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.
	   struct nouveau_bo *bo, uint32_t offset, uint32_t access)
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_local.h:161:20:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
			    bo, offset, access | NOUVEAU_BO_LOW, 0, 0);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_local.h:167:37:  [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.
	   struct nouveau_bo *bo, uint32_t access, uint32_t vor, uint32_t tor)
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_local.h:170:15:  [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.
			    bo, 0, access | NOUVEAU_BO_OR, vor, tor);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_local.h:179:52:  [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.
	   struct nouveau_bo *bo, uint32_t data, uint32_t access,
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_local.h:183:18:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
			    bo, data, access | NOUVEAU_BO_OR, vor, tor);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_local.h:192:51:  [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.
	  struct nouveau_bo *bo, uint32_t data, uint32_t access,
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_local.h:196:18:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
			    bo, data, access | NOUVEAU_BO_OR, vor, tor);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_local.h:197:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access & NOUVEAU_BO_LOW)
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_local.h:199:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access & NOUVEAU_BO_OR) {
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:209:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(out, "%s  ", reason);
data/xserver-xorg-video-nouveau-1.0.16/src/drmmode_display.c:1160:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(&atom, value->data, 4);
data/xserver-xorg-video-nouveau-1.0.16/src/drmmode_display.c:1278: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 s1[20];
data/xserver-xorg-video-nouveau-1.0.16/src/drmmode_display.c:1325: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 conn_id[5];
data/xserver-xorg-video-nouveau-1.0.16/src/drmmode_display.c:1343: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(conn_id, blob_data + 4, len);
data/xserver-xorg-video-nouveau-1.0.16/src/drmmode_display.c:1392: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 name[32];
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_dri2.c:973:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	const char *drivernames[2][2] = {
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_dri2.c:1047: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).
	fd = open(pNv->render_node, O_RDWR | O_CLOEXEC);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_dri2.c:1050: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).
		fd = open(pNv->render_node, O_RDWR);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_exa.c:33: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(dst, src, line_len*height);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_exa.c:36:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(dst, src, line_len);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_exa.c:263:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			goto memcpy;
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_exa.c:270:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			goto memcpy;
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_exa.c:274:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(dst, tmp->map + tmp_offset, dst_pitch * lines);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_exa.c:279:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(dst, src, tmp_pitch);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_exa.c:291:1:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
memcpy:
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_exa.c:348:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			goto memcpy;
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_exa.c:351:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(tmp->map + tmp_offset, src, src_pitch * lines);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_exa.c:356: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(dst, src, tmp_pitch);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_exa.c:366:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			goto memcpy;
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_exa.c:376:1:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
memcpy:
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_local.h:121: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(push->cur, data, size * 4);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_wfb.c:47: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(&bits, src, size);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_wfb.c:54: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(dst, &value, size);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_wfb.c:89: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(&bits, (void *)wfb->base + offset, size);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_wfb.c:121: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((void *)wfb->base + offset, &value, size);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_xv.c:1214:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(tdst, tbuf, line_len);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_xv.c:1227: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(dst, buf, line_len);
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_xv.c:2205: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(newAdaptors, adaptors, num_adaptors *
data/xserver-xorg-video-nouveau-1.0.16/src/nouveau_xv.c:2246:52:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			adaptorsXvMC[0] = vlCreateAdaptorXvMC(pScreen, (char *)textureAdaptor[0]->name);
data/xserver-xorg-video-nouveau-1.0.16/src/nv04_exa.c:365:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char padding[8];
data/xserver-xorg-video-nouveau-1.0.16/src/nv04_exa.c:367:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(padding, src + (id - aux) * 4, padbytes);
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:206: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 out2[4096];
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:214: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(out, "PictOpClear ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:217: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(out, "PictOpSrc ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:220: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(out, "PictOpDst ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:223: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(out, "PictOpOver ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:226: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(out, "PictOpOutReverse ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:229: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(out, "PictOpAdd ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:232: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(out, "PictOp%d ", op);
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:238: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(out, "A8R8G8B8 ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:241: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(out, "X8R8G8B8 ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:244: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(out, "X8B8G8R8 ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:247: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(out, "R5G6B5 ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:250: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(out, "A8 ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:253: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(out, "A1 ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:256: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(out, "%x ", src->format);
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:260:2:  [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(out, "(%dx%d) ", src->pDrawable->width,
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:263:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(out, "R ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:264:2:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	strcat(out, "-> ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:269: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(out, "A8R8G8B8 ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:272: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(out, "X8R8G8B8  ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:275: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(out, "X8B8G8R8  ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:278: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(out, "R5G6B5 ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:281: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(out, "A8  ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:284: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(out, "A1  ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:287: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(out, "%x  ", dst->format);
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:291:2:  [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(out, "(%dx%d) ", dst->pDrawable->width,
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:294:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(out, "R ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:298: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(out, "& NONE");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:302:4:  [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(out, "& A8R8G8B8 ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:305:4:  [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(out, "& X8R8G8B8  ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:308:4:  [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(out, "& X8B8G8R8  ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:311:4:  [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(out, "& A8  ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:314:4:  [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(out, "& A1  ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:317:4:  [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(out, "& %x  ", mask->format);
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:321: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(out, "(%dx%d) ", mask->pDrawable->width,
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:324:4:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
			strcat(out, "R ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:326:4:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
			strcat(out, "C ");
data/xserver-xorg-video-nouveau-1.0.16/src/nv_driver.c:337: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).
		fd = open(path, O_RDWR | O_CLOEXEC);
data/xserver-xorg-video-nouveau-1.0.16/src/nv_driver.c:914:2:  [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((char *)pScrn->chipset, "NVIDIA NV%02X", dev->chipset);
data/xserver-xorg-video-nouveau-1.0.16/src/nv_driver.c:1033: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(pNv->Options, NVOptions, sizeof(NVOptions));
data/xserver-xorg-video-nouveau-1.0.16/src/nv_shadow.c:55: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(dst, src, width);
data/xserver-xorg-video-nouveau-1.0.16/src/drmmode_display.c:319:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(kmode->name, mode->name, DRM_DISPLAY_MODE_LEN);
data/xserver-xorg-video-nouveau-1.0.16/src/drmmode_display.c:1073:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			p->atoms[0] = MakeAtom(drmmode_prop->name, strlen(drmmode_prop->name), TRUE);
data/xserver-xorg-video-nouveau-1.0.16/src/drmmode_display.c:1096:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			p->atoms[0] = MakeAtom(drmmode_prop->name, strlen(drmmode_prop->name), TRUE);
data/xserver-xorg-video-nouveau-1.0.16/src/drmmode_display.c:1099:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				p->atoms[j] = MakeAtom(e->name, strlen(e->name), TRUE);
data/xserver-xorg-video-nouveau-1.0.16/src/drmmode_display.c:1485:80:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		output->randr_output = RROutputCreate(xf86ScrnToScreen(pScrn), output->name, strlen(output->name), output);
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:210:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out += strlen(out);
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:234:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out += strlen(out);
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:258:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out += strlen(out);
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:265:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out += strlen(out);
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:289:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out += strlen(out);
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:295:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out += strlen(out);
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:319:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		out += strlen(out);
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:327:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		out += strlen(out);
data/xserver-xorg-video-nouveau-1.0.16/src/nv10_exa.c:329:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat(out, "\n");
data/xserver-xorg-video-nouveau-1.0.16/src/nv_driver.c:214:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        maxLen = max(maxLen, strlen(family->name));
data/xserver-xorg-video-nouveau-1.0.16/src/nv_driver.c:222:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t len = strlen(family->name);

ANALYSIS SUMMARY:

Hits = 101
Lines analyzed = 31119 in approximately 0.70 seconds (44488 lines/second)
Physical Source Lines of Code (SLOC) = 23656
Hits@level = [0]   4 [1]  16 [2]  72 [3]   0 [4]  13 [5]   0
Hits@level+ = [0+] 105 [1+] 101 [2+]  85 [3+]  13 [4+]  13 [5+]   0
Hits/KSLOC@level+ = [0+] 4.43862 [1+] 4.26953 [2+] 3.59317 [3+] 0.549543 [4+] 0.549543 [5+]   0
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.