filename
stringlengths 5
36
| vulnerability
stringclasses 43
values | description
stringclasses 56
values | insecure_code
stringlengths 11
347
|
---|---|---|---|
rtpdec_amr.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(value, "1"); |
rtsp.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(real_challenge, reply->real_challenge); |
samples.c | c.lang.security.use-after-free.use-after-free | Variable 'sample' was used after being freed. This can lead to undefined behavior. | sample->sample_id, sample ); ); |
samples.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strncpy( sample->name, client->proto_data + 3 * sizeof(int), ESD_NAME_MAX ); |
saving.h | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(header.signature, FLANN_SIGNATURE_); |
saving.h | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(header.version, FLANN_VERSION_); |
seek_test.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(buffer, " NOPTS "); |
setrom.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strncpy(dir.textual_leafs[0], "Kino Rocks! ", i); |
sndfile-convert.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strncpy (buffer, cptr + 1, 15) ; |
sndfile.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strncpy (buffer, cptr, sizeof (buffer)) ; |
strdup.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(outStr, inStr); |
string_test.c | c.lang.security.insecure-use-printf-fn.insecure-use-printf-fn | Avoid using user-controlled format strings passed into 'sprintf', 'printf' and 'vsprintf'. These functions put you at risk of buffer overflow vulnerabilities through the use of format string exploits. Instead, use 'snprintf' and 'vsnprintf'. | printf ("Mono : * No '%s' test defined.\n", argv [1]) ; |
strings.c | c.lang.security.insecure-use-strcat-fn.insecure-use-strcat-fn | Finding triggers whenever there is a strcat or strncat used. This is an issue because strcat or strncat can lead to buffer overflow vulns. Fix this by using strcat_s instead. | strncat (psf->str_end, lsf_name, len_remaining) ; |
strings.c | c.lang.security.insecure-use-strcat-fn.insecure-use-strcat-fn | Finding triggers whenever there is a strcat or strncat used. This is an issue because strcat or strncat can lead to buffer overflow vulns. Fix this by using strcat_s instead. | strncat (psf->str_end, bracket_name, len_remaining) ; |
svgfig.py | python.lang.security.use-defused-xml.use-defused-xml | The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. | from xml.sax import handler, make_parser |
svgfig.py | python.lang.security.use-defused-xml.use-defused-xml | The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. | from xml.sax.handler import feature_namespaces, feature_external_ges, feature_external_pes |
svgfig.py | python.lang.security.audit.eval-detected.eval-detected | Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources. | output = eval("lambda %s, %s: (%s)" % (vars[0], vars[1], expr), g, locals) |
svgfig.py | python.lang.security.audit.eval-detected.eval-detected | Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources. | output = eval("lambda %s: (%s)" % (vars[0], expr), g, locals) |
svgfig.py | python.lang.security.audit.eval-detected.eval-detected | Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources. | output = eval("lambda %s: (%s)" % (var, expr), g, locals) |
svgfig.py | python.lang.security.audit.eval-detected.eval-detected | Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources. | output = eval("lambda %s: (%s, %s)" % (var, var, expr), g, locals) |
svgfig.py | python.lang.security.audit.eval-detected.eval-detected | Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources. | uniout += eval("u\"\\u%x\"" % (0x2070 + ord(n) - ord(u"0"))) |
test.py | python.lang.security.audit.dynamic-urllib-use-detected.dynamic-urllib-use-detected | Detected a dynamic value being used with urllib. urllib supports 'file://' schemes, so a dynamic value controlled by a malicious actor may allow them to read arbitrary files. Audit uses of urllib calls to ensure user data cannot control the URLs, or consider using the 'requests' library instead. | filedata = urllib.urlopen("https://code.ros.org/svn/opencv/trunk/opencv/" + filename).read() |
test.py | python.lang.security.audit.eval-detected.eval-detected | Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources. | cv.CvtColor(src3, dst8u[3], eval("cv.CV_%s2%s" % (srcf, dstf))) |
test.py | python.lang.security.audit.eval-detected.eval-detected | Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources. | cv.CvtColor(src3, dst32f[3], eval("cv.CV_%s2%s" % (srcf, dstf))) |
test.py | python.lang.security.audit.eval-detected.eval-detected | Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources. | cv.CvtColor(src3, dst8u[3], eval("cv.CV_%s2%s" % (dstf, srcf))) |
test.py | python.lang.security.audit.eval-detected.eval-detected | Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources. | cv.CvtColor(src1, dst8u[3], eval("cv.CV_%s2%s" % (srcf, dstf))) |
test.py | python.lang.security.audit.dynamic-urllib-use-detected.dynamic-urllib-use-detected | Detected a dynamic value being used with urllib. urllib supports 'file://' schemes, so a dynamic value controlled by a malicious actor may allow them to read arbitrary files. Audit uses of urllib calls to ensure user data cannot control the URLs, or consider using the 'requests' library instead. | urllib.urlretrieve("http://pr.willowgarage.com/data/camera_calibration/camera_calibration.tar.gz", "camera_calibration.tar.gz") |
test.py | python.lang.security.audit.eval-detected.eval-detected | Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources. | print "int32 CV_%s=%d" % (nm, eval("cv.CV_%s" % nm)) |
test.py | python.lang.security.audit.eval-detected.eval-detected | Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources. | shapes = [eval("cv.CV_SHAPE_%s" % s) for s in ['RECT', 'CROSS', 'ELLIPSE']] |
test.py | python.lang.security.audit.eval-detected.eval-detected | Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources. | cv.MorphologyEx(im, dst, temp, e, eval("cv.CV_MOP_%s" % op), iter) |
test_file_io.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strncpy (psf->filename, filename, sizeof (psf->filename)) ; |
tif_apple.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy((char*) pname, name); |
tif_compress.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(cd->info->name, name); |
tif_extension.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(link->name, name); |
tif_open.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(tif->tif_name, name); |
tif_win3.c | c.lang.security.insecure-use-strcat-fn.insecure-use-strcat-fn | Finding triggers whenever there is a strcat or strncat used. This is an issue because strcat or strncat can lead to buffer overflow vulns. Fix this by using strcat_s instead. | strcat(strcpy(e, module), ":"); |
tif_win3.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcat(strcpy(e, module), ":"); |
tif_win3.c | c.lang.security.insecure-use-strcat-fn.insecure-use-strcat-fn | Finding triggers whenever there is a strcat or strncat used. This is an issue because strcat or strncat can lead to buffer overflow vulns. Fix this by using strcat_s instead. | strcat(e, "."); |
tiff2ps.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | (void)strcpy(im_x, "0"); |
tiff2ps.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | (void)strcpy(im_x, "im_x neg"); |
tiff2ps.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | (void)strcpy(im_h, "im_h"); |
tiffsplit.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(fname, argv[2]); |
tiffsplit.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(path, fname); |
tiffsplit.c | c.lang.security.insecure-use-strcat-fn.insecure-use-strcat-fn | Finding triggers whenever there is a strcat or strncat used. This is an issue because strcat or strncat can lead to buffer overflow vulns. Fix this by using strcat_s instead. | strcat(path, ".tif"); |
toolame.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strncpy (inPath, argv[i], MAX_NAME_SIZE); |
toolame.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strncpy (outPath, argv[i], MAX_NAME_SIZE); |
toolame.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy (inPath, argv[i]); |
toolame.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy (outPath, argv[i]); |
udta.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(*string, new_string); |
url.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(merged_path, base_path); |
url.c | c.lang.security.insecure-use-strcat-fn.insecure-use-strcat-fn | Finding triggers whenever there is a strcat or strncat used. This is an issue because strcat or strncat can lead to buffer overflow vulns. Fix this by using strcat_s instead. | strcat(merged_path, path); |
url.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(&p[i+1], p[j] ? &p[j+1] : &p[j]); |
url.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(&p[i+1], p[j+3] ? &p[j+4] : &p[j+3]); |
url.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strncpy(*scheme, url, p - url); |
url.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strncpy(*host, url, q - url); |
utf8.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(s, from); |
util.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(p, s); |
vlc.c | c.lang.security.double-free.double-free | Variable 'vlce' was freed twice. This can lead to undefined behavior. | free( vlce ); |
vorbis_interface.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(comment,"TITLE="); |
vorbis_interface.c | c.lang.security.insecure-use-strcat-fn.insecure-use-strcat-fn | Finding triggers whenever there is a strcat or strncat used. This is an issue because strcat or strncat can lead to buffer overflow vulns. Fix this by using strcat_s instead. | strncat(comment,gfp->tag_spec.title,MAX_COMMENT_LENGTH-strlen(comment)); |
vorbis_interface.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(comment,"ARTIST="); |
vorbis_interface.c | c.lang.security.insecure-use-strcat-fn.insecure-use-strcat-fn | Finding triggers whenever there is a strcat or strncat used. This is an issue because strcat or strncat can lead to buffer overflow vulns. Fix this by using strcat_s instead. | strncat(comment,gfp->tag_spec.artist,MAX_COMMENT_LENGTH-strlen(comment)); |
vorbis_interface.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(comment,"ALBUM="); |
vorbis_interface.c | c.lang.security.insecure-use-strcat-fn.insecure-use-strcat-fn | Finding triggers whenever there is a strcat or strncat used. This is an issue because strcat or strncat can lead to buffer overflow vulns. Fix this by using strcat_s instead. | strncat(comment,gfp->tag_spec.album,MAX_COMMENT_LENGTH-strlen(comment)); |
vorbis_interface.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(comment,"DESCRIPTION="); |
vorbis_interface.c | c.lang.security.insecure-use-strcat-fn.insecure-use-strcat-fn | Finding triggers whenever there is a strcat or strncat used. This is an issue because strcat or strncat can lead to buffer overflow vulns. Fix this by using strcat_s instead. | strncat(comment,gfp->tag_spec.comment,MAX_COMMENT_LENGTH-strlen(comment)); |
walloc.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(t,s); |
write_read_test.c | c.lang.security.insecure-use-printf-fn.insecure-use-printf-fn | Avoid using user-controlled format strings passed into 'sprintf', 'printf' and 'vsprintf'. These functions put you at risk of buffer overflow vulnerabilities through the use of format string exploits. Instead, use 'snprintf' and 'vsnprintf'. | printf ("Mono : * No '%s' test defined.\n", argv [1]) ; |
wrjpgcom.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(comment_arg, argv[argn]+1); |
wrjpgcom.c | c.lang.security.insecure-use-strcat-fn.insecure-use-strcat-fn | Finding triggers whenever there is a strcat or strncat used. This is an issue because strcat or strncat can lead to buffer overflow vulns. Fix this by using strcat_s instead. | strcat(comment_arg, " "); |
wrjpgcom.c | c.lang.security.insecure-use-strcat-fn.insecure-use-strcat-fn | Finding triggers whenever there is a strcat or strncat used. This is an issue because strcat or strncat can lead to buffer overflow vulns. Fix this by using strcat_s instead. | strcat(comment_arg, argv[argn]); |
xtiff.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(buffer, fileName); |
yuv2mov.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(filename, argv[i]); |
yuvinactive.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strncpy(area, optarg, 20); /* This part shows how to process */ |
yuvinactive.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strncpy(area, optarg, 20); |
exec.js | javascript.lang.security.detect-child-process.detect-child-process | Detected calls to child_process from a function argument `cmd`. This could lead to a command injection if the input is user controllable. Try to avoid calls to child_process, and if it is needed ensure user input is correctly sanitized or sandboxed. | var c = child.exec(cmd, {env: process.env, maxBuffer: 20*1024*1024}, function(err) { |
legacy.js | javascript.lang.security.audit.unknown-value-with-script-tag.unknown-value-with-script-tag | Cannot determine what 'fixture' is and it is used with a '<script>' tag. This could be susceptible to cross-site scripting (XSS). Ensure 'fixture' is not externally controlled, or sanitize this data. | getOuterHTML(fixture[1]), |
legacy.js | javascript.lang.security.audit.unknown-value-with-script-tag.unknown-value-with-script-tag | Cannot determine what 'fixture' is and it is used with a '<script>' tag. This could be susceptible to cross-site scripting (XSS). Ensure 'fixture' is not externally controlled, or sanitize this data. | getInnerHTML(fixture[1]), |
tap-runner.js | javascript.lang.security.detect-child-process.detect-child-process | Detected calls to child_process from a function argument `f`. This could lead to a command injection if the input is user controllable. Try to avoid calls to child_process, and if it is needed ensure user input is correctly sanitized or sandboxed. | var cp = child_process.spawn(cmd, args, { env: env, cwd: relDir }) |
MessageListenerService.java | java.lang.security.audit.crypto.weak-random.weak-random | Detected use of the functions `Math.random()` or `java.util.Random()`. These are both not cryptographically strong random number generators (RNGs). If you are using these RNGs to create passwords or secret tokens, use `java.security.SecureRandom` instead. | notificationManager.notify(new Random().nextInt(), notification); |
AbstractHttpApi.java | java.lang.security.audit.crypto.ssl.defaulthttpclient-is-deprecated.defaulthttpclient-is-deprecated | DefaultHttpClient is deprecated. Further, it does not support connections using TLS1.2, which makes using DefaultHttpClient a security hazard. Use HttpClientBuilder instead. | return new DefaultHttpClient(ccm, httpParams); |
RemoteResourceFetcher.java | java.lang.security.audit.crypto.ssl.defaulthttpclient-is-deprecated.defaulthttpclient-is-deprecated | DefaultHttpClient is deprecated. Further, it does not support connections using TLS1.2, which makes using DefaultHttpClient a security hazard. Use HttpClientBuilder instead. | return new DefaultHttpClient(ccm, params); |
common.py | python.lang.security.use-defused-xml.use-defused-xml | The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. | from xml.dom import minidom |
common.py | python.lang.security.use-defused-xml.use-defused-xml | The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. | from xml.dom import pulldom |
gen_class.py | python.lang.security.use-defused-xml.use-defused-xml | The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. | from xml.dom import pulldom |
gen_parser.py | python.lang.security.use-defused-xml.use-defused-xml | The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. | from xml.dom import pulldom |
oget.py | python.lang.security.use-defused-xml.use-defused-xml | The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. | from xml.dom import pulldom |
oget.py | python.lang.security.use-defused-xml.use-defused-xml | The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. | from xml.dom import minidom |
client.rb | ruby.lang.security.weak-hashes-sha1.weak-hashes-sha1 | Should not use SHA1 to generate hashes. There is a proven SHA1 hash collision by Google, which could lead to vulnerabilities. Use SHA256, SHA3 or other hashing functions instead. | self_signature = Digest::SHA1.hexdigest(response.body + Fyber.config.api_key) |
fyber.rb | ruby.lang.security.weak-hashes-sha1.weak-hashes-sha1 | Should not use SHA1 to generate hashes. There is a proven SHA1 hash collision by Google, which could lead to vulnerabilities. Use SHA256, SHA3 or other hashing functions instead. | Digest::SHA1.hexdigest(encoded) |
app.rb | ruby.lang.security.unprotected-mass-assign.mass-assignment-vuln | Checks for calls to without_protection during mass assignment (which allows record creation from hash values). This can lead to users bypassing permissions protections. For Rails 4 and higher, mass protection is on by default. Fix: Don't use :without_protection => true. Instead, configure attr_accessible to control attribute access. | @issue = Issue.new params[:issue] |
diff.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(fileSto,opt.file1); |
diff.c | c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn | Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by using strcpy_s instead (although note that strcpy_s is an optional part of the C11 standard, and so may not be available). | strcpy(fileSto+len1-4,strX); |
options.html | generic.html-templates.security.unquoted-attribute-var.unquoted-attribute-var | Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". | <textarea id="textarea_{{x.id}}" class="form-control" ng-model="x.option_text" ng-change="record_change(x.id)" rows="3" {{$last?'autofocus':''}}>{{x.option_text}}</textarea> |
Subsets and Splits