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/libgdiplus-6.0.4+dfsg/tests/testjpegcodec.c Examining data/libgdiplus-6.0.4+dfsg/tests/testclip.c Examining data/libgdiplus-6.0.4+dfsg/tests/testmatrix.c Examining data/libgdiplus-6.0.4+dfsg/tests/testmetafile.c Examining data/libgdiplus-6.0.4+dfsg/tests/testadjustablearrowcap.c Examining data/libgdiplus-6.0.4+dfsg/tests/testgeneral.c Examining data/libgdiplus-6.0.4+dfsg/tests/testbmpcodec.c Examining data/libgdiplus-6.0.4+dfsg/tests/teststringformat.c Examining data/libgdiplus-6.0.4+dfsg/tests/testgifcodec.c Examining data/libgdiplus-6.0.4+dfsg/tests/testpng.c Examining data/libgdiplus-6.0.4+dfsg/tests/testtexturebrush.c Examining data/libgdiplus-6.0.4+dfsg/tests/testgraphicsfill.c Examining data/libgdiplus-6.0.4+dfsg/tests/testpathgradientbrush.c Examining data/libgdiplus-6.0.4+dfsg/tests/testtext.c Examining data/libgdiplus-6.0.4+dfsg/tests/testreversepath.c Examining data/libgdiplus-6.0.4+dfsg/tests/testimageattributes.c Examining data/libgdiplus-6.0.4+dfsg/tests/testhelpers.h Examining data/libgdiplus-6.0.4+dfsg/tests/testpngcodec.c Examining data/libgdiplus-6.0.4+dfsg/tests/testcustomlinecap.c Examining data/libgdiplus-6.0.4+dfsg/tests/testregion.c Examining data/libgdiplus-6.0.4+dfsg/tests/testpen.c Examining data/libgdiplus-6.0.4+dfsg/tests/testicocodec.c Examining data/libgdiplus-6.0.4+dfsg/tests/testtiffcodec.c Examining data/libgdiplus-6.0.4+dfsg/tests/testfont.c Examining data/libgdiplus-6.0.4+dfsg/tests/testcodecs.c Examining data/libgdiplus-6.0.4+dfsg/tests/testhatchbrush.c Examining data/libgdiplus-6.0.4+dfsg/tests/testbrush.c Examining data/libgdiplus-6.0.4+dfsg/tests/testsolidbrush.c Examining data/libgdiplus-6.0.4+dfsg/tests/testgpimage.c Examining data/libgdiplus-6.0.4+dfsg/tests/testemfcodec.c Examining data/libgdiplus-6.0.4+dfsg/tests/testbits.c Examining data/libgdiplus-6.0.4+dfsg/tests/testwmfcodec.c Examining data/libgdiplus-6.0.4+dfsg/tests/testbitmap.c Examining data/libgdiplus-6.0.4+dfsg/tests/testlineargradientbrush.c Examining data/libgdiplus-6.0.4+dfsg/tests/testgraphics.c Examining data/libgdiplus-6.0.4+dfsg/tests/testgraphicspath.c Examining data/libgdiplus-6.0.4+dfsg/tests/testgraphicsdraw.c Examining data/libgdiplus-6.0.4+dfsg/src/texturebrush-private.h Examining data/libgdiplus-6.0.4+dfsg/src/codecs-private.h Examining data/libgdiplus-6.0.4+dfsg/src/texturebrush.h Examining data/libgdiplus-6.0.4+dfsg/src/adjustablearrowcap.h Examining data/libgdiplus-6.0.4+dfsg/src/general-private.h Examining data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush.c Examining data/libgdiplus-6.0.4+dfsg/src/graphics-pathiterator.h Examining data/libgdiplus-6.0.4+dfsg/src/general.c Examining data/libgdiplus-6.0.4+dfsg/src/tiffcodec.c Examining data/libgdiplus-6.0.4+dfsg/src/fontcollection.h Examining data/libgdiplus-6.0.4+dfsg/src/solidbrush.h Examining data/libgdiplus-6.0.4+dfsg/src/gifcodec.c Examining data/libgdiplus-6.0.4+dfsg/src/jpegcodec.h Examining data/libgdiplus-6.0.4+dfsg/src/solidbrush-private.h Examining data/libgdiplus-6.0.4+dfsg/src/text.h Examining data/libgdiplus-6.0.4+dfsg/src/gdiplusimaging.h Examining data/libgdiplus-6.0.4+dfsg/src/customlinecap-private.h Examining data/libgdiplus-6.0.4+dfsg/src/hatchbrush.h Examining data/libgdiplus-6.0.4+dfsg/src/region-private.h Examining data/libgdiplus-6.0.4+dfsg/src/graphics.c Examining data/libgdiplus-6.0.4+dfsg/src/brush-private.h Examining data/libgdiplus-6.0.4+dfsg/src/GdiPlusFlat.h Examining data/libgdiplus-6.0.4+dfsg/src/image.h Examining data/libgdiplus-6.0.4+dfsg/src/gdi32.h Examining data/libgdiplus-6.0.4+dfsg/src/fontfamily-private.h Examining data/libgdiplus-6.0.4+dfsg/src/metafile.c Examining data/libgdiplus-6.0.4+dfsg/src/brush.h Examining data/libgdiplus-6.0.4+dfsg/src/graphics-path-private.h Examining data/libgdiplus-6.0.4+dfsg/src/customlinecap.h Examining data/libgdiplus-6.0.4+dfsg/src/hatchbrush.c Examining data/libgdiplus-6.0.4+dfsg/src/bitmap.h Examining data/libgdiplus-6.0.4+dfsg/src/text.c Examining data/libgdiplus-6.0.4+dfsg/src/metafile-private.h Examining data/libgdiplus-6.0.4+dfsg/src/icocodec.c Examining data/libgdiplus-6.0.4+dfsg/src/jpegcodec.c Examining data/libgdiplus-6.0.4+dfsg/src/font.h Examining data/libgdiplus-6.0.4+dfsg/src/font-private.h Examining data/libgdiplus-6.0.4+dfsg/src/customlinecap.c Examining data/libgdiplus-6.0.4+dfsg/src/stringformat.c Examining data/libgdiplus-6.0.4+dfsg/src/graphics-private.h Examining data/libgdiplus-6.0.4+dfsg/src/emfcodec.c Examining data/libgdiplus-6.0.4+dfsg/src/imageattributes-private.h Examining data/libgdiplus-6.0.4+dfsg/src/stringformat.h Examining data/libgdiplus-6.0.4+dfsg/src/image.c Examining data/libgdiplus-6.0.4+dfsg/src/graphics-metafile.c Examining data/libgdiplus-6.0.4+dfsg/src/adjustablearrowcap-private.h Examining data/libgdiplus-6.0.4+dfsg/src/solidbrush.c Examining data/libgdiplus-6.0.4+dfsg/src/pen-private.h Examining data/libgdiplus-6.0.4+dfsg/src/win32structs.h Examining data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush.c Examining data/libgdiplus-6.0.4+dfsg/src/wmfcodec.h Examining data/libgdiplus-6.0.4+dfsg/src/region-path-tree.c Examining data/libgdiplus-6.0.4+dfsg/src/fontfamily.h Examining data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush-private.h Examining data/libgdiplus-6.0.4+dfsg/src/region.c Examining data/libgdiplus-6.0.4+dfsg/src/brush.c Examining data/libgdiplus-6.0.4+dfsg/src/graphics.h Examining data/libgdiplus-6.0.4+dfsg/src/bitmap.c Examining data/libgdiplus-6.0.4+dfsg/src/graphics-path.h Examining data/libgdiplus-6.0.4+dfsg/src/stringformat-private.h Examining data/libgdiplus-6.0.4+dfsg/src/pngcodec.h Examining data/libgdiplus-6.0.4+dfsg/src/emfcodec.h Examining data/libgdiplus-6.0.4+dfsg/src/imageattributes.c Examining data/libgdiplus-6.0.4+dfsg/src/graphics-pathiterator-private.h Examining data/libgdiplus-6.0.4+dfsg/src/gifcodec.h Examining data/libgdiplus-6.0.4+dfsg/src/graphics-cairo-private.h Examining data/libgdiplus-6.0.4+dfsg/src/region-bitmap.c Examining data/libgdiplus-6.0.4+dfsg/src/print.c Examining data/libgdiplus-6.0.4+dfsg/src/general.h Examining data/libgdiplus-6.0.4+dfsg/src/bmpcodec.c Examining data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush.h Examining data/libgdiplus-6.0.4+dfsg/src/font.c Examining data/libgdiplus-6.0.4+dfsg/src/text-pango.c Examining data/libgdiplus-6.0.4+dfsg/src/gdi32.c Examining data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush-private.h Examining data/libgdiplus-6.0.4+dfsg/src/wmfcodec.c Examining data/libgdiplus-6.0.4+dfsg/src/graphics-pathiterator.c Examining data/libgdiplus-6.0.4+dfsg/src/text-pango-private.h Examining data/libgdiplus-6.0.4+dfsg/src/tiffcodec.h Examining data/libgdiplus-6.0.4+dfsg/src/gdip.h Examining data/libgdiplus-6.0.4+dfsg/src/emfplus.c Examining data/libgdiplus-6.0.4+dfsg/src/gdipluspixelformats.h Examining data/libgdiplus-6.0.4+dfsg/src/carbon-private.h Examining data/libgdiplus-6.0.4+dfsg/src/bitmap-private.h Examining data/libgdiplus-6.0.4+dfsg/src/text-metafile-private.h Examining data/libgdiplus-6.0.4+dfsg/src/metafile.h Examining data/libgdiplus-6.0.4+dfsg/src/graphics-metafile-private.h Examining data/libgdiplus-6.0.4+dfsg/src/icocodec.h Examining data/libgdiplus-6.0.4+dfsg/src/pen.c Examining data/libgdiplus-6.0.4+dfsg/src/region-bitmap.h Examining data/libgdiplus-6.0.4+dfsg/src/graphics-path.c Examining data/libgdiplus-6.0.4+dfsg/src/bmpcodec.h Examining data/libgdiplus-6.0.4+dfsg/src/texturebrush.c Examining data/libgdiplus-6.0.4+dfsg/src/pen.h Examining data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush.h Examining data/libgdiplus-6.0.4+dfsg/src/matrix.h Examining data/libgdiplus-6.0.4+dfsg/src/region.h Examining data/libgdiplus-6.0.4+dfsg/src/adjustablearrowcap.c Examining data/libgdiplus-6.0.4+dfsg/src/graphics-cairo.c Examining data/libgdiplus-6.0.4+dfsg/src/image-private.h Examining data/libgdiplus-6.0.4+dfsg/src/gdipstructs.h Examining data/libgdiplus-6.0.4+dfsg/src/fontcollection-private.h Examining data/libgdiplus-6.0.4+dfsg/src/text-cairo-private.h Examining data/libgdiplus-6.0.4+dfsg/src/gdipenums.h Examining data/libgdiplus-6.0.4+dfsg/src/carbon-private.c Examining data/libgdiplus-6.0.4+dfsg/src/dstream.h Examining data/libgdiplus-6.0.4+dfsg/src/dstream.c Examining data/libgdiplus-6.0.4+dfsg/src/codecs.h Examining data/libgdiplus-6.0.4+dfsg/src/region-path-tree.h Examining data/libgdiplus-6.0.4+dfsg/src/text-metafile.c Examining data/libgdiplus-6.0.4+dfsg/src/matrix-private.h Examining data/libgdiplus-6.0.4+dfsg/src/pngcodec.c Examining data/libgdiplus-6.0.4+dfsg/src/gdiplus-private.h Examining data/libgdiplus-6.0.4+dfsg/src/hatchbrush-private.h Examining data/libgdiplus-6.0.4+dfsg/src/matrix.c Examining data/libgdiplus-6.0.4+dfsg/src/text-cairo.c Examining data/libgdiplus-6.0.4+dfsg/src/imageattributes.h Examining data/libgdiplus-6.0.4+dfsg/src/emfplus.h FINAL RESULTS: data/libgdiplus-6.0.4+dfsg/src/emfcodec.c:34:29: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define NOTIMPLEMENTED(s) printf(s) data/libgdiplus-6.0.4+dfsg/src/emfcodec.c:35:33: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define NOTIMPLEMENTED1(s,p1) printf(s, (p1)) data/libgdiplus-6.0.4+dfsg/src/emfcodec.c:36:35: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define NOTIMPLEMENTED2(s,p1,p2) printf(s, (p1), (p2)) data/libgdiplus-6.0.4+dfsg/src/emfcodec.c:37:38: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define NOTIMPLEMENTED3(s,p1,p2,p3) printf(s, (p1), (p2), (p3)) data/libgdiplus-6.0.4+dfsg/src/emfcodec.c:38:41: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define NOTIMPLEMENTED4(s,p1,p2,p3,p4) printf(s, (p1), (p2), (p3), (p4)) data/libgdiplus-6.0.4+dfsg/src/emfcodec.c:39:43: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define NOTIMPLEMENTED5(s,p1,p2,p3,p4,p5) printf(s, (p1), (p2), (p3), (p4), (p5)) data/libgdiplus-6.0.4+dfsg/src/emfcodec.c:40:46: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define NOTIMPLEMENTED6(s,p1,p2,p3,p4,p5,p6) printf(s, (p1), (p2), (p3), (p4), (p5), (p6)) data/libgdiplus-6.0.4+dfsg/tests/testfont.c:436: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 (logfont.lfFaceName, nativeFamilyNameA); data/libgdiplus-6.0.4+dfsg/tests/testgraphicspath.c:81:21: [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. int systemResult = system ("test-image.bmp"); data/libgdiplus-6.0.4+dfsg/tests/testhelpers.h:730:21: [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. int systemResult = system ("test-image.png"); data/libgdiplus-6.0.4+dfsg/tests/testtext.c:29:46: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define ok(expected, ...) if (!(expected)) { printf(__VA_ARGS__); assert(expected); } data/libgdiplus-6.0.4+dfsg/src/carbon-private.c:31: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 ("MONO_MWF_MAC_DETECT_DPI") != NULL) { data/libgdiplus-6.0.4+dfsg/src/adjustablearrowcap.c:78: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 (newcap, cap, sizeof (GpAdjustableArrowCap)); data/libgdiplus-6.0.4+dfsg/src/bitmap-private.h:54:14: [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. ((unsigned char *)(pixel))[index] = a; \ data/libgdiplus-6.0.4+dfsg/src/bitmap-private.h:55:14: [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. ((unsigned char *)(pixel))[index+1] = r; \ data/libgdiplus-6.0.4+dfsg/src/bitmap-private.h:56:14: [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. ((unsigned char *)(pixel))[index+2] = g; \ data/libgdiplus-6.0.4+dfsg/src/bitmap-private.h:57:14: [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. ((unsigned char *)(pixel))[index+3] = b; \ data/libgdiplus-6.0.4+dfsg/src/bitmap-private.h:61:14: [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. ((unsigned char *)(pixel))[index] = b; \ data/libgdiplus-6.0.4+dfsg/src/bitmap-private.h:62:14: [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. ((unsigned char *)(pixel))[index+1] = g; \ data/libgdiplus-6.0.4+dfsg/src/bitmap-private.h:63:14: [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. ((unsigned char *)(pixel))[index+2] = r; \ data/libgdiplus-6.0.4+dfsg/src/bitmap-private.h:64:14: [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. ((unsigned char *)(pixel))[index+3] = a; \ data/libgdiplus-6.0.4+dfsg/src/bitmap.c:154: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(result[i].value, src[i].value, src[i].length); data/libgdiplus-6.0.4+dfsg/src/bitmap.c:329: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(bitmap_data->property[property_count].value, value, length); data/libgdiplus-6.0.4+dfsg/src/bitmap.c:440: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(result[i].scan0, src[i].scan0, size); data/libgdiplus-6.0.4+dfsg/src/bitmap.c:578: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 (result, original, size); data/libgdiplus-6.0.4+dfsg/src/bitmap.c:985: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 (bitmap_data->palette->Entries, default_palette, palette_entries * 4); data/libgdiplus-6.0.4+dfsg/src/bitmap.c:1167: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, realBytes); data/libgdiplus-6.0.4+dfsg/src/bitmap.c:1736: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_region, src_region, bytes_per_region); data/libgdiplus-6.0.4+dfsg/src/bitmap.c:1743: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, bytes_per_line); data/libgdiplus-6.0.4+dfsg/src/bmpcodec.c:1067: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 (destScan, scan, srcStride); data/libgdiplus-6.0.4+dfsg/src/bmpcodec.c:1298: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 (data, ms->ptr + ms->pos, len); data/libgdiplus-6.0.4+dfsg/src/dstream.c:85: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 (buffer, loader->buffer + loader->position, nbytes); data/libgdiplus-6.0.4+dfsg/src/dstream.c:127: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 (loader->exif_buffer, loader->buffer, offset); data/libgdiplus-6.0.4+dfsg/src/font.c:229: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). fileHandle = fopen ((char *)file, "r"); data/libgdiplus-6.0.4+dfsg/src/font.c:1041: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 (result->face, str, strlen ((char *) str) + 1); data/libgdiplus-6.0.4+dfsg/src/font.c:1232: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 (logFont->lfFaceName, font->face, len < LF_FACESIZE ? len : LF_FACESIZE - 1); data/libgdiplus-6.0.4+dfsg/src/font.c:1272: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(result->face, src_font->face, strlen((char *)src_font->face) + 1); data/libgdiplus-6.0.4+dfsg/src/font.c:1342: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(result->face, logfont->lfFaceName, LF_FACESIZE); data/libgdiplus-6.0.4+dfsg/src/font.c:1397:2: [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 ((char *) fontfile, "/tmp/ffXXXXXX"); data/libgdiplus-6.0.4+dfsg/src/font.c:1398:6: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). f = mkstemp ((char *) fontfile); data/libgdiplus-6.0.4+dfsg/src/general.c:77: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 namebuf[512]; data/libgdiplus-6.0.4+dfsg/src/general.c:81:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy ((char *) namebuf, "/tmp/ffXXXXXX"); data/libgdiplus-6.0.4+dfsg/src/general.c:82:12: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int fd = mkstemp ((char *) namebuf); data/libgdiplus-6.0.4+dfsg/src/gifcodec.c:502: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(ep->Bytes, ExtData, Len); data/libgdiplus-6.0.4+dfsg/src/gifcodec.c:838: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 (bytes, eb.Bytes, eb.ByteCount); data/libgdiplus-6.0.4+dfsg/src/gifcodec.c:886: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(text, eb.Bytes, eb.ByteCount); data/libgdiplus-6.0.4+dfsg/src/gifcodec.c:981: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 (writeptr, readptr, img_desc->Width); data/libgdiplus-6.0.4+dfsg/src/gifcodec.c:994:7: [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 (bitmap_data->scan0, last_bitmap->scan0, data/libgdiplus-6.0.4+dfsg/src/gifcodec.c:1249:8: [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(pixbuf + y * bitmap_data->width, data/libgdiplus-6.0.4+dfsg/src/graphics-path.c:324: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 (result->points, points, sizeof (GpPointF) * count); data/libgdiplus-6.0.4+dfsg/src/graphics-path.c:325: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 (result->types, types, sizeof (BYTE) * count); data/libgdiplus-6.0.4+dfsg/src/graphics-path.c:389: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 (result->points, path->points, sizeof (GpPointF) * path->count); data/libgdiplus-6.0.4+dfsg/src/graphics-path.c:390: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 (result->types, path->types, sizeof (BYTE) * path->count); data/libgdiplus-6.0.4+dfsg/src/graphics-path.c:454: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 (types, path->types, path->count * sizeof (BYTE)); data/libgdiplus-6.0.4+dfsg/src/graphics-path.c:466: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 (points, path->points, path->count * sizeof (GpPointF)); data/libgdiplus-6.0.4+dfsg/src/graphics-path.c:514: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 (pathData->Points, path->points, path->count * sizeof (GpPointF)); data/libgdiplus-6.0.4+dfsg/src/graphics-path.c:515: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 (pathData->Types, path->types, path->count * sizeof (BYTE)); data/libgdiplus-6.0.4+dfsg/src/graphics-path.c:1198: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 (path->types + path->count, addingPath->types, sizeof (BYTE) * addingPath->count); data/libgdiplus-6.0.4+dfsg/src/graphics-path.c:1199: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 (path->points + path->count, addingPath->points, sizeof (GpPointF) * addingPath->count); data/libgdiplus-6.0.4+dfsg/src/graphics-pathiterator.c:136: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 (points, iterator->path->points + startIndex, (endIndex - startIndex + 1) * sizeof (GpPointF)); data/libgdiplus-6.0.4+dfsg/src/graphics-pathiterator.c:137: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 (types, iterator->path->types + startIndex, (endIndex - startIndex + 1) * sizeof (BYTE)); data/libgdiplus-6.0.4+dfsg/src/graphics-pathiterator.c:184: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 (path->types, iterator->path->types + start, sizeof (BYTE) * *resultCount); data/libgdiplus-6.0.4+dfsg/src/graphics-pathiterator.c:185: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 (path->points, iterator->path->points + start, sizeof (GpPointF) * *resultCount); data/libgdiplus-6.0.4+dfsg/src/graphics-pathiterator.c:292: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 (path->types, iterator->path->types + start, sizeof (BYTE) * *resultCount); data/libgdiplus-6.0.4+dfsg/src/graphics-pathiterator.c:293: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 (path->points, iterator->path->points + start, sizeof (GpPointF) * *resultCount); data/libgdiplus-6.0.4+dfsg/src/image.c:195: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 (trg, src, size); data/libgdiplus-6.0.4+dfsg/src/image.c:222: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 (line, src, stride); /* Save original line */ data/libgdiplus-6.0.4+dfsg/src/image.c:256: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 (line, trg, stride); /* Save target line*/ data/libgdiplus-6.0.4+dfsg/src/image.c:257: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 (trg, src, stride); /* Copy src to trg*/ data/libgdiplus-6.0.4+dfsg/src/image.c:258: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 (src, line, stride); /* Copy trg to src*/ data/libgdiplus-6.0.4+dfsg/src/image.c:986: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 format_peek[MAX_CODEC_SIG_LENGTH]; data/libgdiplus-6.0.4+dfsg/src/image.c:1001:7: [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). fp = fopen (file_name, "rb"); data/libgdiplus-6.0.4+dfsg/src/image.c:1126:12: [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 ((fp = fopen(file_name, "wb")) == NULL) { data/libgdiplus-6.0.4+dfsg/src/image.c:1322: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 (format, &gdip_bmp_image_format_guid, sizeof (GUID)); data/libgdiplus-6.0.4+dfsg/src/image.c:1325: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 (format, &gdip_tif_image_format_guid, sizeof (GUID)); data/libgdiplus-6.0.4+dfsg/src/image.c:1328: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 (format, &gdip_gif_image_format_guid, sizeof (GUID)); data/libgdiplus-6.0.4+dfsg/src/image.c:1331: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 (format, &gdip_png_image_format_guid, sizeof (GUID)); data/libgdiplus-6.0.4+dfsg/src/image.c:1334: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 (format, &gdip_jpg_image_format_guid, sizeof (GUID)); data/libgdiplus-6.0.4+dfsg/src/image.c:1337: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 (format, &gdip_exif_image_format_guid, sizeof (GUID)); data/libgdiplus-6.0.4+dfsg/src/image.c:1340: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 (format, &gdip_wmf_image_format_guid, sizeof (GUID)); data/libgdiplus-6.0.4+dfsg/src/image.c:1343: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 (format, &gdip_emf_image_format_guid, sizeof (GUID)); data/libgdiplus-6.0.4+dfsg/src/image.c:1346: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 (format, &gdip_membmp_image_format_guid, sizeof (GUID)); data/libgdiplus-6.0.4+dfsg/src/image.c:1349: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 (format, &gdip_ico_image_format_guid, sizeof (GUID)); data/libgdiplus-6.0.4+dfsg/src/image.c:1872: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(palette, image->active_bitmap->palette, bytes_needed); data/libgdiplus-6.0.4+dfsg/src/image.c:1900: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 (image->active_bitmap->palette, palette, size); data/libgdiplus-6.0.4+dfsg/src/image.c:2008: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(buffer, &image->active_bitmap->property[index], sizeof(PropertyItem)); data/libgdiplus-6.0.4+dfsg/src/image.c:2010: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(buffer->value, image->active_bitmap->property[index].value, buffer->length); data/libgdiplus-6.0.4+dfsg/src/image.c:2110: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(image->active_bitmap->property[i].value, item->value, item->length); data/libgdiplus-6.0.4+dfsg/src/image.c:2328: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 (dpos, gdip_getcodecinfo_bmp (), sizeof (ImageCodecInfo)); data/libgdiplus-6.0.4+dfsg/src/image.c:2331: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 (epos, gdip_getcodecinfo_bmp (), sizeof (ImageCodecInfo)); data/libgdiplus-6.0.4+dfsg/src/image.c:2337: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 (dpos, gdip_getcodecinfo_jpeg(), sizeof (ImageCodecInfo)); data/libgdiplus-6.0.4+dfsg/src/image.c:2340: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 (epos, gdip_getcodecinfo_jpeg(), sizeof (ImageCodecInfo)); data/libgdiplus-6.0.4+dfsg/src/image.c:2347: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 (dpos, gdip_getcodecinfo_gif (), sizeof (ImageCodecInfo)); data/libgdiplus-6.0.4+dfsg/src/image.c:2350: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 (epos, gdip_getcodecinfo_gif (), sizeof (ImageCodecInfo)); data/libgdiplus-6.0.4+dfsg/src/image.c:2357: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 (dpos, gdip_getcodecinfo_emf (), sizeof (ImageCodecInfo)); data/libgdiplus-6.0.4+dfsg/src/image.c:2364: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 (dpos, gdip_getcodecinfo_wmf (), sizeof (ImageCodecInfo)); data/libgdiplus-6.0.4+dfsg/src/image.c:2371: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 (dpos, gdip_getcodecinfo_tiff (), sizeof (ImageCodecInfo)); data/libgdiplus-6.0.4+dfsg/src/image.c:2374: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 (epos, gdip_getcodecinfo_tiff (), sizeof (ImageCodecInfo)); data/libgdiplus-6.0.4+dfsg/src/image.c:2381: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 (dpos, gdip_getcodecinfo_png (), sizeof (ImageCodecInfo)); data/libgdiplus-6.0.4+dfsg/src/image.c:2384: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 (epos, gdip_getcodecinfo_png (), sizeof (ImageCodecInfo)); data/libgdiplus-6.0.4+dfsg/src/image.c:2390: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 (dpos, gdip_getcodecinfo_ico (), sizeof (ImageCodecInfo)); data/libgdiplus-6.0.4+dfsg/src/image.c:2428: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 (decoders, g_decoder_list, size); data/libgdiplus-6.0.4+dfsg/src/image.c:2449: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 (encoders, g_encoder_list, size); data/libgdiplus-6.0.4+dfsg/src/image.c:2488: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(allItems, image->active_bitmap->property, sizeof(PropertyItem) * numProperties); data/libgdiplus-6.0.4+dfsg/src/image.c:2494: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(ptr, allItems[i].value, allItems[i].length); /* Use the copied pointer, less indirection than image->active_bitmap->property[i].value */ data/libgdiplus-6.0.4+dfsg/src/imageattributes.c:84: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(clone->colormap, attr->colormap, sizeof(ColorMap) * attr->colormap_elem); data/libgdiplus-6.0.4+dfsg/src/imageattributes.c:96: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(clone->colormatrix, attr->colormatrix, sizeof(ColorMatrix)); data/libgdiplus-6.0.4+dfsg/src/imageattributes.c:108: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(clone->graymatrix, attr->graymatrix, sizeof(ColorMatrix)); data/libgdiplus-6.0.4+dfsg/src/imageattributes.c:486: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 (result, imageattr, sizeof (GpImageAttributes)); data/libgdiplus-6.0.4+dfsg/src/imageattributes.c:709: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). FILE *fileHandle = fopen (utf8, "rb"); data/libgdiplus-6.0.4+dfsg/src/imageattributes.c:757: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 (imgattr->colormap, map, size); data/libgdiplus-6.0.4+dfsg/src/imageattributes.c:838: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 (imgattr->graymatrix, grayMatrix, sizeof (ColorMatrix)); data/libgdiplus-6.0.4+dfsg/src/imageattributes.c:842: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 (imgattr->colormatrix, colorMatrix, sizeof (ColorMatrix)); data/libgdiplus-6.0.4+dfsg/src/jpegcodec.c:125: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 buffer[JMSG_LENGTH_MAX]; data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush.c:123: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 (&newbrush->rectangle, &linear->rectangle, sizeof (GpRectF)); data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush.c:148: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 (newbrush->presetColors->colors, linear->presetColors->colors, data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush.c:155: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 (newbrush->presetColors->positions, linear->presetColors->positions, data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush.c:158: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 (newbrush->presetColors, linear->presetColors, sizeof (InterpolationColors)); data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush.c:171: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 (newbrush->blend->factors, linear->blend->factors, linear->blend->count * sizeof (ARGB)); data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush.c:177: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 (newbrush->blend->positions, linear->blend->positions, linear->blend->count * sizeof (float)); data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush.c:179: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 (newbrush->blend, linear->blend, sizeof (Blend)); data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush.c:667: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 (&linear->rectangle, rect, sizeof (GpRectF)); data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush.c:752: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 (blend, brush->blend->factors, brush->blend->count * sizeof (float)); data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush.c:756: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 (positions, brush->blend->positions, brush->blend->count * sizeof (float)); data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush.c:856: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 (blend, brush->presetColors->colors, count * sizeof (ARGB)); data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush.c:857: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 (positions, brush->presetColors->positions, count * sizeof (float)); data/libgdiplus-6.0.4+dfsg/src/lineargradientbrush.c:902: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 (rect, &brush->rectangle, sizeof (GpRectF)); data/libgdiplus-6.0.4+dfsg/src/matrix-private.h:47:40: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define gdip_cairo_matrix_copy(m1,m2) memcpy (m1, m2, sizeof (cairo_matrix_t)) data/libgdiplus-6.0.4+dfsg/src/metafile.c:949: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 (&mf->metafile_header, &metafile->metafile_header, sizeof (MetafileHeader)); data/libgdiplus-6.0.4+dfsg/src/metafile.c:957: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 (mf->data, metafile->data, metafile->length); data/libgdiplus-6.0.4+dfsg/src/metafile.c:1440: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 (&header->Header.Wmf, &key, size); data/libgdiplus-6.0.4+dfsg/src/metafile.c:1620:7: [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). fp = fopen (file_name, "rb"); data/libgdiplus-6.0.4+dfsg/src/metafile.c:1748: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 (header, &mf->metafile_header, sizeof (MetafileHeader)); data/libgdiplus-6.0.4+dfsg/src/metafile.c:1787:7: [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). fp = fopen (file_name, "rb"); data/libgdiplus-6.0.4+dfsg/src/metafile.c:1848: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 (header, &metafile->metafile_header, sizeof (MetafileHeader)); data/libgdiplus-6.0.4+dfsg/src/metafile.c:1996: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). mf->fp = fopen (file_name, "wb"); data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush.c:153: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 (newbrush->boundaryColors, pgbrush->boundaryColors, sizeof(ARGB) * pgbrush->boundaryColorsCount); data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush.c:181: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 (newbrush->presetColors->colors, pgbrush->presetColors->colors, data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush.c:190: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 (newbrush->presetColors->positions, pgbrush->presetColors->positions, data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush.c:193: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 (newbrush->presetColors, pgbrush->presetColors, sizeof (InterpolationColors)); data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush.c:210: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 (newbrush->blend->factors, pgbrush->blend->factors, pgbrush->blend->count * sizeof (ARGB)); data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush.c:218: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 (newbrush->blend->positions, pgbrush->blend->positions, pgbrush->blend->count * sizeof (float)); data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush.c:220: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 (newbrush->blend, pgbrush->blend, sizeof (Blend)); data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush.c:657: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 (brush->boundaryColors, colors, sizeof (ARGB) * boundaryColorsCount); data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush.c:727: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 (rect, &brush->rectangle, sizeof (GpRectF)); data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush.c:800: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 (blend, brush->blend->factors, brush->blend->count * sizeof (float)); data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush.c:804: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 (positions, brush->blend->positions, brush->blend->count * sizeof (float)); data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush.c:891: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 (blend, brush->presetColors->colors, count * sizeof (ARGB)); data/libgdiplus-6.0.4+dfsg/src/pathgradientbrush.c:892: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 (positions, brush->presetColors->positions, count * sizeof (float)); data/libgdiplus-6.0.4+dfsg/src/pen.c:363: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 (result->dash_array, pen->dash_array, pen->dash_count * sizeof (float)); data/libgdiplus-6.0.4+dfsg/src/pen.c:373: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 (result->compound_array, pen->compound_array, pen->compound_count * sizeof (float)); data/libgdiplus-6.0.4+dfsg/src/pen.c:902: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 (dash, pen->dash_array, count * sizeof (float)); data/libgdiplus-6.0.4+dfsg/src/pen.c:938: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 (pen->dash_array, dash, pen->dash_count * sizeof (float)); data/libgdiplus-6.0.4+dfsg/src/pen.c:991: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 (pen->compound_array, compound, pen->compound_count * sizeof (float)); data/libgdiplus-6.0.4+dfsg/src/pen.c:1005: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 (compound, pen->compound_array, count * sizeof (float)); data/libgdiplus-6.0.4+dfsg/src/pngcodec.c:336: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 (rawdata + i * dest_stride, row_pointers[i], source_stride); data/libgdiplus-6.0.4+dfsg/src/pngcodec.c:538:8: [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(alpha, trans, MIN(num_trans, 4)); data/libgdiplus-6.0.4+dfsg/src/region-bitmap.c:309: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 (buffer, bitmap->Mask, size); data/libgdiplus-6.0.4+dfsg/src/region-bitmap.c:683: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 (newline, oldline, new_width_byte); data/libgdiplus-6.0.4+dfsg/src/region-path-tree.c:140: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 (&tag, data, len); data/libgdiplus-6.0.4+dfsg/src/region-path-tree.c:154: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 (&count, data, len); data/libgdiplus-6.0.4+dfsg/src/region-path-tree.c:158: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 (&mode, data, len); data/libgdiplus-6.0.4+dfsg/src/region-path-tree.c:175: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 (&tree->mode, data, len); data/libgdiplus-6.0.4+dfsg/src/region-path-tree.c:179: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 (&branch_size, data, len); data/libgdiplus-6.0.4+dfsg/src/region-path-tree.c:192: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 (&branch_size, data, len); data/libgdiplus-6.0.4+dfsg/src/region-path-tree.c:230: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 (buffer, &temp, len); data/libgdiplus-6.0.4+dfsg/src/region-path-tree.c:234: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 (buffer, &tree->path->count, len); data/libgdiplus-6.0.4+dfsg/src/region-path-tree.c:239: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 (buffer, &temp, len); data/libgdiplus-6.0.4+dfsg/src/region-path-tree.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 (buffer, tree->path->types, len); data/libgdiplus-6.0.4+dfsg/src/region-path-tree.c:249: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 (buffer, tree->path->points, len); data/libgdiplus-6.0.4+dfsg/src/region-path-tree.c:257: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 (buffer, &temp, len); data/libgdiplus-6.0.4+dfsg/src/region-path-tree.c:262: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 (buffer, &temp, len); data/libgdiplus-6.0.4+dfsg/src/region-path-tree.c:267: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 (buffer, &temp, len); data/libgdiplus-6.0.4+dfsg/src/region-path-tree.c:275: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 (buffer, &temp, len); data/libgdiplus-6.0.4+dfsg/src/region.c:110: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 (array, *srcarray, sizeof (GpRectF) * (*elements)); data/libgdiplus-6.0.4+dfsg/src/region.c:130: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 (array, *srcarray, sizeof (GpRectF) * elements); data/libgdiplus-6.0.4+dfsg/src/region.c:151: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 (next, rect, sizeof (GpRectF)); data/libgdiplus-6.0.4+dfsg/src/region.c:192: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 (next, rect, sizeof (GpRectF)); data/libgdiplus-6.0.4+dfsg/src/region.c:505: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 (dest->rects, source->rects, sizeof (GpRectF) * source->cnt); data/libgdiplus-6.0.4+dfsg/src/region.c:685: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 (&header, regionData, sizeof (RegionHeader)); data/libgdiplus-6.0.4+dfsg/src/region.c:704: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 (&type, regionData, sizeof (DWORD)); data/libgdiplus-6.0.4+dfsg/src/region.c:717: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 (&rect, regionData, sizeof (GpRectF)); data/libgdiplus-6.0.4+dfsg/src/region.c:2446: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 (buffer + filled, &type, sizeof (DWORD)); data/libgdiplus-6.0.4+dfsg/src/region.c:2449: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 (buffer + filled, region->rects, region->cnt * sizeof (GpRectF)); data/libgdiplus-6.0.4+dfsg/src/region.c:2453: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 (buffer + filled, &type, sizeof (DWORD)); data/libgdiplus-6.0.4+dfsg/src/region.c:2462: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 (buffer + filled, &type, sizeof (DWORD)); data/libgdiplus-6.0.4+dfsg/src/region.c:2471: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 (buffer + filled, &type, sizeof (DWORD)); data/libgdiplus-6.0.4+dfsg/src/region.c:2484: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 (buffer, &header, sizeof (RegionHeader)); data/libgdiplus-6.0.4+dfsg/src/region.c:2488: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 (buffer + 4, &header.checksum, sizeof (DWORD)); data/libgdiplus-6.0.4+dfsg/src/stringformat.c:172: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 (result->tabStops, format->tabStops, format->numtabStops * sizeof (float)); data/libgdiplus-6.0.4+dfsg/src/stringformat.c:179: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 (result->charRanges, format->charRanges, format->charRangeCount * sizeof (CharacterRange)); data/libgdiplus-6.0.4+dfsg/src/stringformat.c:341: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 (format->tabStops, tabStops, count * sizeof (REAL)); data/libgdiplus-6.0.4+dfsg/src/stringformat.c:393: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 (tabStops, format->tabStops, elems * sizeof (REAL)); data/libgdiplus-6.0.4+dfsg/src/stringformat.c:430: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 (rangesResult, ranges, rangeCount * sizeof (CharacterRange)); data/libgdiplus-6.0.4+dfsg/src/text-cairo.c:585:7: [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 (&CleanString[j], &CleanString[k+1], sizeof(WCHAR)*(EndOfLine-k-1)); data/libgdiplus-6.0.4+dfsg/src/tiffcodec.c:1072: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 error_message[1024]; data/libgdiplus-6.0.4+dfsg/src/tiffcodec.c:1189: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(pixbuf_row, pixbuf + (bitmap_data->stride * i), bitmap_data->stride); data/libgdiplus-6.0.4+dfsg/src/tiffcodec.c:1190: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(pixbuf + (bitmap_data->stride * i), pixbuf + (bitmap_data->stride * (tiff_image.height - i - 1)), bitmap_data->stride); data/libgdiplus-6.0.4+dfsg/src/tiffcodec.c:1191: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(pixbuf + (bitmap_data->stride * (tiff_image.height - i - 1)), pixbuf_row, bitmap_data->stride); data/libgdiplus-6.0.4+dfsg/src/win32structs.h:428: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 lfFaceName[LF_FACESIZE]; data/libgdiplus-6.0.4+dfsg/tests/testbmpcodec.c:32:12: [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 (file, "wb+"); \ data/libgdiplus-6.0.4+dfsg/tests/testemfcodec.c:33:12: [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 (file, "wb+"); \ data/libgdiplus-6.0.4+dfsg/tests/testfont.c:42:12: [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, "rb"); data/libgdiplus-6.0.4+dfsg/tests/testfont.c:503: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 *) logfont.lfFaceName, (void *) nativeFamilyNameW, LF_FACESIZE * sizeof (WCHAR)); data/libgdiplus-6.0.4+dfsg/tests/testgifcodec.c:31:12: [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 (file, "wb+"); \ data/libgdiplus-6.0.4+dfsg/tests/testicocodec.c:31:12: [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 (file, "wb+"); \ data/libgdiplus-6.0.4+dfsg/tests/testjpegcodec.c:35:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen (file, "wb+"); \ data/libgdiplus-6.0.4+dfsg/tests/testpngcodec.c:33:12: [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 (file, "wb+"); \ data/libgdiplus-6.0.4+dfsg/tests/testtiffcodec.c:34:12: [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 (file, "wb+"); \ data/libgdiplus-6.0.4+dfsg/tests/testwmfcodec.c:33:12: [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 (file, "wb+"); \ data/libgdiplus-6.0.4+dfsg/src/bitmap.c:251:56: [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). return gdip_bitmapdata_property_add (bitmap_data, id, strlen((char *)value) + 1, PropertyTagTypeASCII, value); data/libgdiplus-6.0.4+dfsg/src/dstream.c:25:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). GetBytesDelegate read; data/libgdiplus-6.0.4+dfsg/src/dstream.c:41:37: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dstream_input_new (GetBytesDelegate read, SeekDelegate seek) data/libgdiplus-6.0.4+dfsg/src/dstream.c:56:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). st->pvt->read = read; data/libgdiplus-6.0.4+dfsg/src/dstream.c:110:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nbytes = loader->read (loader->buffer + offset, loader->allocated - offset, 0); data/libgdiplus-6.0.4+dfsg/src/dstream.c:171:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nbytes -= loader->read (NULL, nbytes, 0); data/libgdiplus-6.0.4+dfsg/src/dstream.h:33:48: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dstream_t *dstream_input_new (GetBytesDelegate read, SeekDelegate seek) GDIP_INTERNAL; data/libgdiplus-6.0.4+dfsg/src/font.c:1035:28: [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). result->face = GdipAlloc (strlen ((char *) str) + 1); data/libgdiplus-6.0.4+dfsg/src/font.c:1041:29: [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). memcpy (result->face, str, strlen ((char *) str) + 1); data/libgdiplus-6.0.4+dfsg/src/font.c:1230: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). int len = strlen ((char *) font->face); data/libgdiplus-6.0.4+dfsg/src/font.c:1266:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result->face = GdipAlloc(strlen ((char *) src_font->face) + 1); data/libgdiplus-6.0.4+dfsg/src/font.c:1272:39: [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). memcpy(result->face, src_font->face, strlen((char *)src_font->face) + 1); data/libgdiplus-6.0.4+dfsg/src/gifcodec.c:464:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read; data/libgdiplus-6.0.4+dfsg/src/text-cairo.c:348:84: [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). printf("Sanitized string: >%s<, length %d (utf8-length:%d)\n", String, StringLen, strlen((char *)String)); data/libgdiplus-6.0.4+dfsg/src/text-pango.c:204:11: [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). length = strlen(text); data/libgdiplus-6.0.4+dfsg/src/text-pango.c:631:11: [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 (layoutText); data/libgdiplus-6.0.4+dfsg/tests/testhelpers.h:55: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). size_t length = strlen (c); ANALYSIS SUMMARY: Hits = 227 Lines analyzed = 109495 in approximately 3.02 seconds (36204 lines/second) Physical Source Lines of Code (SLOC) = 78330 Hits@level = [0] 212 [1] 17 [2] 198 [3] 1 [4] 11 [5] 0 Hits@level+ = [0+] 439 [1+] 227 [2+] 210 [3+] 12 [4+] 11 [5+] 0 Hits/KSLOC@level+ = [0+] 5.60449 [1+] 2.898 [2+] 2.68097 [3+] 0.153198 [4+] 0.140432 [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.