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/pixman-0.36.0/demos/trap-test.c Examining data/pixman-0.36.0/demos/clip-test.c Examining data/pixman-0.36.0/demos/clip-in.c Examining data/pixman-0.36.0/demos/conical-test.c Examining data/pixman-0.36.0/demos/srgb-test.c Examining data/pixman-0.36.0/demos/tri-test.c Examining data/pixman-0.36.0/demos/composite-test.c Examining data/pixman-0.36.0/demos/screen-test.c Examining data/pixman-0.36.0/demos/convolution-test.c Examining data/pixman-0.36.0/demos/gtk-utils.c Examining data/pixman-0.36.0/demos/gradient-test.c Examining data/pixman-0.36.0/demos/srgb-trap-test.c Examining data/pixman-0.36.0/demos/scale.c Examining data/pixman-0.36.0/demos/radial-test.c Examining data/pixman-0.36.0/demos/alpha-test.c Examining data/pixman-0.36.0/demos/checkerboard.c Examining data/pixman-0.36.0/demos/linear-gradient.c Examining data/pixman-0.36.0/demos/quad2quad.c Examining data/pixman-0.36.0/demos/parrot.c Examining data/pixman-0.36.0/demos/gtk-utils.h Examining data/pixman-0.36.0/test/thread-test.c Examining data/pixman-0.36.0/test/check-formats.c Examining data/pixman-0.36.0/test/pixel-test.c Examining data/pixman-0.36.0/test/glyph-test.c Examining data/pixman-0.36.0/test/utils.h Examining data/pixman-0.36.0/test/cover-test.c Examining data/pixman-0.36.0/test/scaling-test.c Examining data/pixman-0.36.0/test/matrix-test.c Examining data/pixman-0.36.0/test/alphamap.c Examining data/pixman-0.36.0/test/fence-image-self-test.c Examining data/pixman-0.36.0/test/scaling-crash-test.c Examining data/pixman-0.36.0/test/trap-crasher.c Examining data/pixman-0.36.0/test/region-test.c Examining data/pixman-0.36.0/test/affine-test.c Examining data/pixman-0.36.0/test/region-translate-test.c Examining data/pixman-0.36.0/test/radial-invalid.c Examining data/pixman-0.36.0/test/utils.c Examining data/pixman-0.36.0/test/a1-trap-test.c Examining data/pixman-0.36.0/test/composite-traps-test.c Examining data/pixman-0.36.0/test/radial-perf-test.c Examining data/pixman-0.36.0/test/composite.c Examining data/pixman-0.36.0/test/affine-bench.c Examining data/pixman-0.36.0/test/oob-test.c Examining data/pixman-0.36.0/test/blitters-test.c Examining data/pixman-0.36.0/test/rotate-test.c Examining data/pixman-0.36.0/test/scaling-bench.c Examining data/pixman-0.36.0/test/tolerance-test.c Examining data/pixman-0.36.0/test/stress-test.c Examining data/pixman-0.36.0/test/combiner-test.c Examining data/pixman-0.36.0/test/solid-test.c Examining data/pixman-0.36.0/test/utils-prng.c Examining data/pixman-0.36.0/test/utils-prng.h Examining data/pixman-0.36.0/test/gradient-crash-test.c Examining data/pixman-0.36.0/test/filter-reduction-test.c Examining data/pixman-0.36.0/test/fetch-test.c Examining data/pixman-0.36.0/test/region-contains-test.c Examining data/pixman-0.36.0/test/lowlevel-blt-bench.c Examining data/pixman-0.36.0/test/scaling-helpers-test.c Examining data/pixman-0.36.0/test/pdf-op-test.c Examining data/pixman-0.36.0/test/infinite-loop.c Examining data/pixman-0.36.0/test/alpha-loop.c Examining data/pixman-0.36.0/test/prng-test.c Examining data/pixman-0.36.0/pixman/loongson-mmintrin.h Examining data/pixman-0.36.0/pixman/pixman-combine32.c Examining data/pixman-0.36.0/pixman/pixman-region.c Examining data/pixman-0.36.0/pixman/pixman-gradient-walker.c Examining data/pixman-0.36.0/pixman/pixman-arm-neon.c Examining data/pixman-0.36.0/pixman/pixman-arm-simd-asm.h Examining data/pixman-0.36.0/pixman/pixman-mips-dspr2-asm.h Examining data/pixman-0.36.0/pixman/pixman-solid-fill.c Examining data/pixman-0.36.0/pixman/pixman-compiler.h Examining data/pixman-0.36.0/pixman/pixman-arm-neon-asm.h Examining data/pixman-0.36.0/pixman/pixman.h Examining data/pixman-0.36.0/pixman/pixman-noop.c Examining data/pixman-0.36.0/pixman/pixman-implementation.c Examining data/pixman-0.36.0/pixman/pixman-mmx.c Examining data/pixman-0.36.0/pixman/pixman-ssse3.c Examining data/pixman-0.36.0/pixman/pixman-trap.c Examining data/pixman-0.36.0/pixman/pixman-arm.c Examining data/pixman-0.36.0/pixman/pixman-matrix.c Examining data/pixman-0.36.0/pixman/pixman-version.h Examining data/pixman-0.36.0/pixman/pixman-inlines.h Examining data/pixman-0.36.0/pixman/pixman-combine-float.c Examining data/pixman-0.36.0/pixman/pixman-access.c Examining data/pixman-0.36.0/pixman/pixman-edge-imp.h Examining data/pixman-0.36.0/pixman/pixman-region32.c Examining data/pixman-0.36.0/pixman/pixman-edge-accessors.c Examining data/pixman-0.36.0/pixman/pixman-image.c Examining data/pixman-0.36.0/pixman/pixman-conical-gradient.c Examining data/pixman-0.36.0/pixman/pixman.c Examining data/pixman-0.36.0/pixman/pixman-glyph.c Examining data/pixman-0.36.0/pixman/pixman-general.c Examining data/pixman-0.36.0/pixman/pixman-sse2.c Examining data/pixman-0.36.0/pixman/pixman-bits-image.c Examining data/pixman-0.36.0/pixman/pixman-mips.c Examining data/pixman-0.36.0/pixman/pixman-mips-dspr2.c Examining data/pixman-0.36.0/pixman/pixman-x86.c Examining data/pixman-0.36.0/pixman/pixman-access-accessors.c Examining data/pixman-0.36.0/pixman/pixman-private.h Examining data/pixman-0.36.0/pixman/pixman-arm-asm.h Examining data/pixman-0.36.0/pixman/pixman-utils.c Examining data/pixman-0.36.0/pixman/pixman-mips-dspr2.h Examining data/pixman-0.36.0/pixman/pixman-vmx.c Examining data/pixman-0.36.0/pixman/pixman-linear-gradient.c Examining data/pixman-0.36.0/pixman/pixman-radial-gradient.c Examining data/pixman-0.36.0/pixman/pixman-fast-path.c Examining data/pixman-0.36.0/pixman/pixman-ppc.c Examining data/pixman-0.36.0/pixman/pixman-combine32.h Examining data/pixman-0.36.0/pixman/pixman-arm-simd.c Examining data/pixman-0.36.0/pixman/pixman-accessor.h Examining data/pixman-0.36.0/pixman/pixman-arm-common.h Examining data/pixman-0.36.0/pixman/pixman-region16.c Examining data/pixman-0.36.0/pixman/pixman-timer.c Examining data/pixman-0.36.0/pixman/pixman-edge.c Examining data/pixman-0.36.0/pixman/pixman-filter.c FINAL RESULTS: data/pixman-0.36.0/test/composite.c:204:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "%s, %dx%d%s", data/pixman-0.36.0/test/fence-image-self-test.c:71:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf (stderr, fmt, ap); data/pixman-0.36.0/test/pixel-test.c:2830:1: [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. access (pixman_image_t *image, int x, int y) data/pixman-0.36.0/test/pixel-test.c:2916:26: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. uint32_t computed = access (dest, i, j); data/pixman-0.36.0/test/tolerance-test.c:123:1: [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. access (pixman_image_t *image, int x, int y, uint32_t *pixel) data/pixman-0.36.0/test/tolerance-test.c:156:10: [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 (image, x, y, pixel)) data/pixman-0.36.0/test/tolerance-test.c:197:13: [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. access (dest, i, j, &dest_pixel); data/pixman-0.36.0/test/utils.h:10:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/pixman-0.36.0/test/utils.h:10:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/pixman-0.36.0/pixman/pixman-implementation.c:357:16: [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 ((env = getenv ("PIXMAN_DISABLE"))) data/pixman-0.36.0/test/composite.c:506:9: [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 ("PIXMAN_RANDOMIZE_TESTS")) data/pixman-0.36.0/test/cover-test.c:442: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. exact = getenv ("EXACT") != NULL; data/pixman-0.36.0/test/fence-image-self-test.c:214:9: [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 ("VERBOSE") != NULL) data/pixman-0.36.0/test/lowlevel-blt-bench.c:248:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand (0); data/pixman-0.36.0/test/lowlevel-blt-bench.c:283:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand (0); data/pixman-0.36.0/test/lowlevel-blt-bench.c:324:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand (0); data/pixman-0.36.0/test/lowlevel-blt-bench.c:359:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand (0); data/pixman-0.36.0/test/stress-test.c:1015:9: [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 ("VERBOSE") != NULL) data/pixman-0.36.0/test/stress-test.c:1056:9: [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 ("PIXMAN_RANDOMIZE_TESTS")) data/pixman-0.36.0/test/utils.c:862: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. int verbose = getenv ("VERBOSE") != NULL; data/pixman-0.36.0/demos/scale.c:126: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 name [20]; data/pixman-0.36.0/pixman/pixman-arm.c:143:10: [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 ("/proc/self/auxv", O_RDONLY); data/pixman-0.36.0/pixman/pixman-combine32.c:176: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 (dest, src, width * sizeof (uint32_t)); data/pixman-0.36.0/pixman/pixman-fast-path.c:1178: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, src, n_bytes); data/pixman-0.36.0/pixman/pixman-image.c:101: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 (gradient->stops, stops, n_stops * sizeof (pixman_gradient_stop_t)); data/pixman-0.36.0/pixman/pixman-image.c:665: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 (common->transform, transform, sizeof(pixman_transform_t)); data/pixman-0.36.0/pixman/pixman-image.c:719: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 (new_params, data/pixman-0.36.0/pixman/pixman-mips.c:44: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 cpuinfo_line[256]; data/pixman-0.36.0/pixman/pixman-mips.c:47: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). if ((f = fopen (file_name, "r")) == NULL) data/pixman-0.36.0/pixman/pixman-ppc.c:92:10: [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 ("/proc/self/auxv", O_RDONLY); data/pixman-0.36.0/pixman/pixman-region.c:1715:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (rit, ri, num_ri * sizeof (region_info_t)); data/pixman-0.36.0/pixman/pixman-region.c:2509: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 (rects, boxes, sizeof(box_type_t) * count); data/pixman-0.36.0/pixman/pixman-x86.c:179: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 vendor[13]; data/pixman-0.36.0/pixman/pixman-x86.c:185: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 (vendor + 0, &b, 4); data/pixman-0.36.0/pixman/pixman-x86.c:186: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 (vendor + 4, &d, 4); data/pixman-0.36.0/pixman/pixman-x86.c:187: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 (vendor + 8, &c, 4); data/pixman-0.36.0/test/affine-bench.c:154:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char clean_space[MAX_L2CACHE_SIZE]; data/pixman-0.36.0/test/composite.c:211: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 (buf, "solid"); data/pixman-0.36.0/test/composite.c:220: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 (buf, "%.3f %.3f %.3f %.3f", data/pixman-0.36.0/test/composite.c:328: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 buf[40], buf2[40]; data/pixman-0.36.0/test/lowlevel-blt-bench.c:70: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, src, BUFSIZE - 64); data/pixman-0.36.0/test/lowlevel-blt-bench.c:71: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 (src, dst, BUFSIZE - 64); data/pixman-0.36.0/test/lowlevel-blt-bench.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 ((char *)dst + 1, (char *)src + x, BUFSIZE - 64); data/pixman-0.36.0/test/lowlevel-blt-bench.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 ((char *)src + 1, (char *)dst + x, BUFSIZE - 64); data/pixman-0.36.0/test/lowlevel-blt-bench.c:482: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, BUFSIZE); data/pixman-0.36.0/test/lowlevel-blt-bench.c:483: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 (src, dst, BUFSIZE); data/pixman-0.36.0/test/lowlevel-blt-bench.c:504:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dst, src, BUFSIZE); data/pixman-0.36.0/test/lowlevel-blt-bench.c:505: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 (src, dst, BUFSIZE); data/pixman-0.36.0/test/lowlevel-blt-bench.c:525: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, BUFSIZE); data/pixman-0.36.0/test/lowlevel-blt-bench.c:526: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 (src, dst, BUFSIZE); data/pixman-0.36.0/test/lowlevel-blt-bench.c:543: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, BUFSIZE); data/pixman-0.36.0/test/lowlevel-blt-bench.c:544: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 (src, dst, BUFSIZE); data/pixman-0.36.0/test/lowlevel-blt-bench.c:560: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, BUFSIZE); data/pixman-0.36.0/test/lowlevel-blt-bench.c:561: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 (src, dst, BUFSIZE); data/pixman-0.36.0/test/lowlevel-blt-bench.c:577: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, BUFSIZE); data/pixman-0.36.0/test/lowlevel-blt-bench.c:578: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 (src, dst, BUFSIZE); data/pixman-0.36.0/test/lowlevel-blt-bench.c:594: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, BUFSIZE); data/pixman-0.36.0/test/lowlevel-blt-bench.c:595: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 (src, dst, BUFSIZE); data/pixman-0.36.0/test/lowlevel-blt-bench.c:840: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 buf[1024]; data/pixman-0.36.0/test/pixel-test.c:2989:7: [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). lo = atoi (argv[1]); data/pixman-0.36.0/test/scaling-crash-test.c:105: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 name[28]; data/pixman-0.36.0/test/scaling-crash-test.c:119: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 name[28]; data/pixman-0.36.0/test/tolerance-test.c:111:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (bytes_dup, bytes, stride * height); data/pixman-0.36.0/test/utils-prng.c:95: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 (addr, d, 16); data/pixman-0.36.0/test/utils.c:663:15: [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, "wb"); data/pixman-0.36.0/test/utils.c:866:7: [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). n1 = atoi (argv[1]); data/pixman-0.36.0/test/utils.c:867:7: [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). n2 = atoi (argv[2]); data/pixman-0.36.0/test/utils.c:876:7: [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). n2 = atoi (argv[1]); data/pixman-0.36.0/test/utils.c:1359: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 short_name [128] = { 0 }; data/pixman-0.36.0/pixman/pixman-arm.c:146:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read (fd, &aux, sizeof(Elf32_auxv_t)) == sizeof(Elf32_auxv_t)) data/pixman-0.36.0/pixman/pixman-implementation.c:367: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). len = strlen (env); data/pixman-0.36.0/pixman/pixman-implementation.c:369: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). if (strlen (name) == len && strncmp (name, env, len) == 0) data/pixman-0.36.0/pixman/pixman-ppc.c:95:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read (fd, &aux, sizeof (aux)) == sizeof (aux)) data/pixman-0.36.0/test/lowlevel-blt-bench.c:785:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, string, n); data/pixman-0.36.0/test/lowlevel-blt-bench.c:839: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). const char *end = pattern + strlen (pattern); data/pixman-0.36.0/test/lowlevel-blt-bench.c:844:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (pattern) > sizeof (buf) - 1) data/pixman-0.36.0/test/utils.c:1374: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). ent->name + strlen ("PIXMAN_OP_")); data/pixman-0.36.0/test/utils.c:1401:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strcasecmp (ent->name + strlen ("PIXMAN_OP_"), s) == 0) ANALYSIS SUMMARY: Hits = 78 Lines analyzed = 64338 in approximately 1.45 seconds (44412 lines/second) Physical Source Lines of Code (SLOC) = 50093 Hits@level = [0] 258 [1] 9 [2] 49 [3] 11 [4] 9 [5] 0 Hits@level+ = [0+] 336 [1+] 78 [2+] 69 [3+] 20 [4+] 9 [5+] 0 Hits/KSLOC@level+ = [0+] 6.70752 [1+] 1.5571 [2+] 1.37744 [3+] 0.399257 [4+] 0.179666 [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.