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/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DCTools/MarchingCubes.c Examining data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DCTools/Object3DCTools.c Examining data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/Object3DQhull.c Examining data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c Examining data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/include/Colormap.h Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/include/ColormapLUT.h Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/include/InsidePolygonWithBounds.h Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/include/MinMax.h Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/include/Types.h Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/src/Colormap.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/src/ColormapLUT.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/src/InsidePolygonWithBounds.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/src/MinMaxImpl.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/PyMcaIOHelper/PyMcaIOHelper.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/edf/FastEdf.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/include/Lists.h Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/include/SpecFile.h Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/include/SpecFileP.h Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/include/locale_management.h Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/locale_management.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfdata.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfindex.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflists.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfmca.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sftools.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfwrite.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Include/blissmalloc.h Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Include/spec_shm.h Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Include/sps.h Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Include/sps_lut.h Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps_lut.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps_py.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/spslut_py.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/PyMcaSciPy/signal/medianfilter.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/PyMcaSciPy/signal/mediantools.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/fitting/specfit/SpecfitFuns.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/fitting/specfit/smoothnd.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/fitting/specfit/snip1d.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/fitting/specfit/snip2d.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/fitting/specfit/snip3d.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/include/bessel0.h Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/include/polspl.h Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/src/bessel0.c Examining data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/src/polspl.c FINAL RESULTS: data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:454:5: [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(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:17215:5: [4] (format) vsnprintf: 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. vsnprintf(msg, 200, fmt, vargs); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:454:5: [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(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:17215:5: [4] (format) vsnprintf: 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. vsnprintf(msg, 200, fmt, vargs); data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:779:5: [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(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:25104:5: [4] (format) vsnprintf: 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. vsnprintf(msg, 200, fmt, vargs); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/locale_management.c:67: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(localeBuffer, currentLocaleBuffer); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfdata.c:305: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(localeBuffer, currentLocaleBuffer); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c:736:6: [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(buf,(char *)linebuf); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:561:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(idxname,"%s%s",sf->sfname,SF_ISFX); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:625:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(idxname,"%s%s",sf->sfname,SF_ISFX); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:250:14: [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(onelabel,tmplab); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:269:6: [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(onelabel,tmplab); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:375:16: [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(onemot,tmpmot); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:393:9: [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(onemot,tmpmot); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:518: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(localeBuffer, currentLocaleBuffer); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfmca.c:261: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(localeBuffer, currentLocaleBuffer); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py.c:533:5: [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(self->name,filename); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py.c:1520:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str,buf); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py.c:1533:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str,buf); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py.c:1540:12: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str,buf); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c:370:5: [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(object->name, filename); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c:431:11: [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. sts = system(command); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c:1330:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str,buf); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c:1343:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str,buf); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c:1350:12: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str,buf); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:305:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(comb, "%s(%u)", version, pid); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:323:15: [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). if (name) strcpy(name, version_buf); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:327:15: [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). if (name) strcpy(name, fullname); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:544:21: [4] (shell) popen: 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. if ((pd = (FILE*) popen(IPCS,"r")) == NULL) data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2100:5: [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(strange, data + cols *i); /* sscanf core-dumps if in shared mem*/ data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2192:5: [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(strange, data + cols *i); /* sscanf core-dumps if in shared mem*/ data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2266:5: [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(strange, data + cols *i); /* sscanf core-dumps if in shared mem*/ data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2282:3: [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(data + cols * use_row, identifier); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2284:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(data + cols * use_row, set_value); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2671:3: [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(shm->head.head.name, array); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2672:3: [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(shm->head.head.spec_version, specversion); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2714:3: [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(shm->head.head.spec_version, name); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2951:10: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while (scanf("%s",buf) == 1) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2955:7: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. scanf("%s %s %d %d %d %d",buf1,buf2,&rows,&cols, &type, &flag); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2995:7: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. scanf("%s %s %s",buf1,buf2,buf3); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:3005:7: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. scanf("%s %s %s %s",buf1,buf2,buf3,buf4); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:3015:7: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. scanf("%s %s",buf1,buf2); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:788:5: [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(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:25544:5: [4] (format) vsnprintf: 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. vsnprintf(msg, 200, fmt, vargs); data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:778:5: [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(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:23984:5: [4] (format) vsnprintf: 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. vsnprintf(msg, 200, fmt, vargs); data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:25971:18: [3] (random) setstate: 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. if (!setstate) PyErr_Clear(); data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:25972:18: [3] (random) setstate: 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. if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:25972:58: [3] (random) setstate: 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. if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:25993:16: [3] (random) setstate: 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. Py_XDECREF(setstate); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:26532:18: [3] (random) setstate: 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. if (!setstate) PyErr_Clear(); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:26533:18: [3] (random) setstate: 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. if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:26533:58: [3] (random) setstate: 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. if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:26538:29: [3] (random) setstate: 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. } else if (!setstate || PyErr_Occurred()) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:26558:16: [3] (random) setstate: 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. Py_XDECREF(setstate); data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:26244:18: [3] (random) setstate: 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. if (!setstate) PyErr_Clear(); data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:26245:18: [3] (random) setstate: 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. if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:26245:58: [3] (random) setstate: 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. if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:26266:16: [3] (random) setstate: 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. Py_XDECREF(setstate); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DCTools/Object3DCTools.c:1661: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(colorArrayGL, (pc+(4*indexOffset)), (4*index)); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DCTools/Object3DCTools.c:1677: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(colorArrayGL, (pc+(4*indexOffset)), (4*index)); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:408:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ascii_chars[128]; data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:11507:27: [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. __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:12889: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(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:12912: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(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:13350: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(__pyx_v_result, __pyx_v_src->data, __pyx_v_size); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:13980: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(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:14470: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(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:17208: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 msg[200]; data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:18946: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 ctversion[4], rtversion[4]; data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:18950:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char message[200]; data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:18989: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 warning[200]; data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:408:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ascii_chars[128]; data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:11507:27: [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. __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:12889: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(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:12912: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(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:13350: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(__pyx_v_result, __pyx_v_src->data, __pyx_v_size); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:13980: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(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:14470: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(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:17208: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 msg[200]; data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:18946: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 ctversion[4], rtversion[4]; data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:18950:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char message[200]; data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:18989: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 warning[200]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:732:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ascii_chars[128]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:17160:27: [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. __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset); data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:18901:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent))); data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:18933:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:19438:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:20186:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim))); data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:20791:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:23320: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(&(__pyx_memoryview_thread_locks[0]), __pyx_t_3, sizeof(__pyx_memoryview_thread_locks[0]) * (8)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:25098: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 msg[200]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:26005: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 warning[200]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:28115: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 ctversion[4], rtversion[4]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:28119:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char message[200]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/locale_management.c:64: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 localeBuffer[21]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfdata.c:198:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char strval[100]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfdata.c:208: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 localeBuffer[21]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfdata.c:231:15: [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[i],sf->data[i],sizeof(double) * dinfo[COL]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfdata.c:407:15: [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(dataline,valline,sizeof(double) * cols); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfdata.c:440:15: [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(sf->data[i],data[i],sizeof(double) * dinfo[COL]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfdata.c:461: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(sf->data[i],data[i],sizeof(double) * dinfo[COL]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfdata.c:583: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(datarow,data[selection],sizeof(double) * dinfo[COL]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfdata.c:679:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char oneline[300]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c:145: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(ret_line,ptr,sizeof(char) * length ); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c:183:14: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). col = atol( buf ); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c:317:15: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). epoch = atol( buf ); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c:504: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( title, line, sizeof(char) * i ); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c:717:13: [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 char linebuf[5000]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c:788: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( ret, line, sizeof(char) * ( 1 + strlen( line )) ); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfindex.c:196: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(arr,indexes,sizeof(long) * i); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfindex.c:317: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(*scan_list,list, i * sizeof(long)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:225:11: [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(name,SF_OPENFLAG); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:563:16: [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). if ((sfi = open(idxname,SF_OPENFLAG)) == -1) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:576: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 buffer[200]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:604: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(cursor,&filecurs,sizeof(SfCursor)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:628:16: [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). if ((fdi = open(idxname,O_CREAT | O_WRONLY,SF_UMASK)) == -1) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:796: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 buffer[50]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:797: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 buffer2[50]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:815:25: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). scan->scan_no = atol(buffer2); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:149:19: [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. label = (char *)strdup(labels[selection]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:183:13: [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 char tmplab[40]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:280:29: [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. sf->labels[i] = (char *) strdup(labarr[i]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:321:13: [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 char tmpmot[40]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:406:31: [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. sf->motor_names[i] = (char *)strdup(motarr[i]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:453:19: [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. motor = (char *)strdup(motors[selection]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:472:13: [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 char posstr[40]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:483: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 localeBuffer[21]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:561: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(sf->motor_pos,pos,motct * sizeof(double)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:567: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(posarr,pos,motct * sizeof(double)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflists.c:114: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(newobj, object, size); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfmca.c:159:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char strval[100]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfmca.c:170: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 localeBuffer[21]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sftools.c:495: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(ret, tmpret, i * sizeof(double) ); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfwrite.c:518:21: [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). if ( (output = open(name, O_CREAT | O_RDWR | O_APPEND, SF_UMASK )) == (int)NULL ) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py.c:737: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(PyArray_DATA(r_array),data,PyArray_NBYTES(r_array)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py.c:776: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(PyArray_DATA(r_array),data,PyArray_NBYTES(r_array)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py.c:1185: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(PyArray_DATA(r_array),mcadata,PyArray_NBYTES(r_array)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py.c:1294: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(PyArray_DATA(r_array),data,PyArray_NBYTES(r_array)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py.c:1510:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[30]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py.c:1511:13: [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 char str[50000]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py.c:1516:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%d",(int) nolist[0]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py.c:1528:16: [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,":%d,%d",(int) nolist[this-1],(int) nolist[this]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py.c:1531:16: [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,",%d",(int) nolist[this]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py.c:1539:12: [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,":%d",(int) nolist[howmany-1]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c:536: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(PyArray_DATA(r_array), data, PyArray_NBYTES(r_array)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c:641: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(PyArray_DATA(r_array),data,PyArray_NBYTES(r_array)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c:680: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(PyArray_DATA(r_array),data,PyArray_NBYTES(r_array)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c:1089: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(PyArray_DATA(r_array),mcadata,PyArray_NBYTES(r_array)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c:1320:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[30]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c:1321:13: [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 char str[50000]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c:1326:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%d",(int) nolist[0]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c:1338:16: [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,":%d,%d",(int) nolist[this-1],(int) nolist[this]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c:1341:16: [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,",%d",(int) nolist[this]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/specfile_py3.c:1349:12: [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,":%d",(int) nolist[howmany-1]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Include/spec_shm.h:99:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[NAME_LENGTH]; /* name of spec variable */ data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Include/spec_shm.h:100: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 spec_version[NAME_LENGTH]; /* name of spec process */ data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Include/spec_shm.h:119: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 pad[256]; /* space to expand */ data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Include/spec_shm.h:120: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 info[INFO_LENGTH]; /* arbitrary info */ data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Include/spec_shm.h:135: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 pad[SHM_OHEAD_SIZE]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Include/spec_shm.h:143: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 pad[SHM_HEAD_SIZE]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:320: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 version_buf[512]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:528: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 *p, buf[256]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:721: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 spec_name[512]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:928: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(t, f, np * typedsize(ft)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:1930: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((char *) (private_shm->shm) + sh->meta_start, meta, len); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:1977: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, (char *) (private_shm->shm) + sh->meta_start, size); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2043: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(private_shm->private_info_copy, sh->info, sizeof(sh->info)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2071: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 id[SHM_MAX_STR_LEN + 1]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2072:10: [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 char value[SHM_MAX_STR_LEN + 1]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2076: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 strange[SHM_MAX_STR_LEN + 1]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2132: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 id[SHM_MAX_STR_LEN + 1]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2136: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 strange[SHM_MAX_STR_LEN + 1]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2191: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 dummy[2]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2237: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 id[SHM_MAX_STR_LEN + 1], value[SHM_MAX_STR_LEN + 1], data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2938: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 buf[256]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2939: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 buf1[256],buf2[256], buf3[256], buf4[256]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps_lut.c:1410: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 (palette, palend, newsize / 3); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/spslut_py.c:245: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(as_pointer, as_r, as_dim[0] * as_dim[1]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/spslut_py.c:365: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(as_pointer, as_r, as_dim[0] * as_dim[1]); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/fitting/specfit/SpecfitFuns.c:335: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(PyArray_DATA(ret), PyArray_DATA(iarray), PyArray_DIMS(iarray)[0] * sizeof(double)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/fitting/specfit/SpecfitFuns.c:380: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(PyArray_DATA(iarray), PyArray_DATA(ret), PyArray_DIMS(iarray)[0] * sizeof(double)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/fitting/specfit/SpecfitFuns.c:394:13: [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(PyArray_DATA(iarray), PyArray_DATA(ret), PyArray_DIMS(iarray)[0] * sizeof(double)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/fitting/specfit/SpecfitFuns.c:435: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(PyArray_DATA(ret), PyArray_DATA(iarray), PyArray_DIMS(iarray)[0] * sizeof(double)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/fitting/specfit/SpecfitFuns.c:455: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(PyArray_DATA(iarray), PyArray_DATA(ret), PyArray_DIMS(iarray)[0] * sizeof(double)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/fitting/specfit/SpecfitFuns.c:482: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(PyArray_DATA(iarray), PyArray_DATA(ret), PyArray_DIMS(iarray)[0] * sizeof(double)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/fitting/specfit/SpecfitFuns.c:4110: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(data, output, n * sizeof(double)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:741:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ascii_chars[128]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:18020:27: [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. __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:19788:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent))); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:19820:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:20328:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:21088:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim))); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:21693:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:24102: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(&(__pyx_memoryview_thread_locks[0]), __pyx_t_4, sizeof(__pyx_memoryview_thread_locks[0]) * (8)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:25538: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 msg[200]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:26570: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 warning[200]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:27344: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(meth->func.defaults, func->func.defaults, func->func.defaults_size); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:30343: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 ctversion[4], rtversion[4]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:30347:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char message[200]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:731:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ascii_chars[128]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:17467:27: [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. __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset); data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:19208:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent))); data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:19240:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:19745:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:20493:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim))); data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:21098:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:23458: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(&(__pyx_memoryview_thread_locks[0]), __pyx_t_2, sizeof(__pyx_memoryview_thread_locks[0]) * (8)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:23978: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 msg[200]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:26278: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 warning[200]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:27976: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 ctversion[4], rtversion[4]; data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:27980:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char message[200]; data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/Object3DQhull.c:579:46: [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 PyUnicode_DecodeASCII(qh_version, strlen(qh_version), NULL); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:122:55: [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). #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:453:52: [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). __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:5866:69: [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). __pyx_t_4 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:5902:69: [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). __pyx_t_3 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:7710:19: [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). __pyx_t_7 = strlen(__pyx_v_self->view.format); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:13502:66: [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). __pyx_t_1 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:13579:68: [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). __pyx_t_2 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:17445:18: [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(cstring); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull32.c:19242:53: [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 __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:122:55: [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). #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:453:52: [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). __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:5866:69: [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). __pyx_t_4 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:5902:69: [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). __pyx_t_3 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:7710:19: [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). __pyx_t_7 = strlen(__pyx_v_self->view.format); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:13502:66: [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). __pyx_t_1 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:13579:68: [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). __pyx_t_2 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:17445:18: [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(cstring); data/pymca-5.6.0+dfsg/PyMca5/Object3D/Object3DQhull/_qhull/_qhull64.c:19242:53: [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 __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:656:87: [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). #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:777:52: [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). __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:10136: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). __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 249, __pyx_L1_error) data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:10180: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). __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 251, __pyx_L1_error) data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:12709:20: [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). __pyx_t_10 = strlen(__pyx_v_self->view.format); data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:19609:53: [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). __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1259, __pyx_L1_error) data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:19701:55: [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). __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1264, __pyx_L1_error) data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:25402:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t slen = strlen(cstring); data/pymca-5.6.0+dfsg/PyMca5/PyMcaGraph/ctools/_ctools/cython/default/_ctools.c:28163:65: [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 __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c:583: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). if ( string == (char *) NULL || strlen(string) == 0) data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c:603: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). for ( j=0; j < strlen(string) && ptr+j< to;j++) data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c:605:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( j == strlen(string)) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c:623: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). for ( j=0; j < strlen(string) && (ptr + j) < to;j++) data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c:625: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). if ( j == strlen(string)) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c:771:14: [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). line += strlen( word ); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c:781:49: [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). ret = (char *)malloc( sizeof(char) * ( 1 + strlen( line )) ); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfheader.c:788:46: [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( ret, line, sizeof(char) * ( 1 + strlen( line )) ); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfindex.c:486:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nbytes = read(sf->fd,buffer,size); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:506:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((bytesread = read(fd,buffer,size)) > 0 ) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:557:18: [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). namelength = strlen(sf->sfname) + strlen(SF_ISFX) + 1; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:557: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). namelength = strlen(sf->sfname) + strlen(SF_ISFX) + 1; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:585:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytesread = read(sfi,buffer,sizeof(SF_SIGNATURE)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:593:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( read(sfi,&mtime, sizeof(long)) == 0) return(SF_INIT); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:594:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( read(sfi,&filecurs, sizeof(SfCursor)) == 0) return(SF_INIT); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:598:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(read(sfi,&scan, sizeof(SpecScan))) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:621:18: [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). namelength = strlen(sf->sfname) + strlen(SF_ISFX) + 1; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:621: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). namelength = strlen(sf->sfname) + strlen(SF_ISFX) + 1; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sfinit.c:808:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(sf->fd,buffer,sizeof(buffer)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:242:25: [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). while((ptr < buf + strlen(buf) -1) && (*ptr == ' ')) ptr++; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:244: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). for (i=0;ptr < buf + strlen(buf) -1;ptr++,i++) { data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:255:48: [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). for(;*(ptr+1) == ' ' && ptr < buf+strlen(buf)-1;ptr++); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:367:32: [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). endline = thisline + strlen(thisline); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sflabel.c:524:32: [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). endline = thisline + strlen(thisline); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sftools.c:154:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nbytes = read(sf->fd,sf->scanbuffer,scan->size); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/specfile/src/sftools.c:190:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nbytes = read(sf->fd,sf->filebuffer,fileheadsize); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:301:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = (int) strlen(version) + 10; data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2009:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sh->info, info, sizeof(sh->info)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2261: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). if ((int)(strlen(identifier) + strlen (value) + 2) > cols || data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2261:34: [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 ((int)(strlen(identifier) + strlen (value) + 2) > cols || data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:2283:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(data + cols * use_row, "="); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/sps.c:3077:3: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/spslut_py.c:90:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(mode) * xsize * ysize); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/spslut_py.c:93:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(mode) * xsize * ysize); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/spslut_py.c:234:15: [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). as_dim[0] = strlen(mode); data/pymca-5.6.0+dfsg/PyMca5/PyMcaIO/sps/Src/spslut_py.c:354:15: [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). as_dim[0] = strlen(mode); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:665:87: [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). #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:786:52: [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). __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:10875: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). __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 249, __pyx_L1_error) data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:10919: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). __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 251, __pyx_L1_error) data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:13493:20: [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). __pyx_t_10 = strlen(__pyx_v_self->view.format); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:20505:53: [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). __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1258, __pyx_L1_error) data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:20600:55: [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). __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1263, __pyx_L1_error) data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:26126:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t slen = strlen(cstring); data/pymca-5.6.0+dfsg/PyMca5/PyMcaMath/mva/_cython_kmeans/default/kmeans.c:30391:65: [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 __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:655:87: [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). #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:776:52: [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). __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:10443: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). __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 249, __pyx_L1_error) data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:10487: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). __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 251, __pyx_L1_error) data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:13016:20: [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). __pyx_t_10 = strlen(__pyx_v_self->view.format); data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:19916:53: [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). __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1259, __pyx_L1_error) data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:20008:55: [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). __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1264, __pyx_L1_error) data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:25817:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t slen = strlen(cstring); data/pymca-5.6.0+dfsg/PyMca5/PyMcaPhysics/xas/_xas/cython/default/_xas.c:28024:65: [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 __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); ANALYSIS SUMMARY: Hits = 295 Lines analyzed = 155266 in approximately 4.22 seconds (36800 lines/second) Physical Source Lines of Code (SLOC) = 96202 Hits@level = [0] 268 [1] 82 [2] 153 [3] 13 [4] 47 [5] 0 Hits@level+ = [0+] 563 [1+] 295 [2+] 213 [3+] 60 [4+] 47 [5+] 0 Hits/KSLOC@level+ = [0+] 5.85227 [1+] 3.06646 [2+] 2.21409 [3+] 0.623688 [4+] 0.488555 [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.