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/dfcgen-gtk-0.5/include/mathMisc.h Examining data/dfcgen-gtk-0.5/include/miscDesignDlg.h Examining data/dfcgen-gtk-0.5/include/filterPrint.h Examining data/dfcgen-gtk-0.5/include/dialogSupport.h Examining data/dfcgen-gtk-0.5/include/projectFile.h Examining data/dfcgen-gtk-0.5/include/stdIirDesignDlg.h Examining data/dfcgen-gtk-0.5/include/cairoPlot.h Examining data/dfcgen-gtk-0.5/include/editDlg.h Examining data/dfcgen-gtk-0.5/include/base.h Examining data/dfcgen-gtk-0.5/include/designDlg.h Examining data/dfcgen-gtk-0.5/include/cfgSettings.h Examining data/dfcgen-gtk-0.5/include/responseWin.h Examining data/dfcgen-gtk-0.5/include/mainDlg.h Examining data/dfcgen-gtk-0.5/include/rootsPlot.h Examining data/dfcgen-gtk-0.5/include/miscFilter.h Examining data/dfcgen-gtk-0.5/include/support.h Examining data/dfcgen-gtk-0.5/include/stdIirFilter.h Examining data/dfcgen-gtk-0.5/include/filterResponse.h Examining data/dfcgen-gtk-0.5/include/linFirDesignDlg.h Examining data/dfcgen-gtk-0.5/include/linFirFilter.h Examining data/dfcgen-gtk-0.5/include/responsePlot.h Examining data/dfcgen-gtk-0.5/include/filterSupport.h Examining data/dfcgen-gtk-0.5/include/helpDlg.h Examining data/dfcgen-gtk-0.5/include/mathPoly.h Examining data/dfcgen-gtk-0.5/include/dfcProject.h Examining data/dfcgen-gtk-0.5/include/mathFuncs.h Examining data/dfcgen-gtk-0.5/include/gui.h Examining data/dfcgen-gtk-0.5/include/responseDlg.h Examining data/dfcgen-gtk-0.5/include/dfcgen.h Examining data/dfcgen-gtk-0.5/include/fileDlg.h Examining data/dfcgen-gtk-0.5/src/responseDlg.c Examining data/dfcgen-gtk-0.5/src/responseWin.c Examining data/dfcgen-gtk-0.5/src/filterSupport.c Examining data/dfcgen-gtk-0.5/src/stdIirFilter.c Examining data/dfcgen-gtk-0.5/src/filterResponse.c Examining data/dfcgen-gtk-0.5/src/fileDlg.c Examining data/dfcgen-gtk-0.5/src/mainDlg.c Examining data/dfcgen-gtk-0.5/src/filterPrint.c Examining data/dfcgen-gtk-0.5/src/linFirDesignDlg.c Examining data/dfcgen-gtk-0.5/src/responsePlot.c Examining data/dfcgen-gtk-0.5/src/stdIirDesignDlg.c Examining data/dfcgen-gtk-0.5/src/cfgSettings.c Examining data/dfcgen-gtk-0.5/src/cairoPlot.c Examining data/dfcgen-gtk-0.5/src/mathMisc.c Examining data/dfcgen-gtk-0.5/src/miscDesignDlg.c Examining data/dfcgen-gtk-0.5/src/linFirFilter.c Examining data/dfcgen-gtk-0.5/src/rootsPlot.c Examining data/dfcgen-gtk-0.5/src/designDlg.c Examining data/dfcgen-gtk-0.5/src/editDlg.c Examining data/dfcgen-gtk-0.5/src/mathPoly.c Examining data/dfcgen-gtk-0.5/src/main.c Examining data/dfcgen-gtk-0.5/src/dfcProject.c Examining data/dfcgen-gtk-0.5/src/miscFilter.c Examining data/dfcgen-gtk-0.5/src/helpDlg.c Examining data/dfcgen-gtk-0.5/src/mathFuncs.c Examining data/dfcgen-gtk-0.5/src/support.c Examining data/dfcgen-gtk-0.5/src/dialogSupport.c Examining data/dfcgen-gtk-0.5/src/projectFile.c Examining data/dfcgen-gtk-0.5/data/templates/export.c FINAL RESULTS: data/dfcgen-gtk-0.5/src/cairoPlot.c:369: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 string[256]; data/dfcgen-gtk-0.5/src/cairoPlot.c:434: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 labelText[128]; data/dfcgen-gtk-0.5/src/cfgSettings.c:501: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(data, "w"); data/dfcgen-gtk-0.5/src/cfgSettings.c:612: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 (pSet->color, pDiag->colors, PLOT_COLOR_SIZE * sizeof (pSet->color[0])); data/dfcgen-gtk-0.5/src/cfgSettings.c:653: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 (pDiag->colors, pSet->color, PLOT_COLOR_SIZE * sizeof (pSet->color[0])); data/dfcgen-gtk-0.5/src/dfcProject.c:89: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 (pBuf, &project.design, sizeof (*pBuf)); data/dfcgen-gtk-0.5/src/dialogSupport.c:258: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 text[128]; data/dfcgen-gtk-0.5/src/dialogSupport.c:282: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 text[128]; data/dfcgen-gtk-0.5/src/filterSupport.c:194: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 (dest->num.coeff, src->num.coeff, data/dfcgen-gtk-0.5/src/filterSupport.c:196: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 (dest->den.coeff, src->den.coeff, data/dfcgen-gtk-0.5/src/filterSupport.c:198: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 (dest->num.root, src->num.root, data/dfcgen-gtk-0.5/src/filterSupport.c:200: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 (dest->den.root, src->den.root, data/dfcgen-gtk-0.5/src/mainDlg.c:512: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[128]; data/dfcgen-gtk-0.5/src/mainDlg.c:537: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[128]; data/dfcgen-gtk-0.5/src/mathPoly.c:440: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 (poly->coeff, vecu.coeff, (1 + vecu.degree) * sizeof(vecu.coeff[0])); data/dfcgen-gtk-0.5/src/projectFile.c:785: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[G_ASCII_DTOSTR_BUF_SIZE]; /* buffer for double conversion */ data/dfcgen-gtk-0.5/src/projectFile.c:810: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[G_ASCII_DTOSTR_BUF_SIZE]; /* buffer for double conversion */ data/dfcgen-gtk-0.5/src/projectFile.c:878: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[G_ASCII_DTOSTR_BUF_SIZE]; /* buffer for double conversion */ data/dfcgen-gtk-0.5/src/projectFile.c:938: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[G_ASCII_DTOSTR_BUF_SIZE]; /* buffer for double conversion */ data/dfcgen-gtk-0.5/src/projectFile.c:1002: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[G_ASCII_DTOSTR_BUF_SIZE] = {'\0'}; /* buffer for double conversion */ data/dfcgen-gtk-0.5/src/projectFile.c:1308:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). templfile = fopen (templname, "r"); /* open template file */ data/dfcgen-gtk-0.5/src/projectFile.c:1320:18: [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). exportfile = fopen (filename, "w"); data/dfcgen-gtk-0.5/src/projectFile.c:1494: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, "w"); data/dfcgen-gtk-0.5/src/responseDlg.c:690: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 (pDiag->colors, responseDlgColorVals, sizeof (responseDlgColorVals)); data/dfcgen-gtk-0.5/src/responseWin.c:409: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 labelString[128]; data/dfcgen-gtk-0.5/src/projectFile.c:1256: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). return (strlen (buffer)); data/dfcgen-gtk-0.5/src/support.c:100:38: [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 gchar* pEnd = pStart + strlen (pStart); ANALYSIS SUMMARY: Hits = 27 Lines analyzed = 20610 in approximately 0.65 seconds (31783 lines/second) Physical Source Lines of Code (SLOC) = 9725 Hits@level = [0] 26 [1] 2 [2] 25 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 53 [1+] 27 [2+] 25 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 5.44987 [1+] 2.77635 [2+] 2.57069 [3+] 0 [4+] 0 [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.