Dataset Viewer
Auto-converted to Parquet
instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
void SkPath::dump(SkWStream* wStream, bool forceClose, bool dumpAsHex) const { SkScalarAsStringType asType = dumpAsHex ? kHex_SkScalarAsStringType : kDec_SkScalarAsStringType; Iter iter(*this, forceClose); SkPoint pts[4]; Verb verb; if (!wStream) { SkDebugf("path: forceClose=%s\n", forceClose ? "true" : "false"); } SkString builder; while ((verb = iter.next(pts, false)) != kDone_Verb) { switch (verb) { case kMove_Verb: append_params(&builder, "path.moveTo", &pts[0], 1, asType); break; case kLine_Verb: append_params(&builder, "path.lineTo", &pts[1], 1, asType); break; case kQuad_Verb: append_params(&builder, "path.quadTo", &pts[1], 2, asType); break; case kConic_Verb: append_params(&builder, "path.conicTo", &pts[1], 2, asType, iter.conicWeight()); break; case kCubic_Verb: append_params(&builder, "path.cubicTo", &pts[1], 3, asType); break; case kClose_Verb: builder.append("path.close();\n"); break; default: SkDebugf(" path: UNKNOWN VERB %d, aborting dump...\n", verb); verb = kDone_Verb; // stop the loop break; } if (!wStream && builder.size()) { SkDebugf("%s", builder.c_str()); builder.reset(); } } if (wStream) { wStream->writeText(builder.c_str()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: SkPath::dump File: src/core/SkPath.cpp Repository: skia The code follows secure coding practices.
[ "CWE-19" ]
CVE-2016-7395
MEDIUM
6.8
skia
SkPath::dump
src/core/SkPath.cpp
276e63361c73fed6c6528b322400ece81fd1d067
0
Analyze the following code function for security vulnerabilities
BOOL license_read_license_request_packet(rdpLicense* license, wStream* s) { /* ServerRandom (32 bytes) */ if (Stream_GetRemainingLength(s) < 32) return FALSE; Stream_Read(s, license->ServerRandom, 32); /* ProductInfo */ if (!license_read_product_info(s, license->ProductInfo)) return FALSE; /* KeyExchangeList */ if (!license_read_binary_blob(s, license->KeyExchangeList)) return FALSE; /* ServerCertificate */ if (!license_read_binary_blob(s, license->ServerCertificate)) return FALSE; /* ScopeList */ if (!license_read_scope_list(s, license->ScopeList)) return FALSE; /* Parse Server Certificate */ if (!certificate_read_server_certificate(license->certificate, license->ServerCertificate->data, license->ServerCertificate->length) < 0) return FALSE; license_generate_keys(license); license_generate_hwid(license); license_encrypt_premaster_secret(license); #ifdef WITH_DEBUG_LICENSE fprintf(stderr, "ServerRandom:\n"); winpr_HexDump(license->ServerRandom, 32); fprintf(stderr, "\n"); license_print_product_info(license->ProductInfo); fprintf(stderr, "\n"); license_print_scope_list(license->ScopeList); fprintf(stderr, "\n"); #endif return TRUE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: license_read_license_request_packet File: libfreerdp/core/license.c Repository: FreeRDP The code follows secure coding practices.
[ "CWE-189" ]
CVE-2014-0791
MEDIUM
6.8
FreeRDP
license_read_license_request_packet
libfreerdp/core/license.c
e2745807c4c3e0a590c0f69a9b655dc74ebaa03e
0
Analyze the following code function for security vulnerabilities
void PackVmlinuxARMEB::buildLoader(const Filter *ft) { // prepare loader initLoader(stub_armeb_v5a_linux_kernel_vmlinux, sizeof(stub_armeb_v5a_linux_kernel_vmlinux)); addLoader("LINUX000", NULL); if (ft->id) { assert(ft->calls > 0); addLoader("LINUX010", NULL); } addLoader("LINUX020", NULL); if (ft->id) { addFilter32(ft->id); } addLoader("LINUX030", NULL); if (ph.method == M_NRV2E_8) addLoader("NRV2E", NULL); else if (ph.method == M_NRV2B_8) addLoader("NRV2B", NULL); else if (ph.method == M_NRV2D_8) addLoader("NRV2D", NULL); else if (M_IS_LZMA(ph.method)) addLoader("LZMA_ELF00,LZMA_DEC10,LZMA_DEC30", NULL); else throwBadLoader(); addLoader("IDENTSTR,UPX1HEAD", NULL); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: PackVmlinuxARMEB::buildLoader File: src/p_vmlinx.cpp Repository: upx The code follows secure coding practices.
[ "CWE-190" ]
CVE-2019-14295
MEDIUM
4.3
upx
PackVmlinuxARMEB::buildLoader
src/p_vmlinx.cpp
6a53c0b3d499d62346a5c51034db543a4ef78ea3
0
Analyze the following code function for security vulnerabilities
explicit HitCollector_c ( SnippetsDocIndex_c & tContainer, ISphTokenizer * pTokenizer, CSphDict * pDict, const ExcerptQuery_t & tQuery, const CSphIndexSettings & tSettingsIndex, const char * sDoc, int iDocLen, CacheStreamer_c & tTokenContainer ) : TokenFunctorTraits_c ( tContainer, pTokenizer, pDict, tQuery, tSettingsIndex, sDoc, iDocLen ) , m_uFoundWords ( 0 ) , m_tTokenContainer ( tTokenContainer ) { strncpy ( (char *)m_sTmpWord, MAGIC_WORD_SENTENCE, sizeof(m_sTmpWord)-1 ); m_uSentenceID = pDict->GetWordID ( m_sTmpWord ); strncpy ( (char *)m_sTmpWord, MAGIC_WORD_PARAGRAPH, sizeof(m_sTmpWord)-1 ); m_uParagraphID = pDict->GetWordID ( m_sTmpWord ); m_tContainer.SetupHits(); m_bCollectExtraZoneInfo = true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: HitCollector_c File: src/sphinxexcerpt.cpp Repository: manticoresoftware/manticoresearch The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-29050
MEDIUM
5
manticoresoftware/manticoresearch
HitCollector_c
src/sphinxexcerpt.cpp
6e597ff61e1e910559f6ed541ff32520085af6aa
0
Analyze the following code function for security vulnerabilities
void CLASS processNikonLensData (uchar *LensData, unsigned len) { ushort i; if (!(imgdata.lens.nikon.NikonLensType & 0x01)) { imgdata.lens.makernotes.LensFeatures_pre[0] = 'A'; imgdata.lens.makernotes.LensFeatures_pre[1] = 'F'; } else { imgdata.lens.makernotes.LensFeatures_pre[0] = 'M'; imgdata.lens.makernotes.LensFeatures_pre[1] = 'F'; } if (imgdata.lens.nikon.NikonLensType & 0x02) { if (imgdata.lens.nikon.NikonLensType & 0x04) imgdata.lens.makernotes.LensFeatures_suf[0] = 'G'; else imgdata.lens.makernotes.LensFeatures_suf[0] = 'D'; imgdata.lens.makernotes.LensFeatures_suf[1] = ' '; } if (imgdata.lens.nikon.NikonLensType & 0x08) { imgdata.lens.makernotes.LensFeatures_suf[2] = 'V'; imgdata.lens.makernotes.LensFeatures_suf[3] = 'R'; } if (imgdata.lens.nikon.NikonLensType & 0x10) { imgdata.lens.makernotes.LensMount = imgdata.lens.makernotes.CameraMount = LIBRAW_MOUNT_Nikon_CX; imgdata.lens.makernotes.CameraFormat = imgdata.lens.makernotes.LensFormat = LIBRAW_FORMAT_1INCH; } else imgdata.lens.makernotes.LensMount = imgdata.lens.makernotes.CameraMount = LIBRAW_MOUNT_Nikon_F; if (imgdata.lens.nikon.NikonLensType & 0x20) { strcpy(imgdata.lens.makernotes.Adapter, "FT-1"); imgdata.lens.makernotes.LensMount = LIBRAW_MOUNT_Nikon_F; imgdata.lens.makernotes.CameraMount = LIBRAW_MOUNT_Nikon_CX; imgdata.lens.makernotes.CameraFormat = LIBRAW_FORMAT_1INCH; } imgdata.lens.nikon.NikonLensType = imgdata.lens.nikon.NikonLensType & 0xdf; if (len < 20) { switch (len) { case 9: i = 2; break; case 15: i = 7; break; case 16: i = 8; break; } imgdata.lens.nikon.NikonLensIDNumber = LensData[i]; imgdata.lens.nikon.NikonLensFStops = LensData[i + 1]; imgdata.lens.makernotes.LensFStops = (float)imgdata.lens.nikon.NikonLensFStops /12.0f; if (fabsf(imgdata.lens.makernotes.MinFocal) < 1.1f) { if ((imgdata.lens.nikon.NikonLensType ^ (uchar)0x01) || LensData[i + 2]) imgdata.lens.makernotes.MinFocal = 5.0f * powf64(2.0f, (float)LensData[i + 2] / 24.0f); if ((imgdata.lens.nikon.NikonLensType ^ (uchar)0x01) || LensData[i + 3]) imgdata.lens.makernotes.MaxFocal = 5.0f * powf64(2.0f, (float)LensData[i + 3] / 24.0f); if ((imgdata.lens.nikon.NikonLensType ^ (uchar)0x01) || LensData[i + 4]) imgdata.lens.makernotes.MaxAp4MinFocal = powf64(2.0f, (float)LensData[i + 4] / 24.0f); if ((imgdata.lens.nikon.NikonLensType ^ (uchar)0x01) || LensData[i + 5]) imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(2.0f, (float)LensData[i + 5] / 24.0f); } imgdata.lens.nikon.NikonMCUVersion = LensData[i + 6]; if (i != 2) { if ((LensData[i - 1]) && (fabsf(imgdata.lens.makernotes.CurFocal) < 1.1f)) imgdata.lens.makernotes.CurFocal = 5.0f * powf64(2.0f, (float)LensData[i - 1] / 24.0f); if (LensData[i + 7]) imgdata.lens.nikon.NikonEffectiveMaxAp = powf64(2.0f, (float)LensData[i + 7] / 24.0f); } imgdata.lens.makernotes.LensID = (unsigned long long) LensData[i] << 56 | (unsigned long long) LensData[i + 1] << 48 | (unsigned long long) LensData[i + 2] << 40 | (unsigned long long) LensData[i + 3] << 32 | (unsigned long long) LensData[i + 4] << 24 | (unsigned long long) LensData[i + 5] << 16 | (unsigned long long) LensData[i + 6] << 8 | (unsigned long long) imgdata.lens.nikon.NikonLensType; } else if ((len == 459) || (len == 590)) { memcpy(imgdata.lens.makernotes.Lens, LensData + 390, 64); } else if (len == 509) { memcpy(imgdata.lens.makernotes.Lens, LensData + 391, 64); } else if (len == 879) { memcpy(imgdata.lens.makernotes.Lens, LensData + 680, 64); } return; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processNikonLensData File: internal/dcraw_common.cpp Repository: LibRaw The code follows secure coding practices.
[ "CWE-125" ]
CVE-2017-14608
MEDIUM
6.4
LibRaw
processNikonLensData
internal/dcraw_common.cpp
d13e8f6d1e987b7491182040a188c16a395f1d21
0
Analyze the following code function for security vulnerabilities
TSReturnCode TSMimeHdrFieldValueStringSet(TSMBuffer bufp, TSMLoc hdr, TSMLoc field, int idx, const char *value, int length) { // Allow to modify the buffer only // if bufp is modifiable. If bufp is not modifiable return // TS_ERROR. If allowed, return TS_SUCCESS. Changed the // return value of function from void to TSReturnCode. sdk_assert(sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS); sdk_assert((sdk_sanity_check_mime_hdr_handle(hdr) == TS_SUCCESS) || (sdk_sanity_check_http_hdr_handle(hdr) == TS_SUCCESS)); sdk_assert(sdk_sanity_check_field_handle(field, hdr) == TS_SUCCESS); sdk_assert(sdk_sanity_check_null_ptr((void *)value) == TS_SUCCESS); if (!isWriteable(bufp)) { return TS_ERROR; } if (length == -1) { length = strlen(value); } TSMimeFieldValueSet(bufp, field, idx, value, length); return TS_SUCCESS; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: TSMimeHdrFieldValueStringSet File: proxy/InkAPI.cc Repository: apache/trafficserver The code follows secure coding practices.
[ "CWE-400" ]
CVE-2018-8005
MEDIUM
5
apache/trafficserver
TSMimeHdrFieldValueStringSet
proxy/InkAPI.cc
6d248026b04d69e5c5049709c17ea671328ea4ea
0
Analyze the following code function for security vulnerabilities
CallResult<HermesValue> typedArrayPrototypeLength(void *, Runtime &runtime, NativeArgs args) { if (JSTypedArrayBase::validateTypedArray( runtime, args.getThisHandle(), false) == ExecutionStatus::EXCEPTION) { return ExecutionStatus::EXCEPTION; } auto self = args.vmcastThis<JSTypedArrayBase>(); return HermesValue::encodeNumberValue( self->attached(runtime) ? self->getLength() : 0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: typedArrayPrototypeLength File: lib/VM/JSLib/TypedArray.cpp Repository: facebook/hermes The code follows secure coding practices.
[ "CWE-416", "CWE-843" ]
CVE-2023-25933
CRITICAL
9.8
facebook/hermes
typedArrayPrototypeLength
lib/VM/JSLib/TypedArray.cpp
e6ed9c1a4b02dc219de1648f44cd808a56171b81
0
Analyze the following code function for security vulnerabilities
static int decode_gtp_mbms_time_to_data_tr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree) { guint16 length; proto_tree *ext_tree; proto_item *te; guint8 time_2_dta_tr; length = tvb_get_ntohs(tvb, offset + 1); te = proto_tree_add_text(tree, tvb, offset, 3 + length, "%s", val_to_str_ext_const(GTP_EXT_MBMS_TIME_TO_DATA_TR, &gtpv1_val_ext, "Unknown")); ext_tree = proto_item_add_subtree(te, ett_gtp_ies[GTP_EXT_MBMS_TIME_TO_DATA_TR]); offset++; proto_tree_add_item(ext_tree, hf_gtp_ext_length, tvb, offset, 2, ENC_BIG_ENDIAN); offset = offset + 2; /* TODO add decoding of data * The MBMS Time To Data Transfer is defined in 3GPP TS 23.246 [26]. * The MBMS Time To Data Transfer information element contains a * MBMS Time To Data Transfer allocated by the BM-SC. * The payload shall be encoded as per the MBMS-Time-To-Data-Transfer AVP * defined in 3GPP TS 29.061 [27], excluding the AVP Header fields * (as defined in IETF RFC 3588 [36], section 4.1). */ /* The coding is specified as per the Time to MBMS Data Transfer Value Part Coding * of the Time to MBMS Data Transfer IE in 3GPP TS 48.018 * Bits * 8 7 6 5 4 3 2 1 * 0 0 0 0 0 0 0 0 1s * 0 0 0 0 0 0 0 1 2s * 0 0 0 0 0 0 1 0 3s * : * 1 1 1 1 1 1 1 1 256s */ time_2_dta_tr = tvb_get_guint8(tvb, offset) + 1; proto_tree_add_uint(ext_tree, hf_gtp_time_2_dta_tr, tvb, offset, 1, time_2_dta_tr); return 3 + length; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: decode_gtp_mbms_time_to_data_tr File: epan/dissectors/packet-gtp.c Repository: wireshark The code follows secure coding practices.
[ "CWE-119" ]
CVE-2014-5163
MEDIUM
5
wireshark
decode_gtp_mbms_time_to_data_tr
epan/dissectors/packet-gtp.c
3fc441e7a5008640c68ec985e669d5092414a519
0
Analyze the following code function for security vulnerabilities
double yr_object_get_float( YR_OBJECT* object, const char* field, ...) { YR_OBJECT* double_obj; va_list args; va_start(args, field); if (field != NULL) double_obj = _yr_object_lookup(object, 0, field, args); else double_obj = object; va_end(args); if (double_obj == NULL) return NAN; assertf(double_obj->type == OBJECT_TYPE_FLOAT, "type of \"%s\" is not double\n", field); return ((YR_OBJECT_DOUBLE*) double_obj)->value; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: yr_object_get_float File: libyara/object.c Repository: VirusTotal/yara The code follows secure coding practices.
[ "CWE-416" ]
CVE-2017-8929
MEDIUM
5
VirusTotal/yara
yr_object_get_float
libyara/object.c
053e67e3ec81cc9268ce30eaf0d6663d8639ed1e
0
Analyze the following code function for security vulnerabilities
void io_msg_ring_cleanup(struct io_kiocb *req) { struct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg); if (WARN_ON_ONCE(!msg->src_file)) return; fput(msg->src_file); msg->src_file = NULL; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: io_msg_ring_cleanup File: io_uring/msg_ring.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-667" ]
CVE-2023-2430
MEDIUM
5.5
torvalds/linux
io_msg_ring_cleanup
io_uring/msg_ring.c
e12d7a46f65ae4b7d58a5e0c1cbfa825cf8d830d
0
Analyze the following code function for security vulnerabilities
void DffPropSet::Merge( DffPropSet& rMaster ) const { for ( void* pDummy = rMaster.First(); pDummy; pDummy = rMaster.Next() ) { sal_uInt32 nRecType = rMaster.GetCurKey(); if ( ( nRecType & 0x3f ) == 0x3f ) // this is something called FLAGS { sal_uInt32 nCurrentFlags = mpContents[ nRecType ]; sal_uInt32 nMergeFlags = rMaster.mpContents[ nRecType ]; nMergeFlags &= ( nMergeFlags >> 16 ) | 0xffff0000; // clearing low word nMergeFlags &= ( ( nCurrentFlags & 0xffff0000 ) // remove already hard set | ( nCurrentFlags >> 16 ) ) ^ 0xffffffff; // attributes from mergeflags nCurrentFlags &= ( ( nMergeFlags & 0xffff0000 ) // apply zero master bits | ( nMergeFlags >> 16 ) ) ^ 0xffffffff; nCurrentFlags |= (sal_uInt16)nMergeFlags; // apply filled master bits ( (DffPropSet*) this )->mpContents[ nRecType ] = nCurrentFlags; sal_uInt32 nNewContentEx = (sal_uInt32)(sal_uIntPtr)rMaster.GetCurObject(); if ( ((DffPropSet*)this)->Seek( nRecType ) ) nNewContentEx |= (sal_uInt32)(sal_uIntPtr)GetCurObject(); ( (DffPropSet*) this )->Replace( nRecType, (void*)(sal_uIntPtr)nNewContentEx ); } else { if ( !IsProperty( nRecType ) || !IsHardAttribute( nRecType ) ) { ( (DffPropSet*) this )->mpContents[ nRecType ] = rMaster.mpContents[ nRecType ]; DffPropFlags nFlags( rMaster.mpFlags[ nRecType ] ); nFlags.bSoftAttr = sal_True; ( (DffPropSet*) this )->mpFlags[ nRecType ] = nFlags; ( (DffPropSet*) this )->Insert( nRecType, pDummy ); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: DffPropSet::Merge File: filter/source/msfilter/msdffimp.cxx Repository: libreoffice/core The code follows secure coding practices.
[ "CWE-189" ]
CVE-2012-2334
MEDIUM
6.8
libreoffice/core
DffPropSet::Merge
filter/source/msfilter/msdffimp.cxx
28a6558f9d3ca2dda3191f8b5b3f2378ee2533da
0
Analyze the following code function for security vulnerabilities
static void svm_cpu_dead(unsigned int cpu) { paddr_t *this_hsa = &per_cpu(hsa, cpu); paddr_t *this_vmcb = &per_cpu(host_vmcb, cpu); if ( *this_hsa ) { free_domheap_page(maddr_to_page(*this_hsa)); *this_hsa = 0; } #ifdef CONFIG_PV if ( per_cpu(host_vmcb_va, cpu) ) { unmap_domain_page_global(per_cpu(host_vmcb_va, cpu)); per_cpu(host_vmcb_va, cpu) = NULL; } #endif if ( *this_vmcb ) { free_domheap_page(maddr_to_page(*this_vmcb)); *this_vmcb = 0; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: svm_cpu_dead File: xen/arch/x86/hvm/svm/svm.c Repository: xen-project/xen The code follows secure coding practices.
[ "CWE-20" ]
CVE-2019-17347
MEDIUM
4.6
xen-project/xen
svm_cpu_dead
xen/arch/x86/hvm/svm/svm.c
eccc170053e46b4ab1d9e7485c09e210be15bbd7
0
Analyze the following code function for security vulnerabilities
static uint8_t avdt_msg_prs_rej(tAVDT_MSG* p_msg, uint8_t* p, uint16_t len, uint8_t sig) { uint8_t error = 0; if (len > 0) { if ((sig == AVDT_SIG_SETCONFIG) || (sig == AVDT_SIG_RECONFIG)) { p_msg->hdr.err_param = *p++; len--; } else if ((sig == AVDT_SIG_START) || (sig == AVDT_SIG_SUSPEND)) { AVDT_MSG_PRS_SEID(p, p_msg->hdr.err_param); len--; } } if (len < 1) { android_errorWriteLog(0x534e4554, "79702484"); error = AVDT_ERR_LENGTH; } else { p_msg->hdr.err_code = *p; } return error; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: avdt_msg_prs_rej File: system/stack/avdt/avdt_msg.cc Repository: android The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-35684
HIGH
8.8
android
avdt_msg_prs_rej
system/stack/avdt/avdt_msg.cc
668bbca29797728004d88db4c9b69102f3939008
0
Analyze the following code function for security vulnerabilities
static int dissect_kafka_leader_and_isr_request_topic_state(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version) { proto_tree *subtree; proto_item *subti; int topic_start, topic_len; subtree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_kafka_topic, &subti, "Topic"); /* topic */ offset = dissect_kafka_string(subtree, hf_kafka_topic_name, tvb, pinfo, offset, &topic_start, &topic_len); /* [partition_state] */ offset = dissect_kafka_array(subtree, tvb, pinfo, offset, api_version, &dissect_kafka_leader_and_isr_request_partition_state); proto_item_append_text(subti, " (Name=%s)", tvb_get_string_enc(wmem_packet_scope(), tvb, topic_start, topic_len, ENC_UTF_8|ENC_NA)); return offset; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dissect_kafka_leader_and_isr_request_topic_state File: epan/dissectors/packet-kafka.c Repository: wireshark The code follows secure coding practices.
[ "CWE-415" ]
CVE-2020-17498
MEDIUM
4.3
wireshark
dissect_kafka_leader_and_isr_request_topic_state
epan/dissectors/packet-kafka.c
76afda963de4f0b9be24f2d8e873990a5cbf221b
0
Analyze the following code function for security vulnerabilities
static int fnmatch_normalize(const char *pattern, const char *string, int flags) { int i, j, r; char *pattern_norm = NULL; r = ALLOC_N(pattern_norm, strlen(pattern) + 1); if (r < 0) goto error; for (i = 0, j = 0; i < strlen(pattern); i++) { if (pattern[i] != '/' || pattern[i+1] != '/') { pattern_norm[j] = pattern[i]; j++; } } pattern_norm[j] = 0; r = fnmatch(pattern_norm, string, flags); FREE(pattern_norm); return r; error: if (pattern_norm != NULL) FREE(pattern_norm); return -1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fnmatch_normalize File: src/transform.c Repository: hercules-team/augeas The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-6412
MEDIUM
4.6
hercules-team/augeas
fnmatch_normalize
src/transform.c
f5b4fc0c
0
Analyze the following code function for security vulnerabilities
static TIFF* openSrcImage (char **imageSpec) /* imageSpec points to a pointer to a filename followed by optional ,image#'s Open the TIFF file and assign *imageSpec to either NULL if there are no images specified, or a pointer to the next image number text */ { TIFF *tif; char *fn = *imageSpec; *imageSpec = strchr (fn, comma); if (*imageSpec) { /* there is at least one image number specifier */ **imageSpec = '\0'; tif = TIFFOpen (fn, "r"); /* but, ignore any single trailing comma */ if (!(*imageSpec)[1]) {*imageSpec = NULL; return tif;} if (tif) { **imageSpec = comma; /* replace the comma */ if (!nextSrcImage(tif, imageSpec)) { TIFFClose (tif); tif = NULL; } } }else tif = TIFFOpen (fn, "r"); return tif; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: openSrcImage File: tools/tiffcp.c Repository: libtiff The code follows secure coding practices.
[ "CWE-787" ]
CVE-2020-19143
MEDIUM
4.3
libtiff
openSrcImage
tools/tiffcp.c
54ce8c522078cd0f39861df71db848648ec28ade
0
Analyze the following code function for security vulnerabilities
static double filter_bicubic(const double t) { const double abs_t = (double)fabs(t); const double abs_t_sq = abs_t * abs_t; if (abs_t<1) return 1-2*abs_t_sq+abs_t_sq*abs_t; if (abs_t<2) return 4 - 8*abs_t +5*abs_t_sq - abs_t_sq*abs_t; return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: filter_bicubic File: ext/gd/libgd/gd_interpolation.c Repository: php/php-src The code follows secure coding practices.
[ "CWE-119", "CWE-200" ]
CVE-2016-1903
MEDIUM
6.4
php/php-src
filter_bicubic
ext/gd/libgd/gd_interpolation.c
84b8db597ae597abce1977ce64dcf231e71330f9
0
Analyze the following code function for security vulnerabilities
void bcf_hdr_destroy(bcf_hdr_t *h) { int i; khint_t k; if (!h) return; for (i = 0; i < 3; ++i) { vdict_t *d = (vdict_t*)h->dict[i]; if (d == 0) continue; for (k = kh_begin(d); k != kh_end(d); ++k) if (kh_exist(d, k)) free((char*)kh_key(d, k)); kh_destroy(vdict, d); free(h->id[i]); } for (i=0; i<h->nhrec; i++) bcf_hrec_destroy(h->hrec[i]); if (h->nhrec) free(h->hrec); if (h->samples) free(h->samples); free(h->keep_samples); free(h->transl[0]); free(h->transl[1]); free(h->mem.s); free(h); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: bcf_hdr_destroy File: vcf.c Repository: samtools/htslib The code follows secure coding practices.
[ "CWE-787" ]
CVE-2020-36403
MEDIUM
6.8
samtools/htslib
bcf_hdr_destroy
vcf.c
dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c
0
Analyze the following code function for security vulnerabilities
static int64_t MakeInt(PyObject* integer) { #if PY_MAJOR_VERSION >= 3 return PyLong_AsLong(integer); #else return PyInt_AsLong(integer); #endif }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: MakeInt File: tensorflow/python/eager/pywrap_tfe_src.cc Repository: tensorflow The code follows secure coding practices.
[ "CWE-476" ]
CVE-2022-41889
HIGH
7.5
tensorflow
MakeInt
tensorflow/python/eager/pywrap_tfe_src.cc
e9e95553e5411834d215e6770c81a83a3d0866ce
0
Analyze the following code function for security vulnerabilities
static inline void f2fs_unlock_op(struct f2fs_sb_info *sbi) { up_read(&sbi->cp_rwsem); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: f2fs_unlock_op File: include/trace/events/f2fs.h Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-476" ]
CVE-2019-19815
HIGH
7.1
torvalds/linux
f2fs_unlock_op
include/trace/events/f2fs.h
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
0
Analyze the following code function for security vulnerabilities
static Ref makeDot(Ref obj, IString key) { return &makeRawArray(3)->push_back(makeRawString(DOT)) .push_back(obj) .push_back(makeRawString(key)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: makeDot File: src/emscripten-optimizer/simple_ast.h Repository: WebAssembly/binaryen The code follows secure coding practices.
[ "CWE-476" ]
CVE-2019-7153
MEDIUM
4.3
WebAssembly/binaryen
makeDot
src/emscripten-optimizer/simple_ast.h
e63c4a7d04c145dafaf4b09de5f9f5de69cee8ef
0
Analyze the following code function for security vulnerabilities
GF_ItemListBox *gf_isom_locate_box(GF_List *list, u32 boxType, bin128 UUID) { u32 i; GF_Box *box; i=0; while ((box = (GF_Box *)gf_list_enum(list, &i))) { if (box->type == boxType) { GF_UUIDBox* box2 = (GF_UUIDBox* )box; if (boxType != GF_ISOM_BOX_TYPE_UUID) return (GF_ItemListBox *)box; if (!memcmp(box2->uuid, UUID, 16)) return (GF_ItemListBox *)box; } } return NULL; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: gf_isom_locate_box File: src/isomedia/isom_read.c Repository: gpac The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-46001
MEDIUM
5.5
gpac
gf_isom_locate_box
src/isomedia/isom_read.c
e79b0cf7e72404750630bc01340e999f3940dbc4
0
Analyze the following code function for security vulnerabilities
static int dwg_decode_common_entity_handle_data(Bit_Chain* dat, Bit_Chain* hdl_dat, Dwg_Object *restrict obj) { Dwg_Data *dwg = obj->parent; Dwg_Object_Entity *_obj; long unsigned int vcount; Dwg_Object_Entity *_ent; int error = 0; _obj = _ent = obj->tio.entity; #include "common_entity_handle_data.spec" return error; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dwg_decode_common_entity_handle_data File: src/decode.c Repository: LibreDWG/libredwg The code follows secure coding practices.
[ "CWE-415" ]
CVE-2018-14524
MEDIUM
4.3
LibreDWG/libredwg
dwg_decode_common_entity_handle_data
src/decode.c
9a8b9fb49108bab5d12f3353292f8fd8ea12898f
0
Analyze the following code function for security vulnerabilities
static JSValue js_object_defineProperty(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv, int magic) { JSValueConst obj, prop, desc; int ret, flags; JSAtom atom; obj = argv[0]; prop = argv[1]; desc = argv[2]; if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) return JS_ThrowTypeErrorNotAnObject(ctx); atom = JS_ValueToAtom(ctx, prop); if (unlikely(atom == JS_ATOM_NULL)) return JS_EXCEPTION; flags = 0; if (!magic) flags |= JS_PROP_THROW; ret = JS_DefinePropertyDesc(ctx, obj, atom, desc, flags); JS_FreeAtom(ctx, atom); if (ret < 0) { return JS_EXCEPTION; } else if (magic) { return JS_NewBool(ctx, ret); } else { return JS_DupValue(ctx, obj); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: js_object_defineProperty File: quickjs.c Repository: bellard/quickjs The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-31922
HIGH
7.5
bellard/quickjs
js_object_defineProperty
quickjs.c
03cc5ecc88f8534a5db5c911df4b712a21d08fb8
0
Analyze the following code function for security vulnerabilities
static inline void perf_get_data_addr(struct pt_regs *regs, u64 *addrp) { unsigned long mmcra = regs->dsisr; unsigned long sdsync = (ppmu->flags & PPMU_ALT_SIPR) ? POWER6_MMCRA_SDSYNC : MMCRA_SDSYNC; if (!(mmcra & MMCRA_SAMPLE_ENABLE) || (mmcra & sdsync)) *addrp = mfspr(SPRN_SDAR); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: perf_get_data_addr File: arch/powerpc/kernel/perf_event.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-189" ]
CVE-2011-4611
MEDIUM
4.9
torvalds/linux
perf_get_data_addr
arch/powerpc/kernel/perf_event.c
0837e3242c73566fc1c0196b4ec61779c25ffc93
0
Analyze the following code function for security vulnerabilities
static int ComparePriority(const void *p1, const void *p2) { FontDirectoryPtr dir1 = (*(FontPathElementPtr*) p1)->private; FontDirectoryPtr dir2 = (*(FontPathElementPtr*) p2)->private; const char *pri1 = NULL; const char *pri2 = NULL; if (dir1->attributes != NULL) pri1 = strstr(dir1->attributes, PriorityAttribute); if (dir2->attributes != NULL) pri2 = strstr(dir2->attributes, PriorityAttribute); if (pri1 == NULL && pri2 == NULL) return 0; else if (pri1 == NULL) return 1; else if (pri2 == NULL) return -1; else return atoi(pri1 + strlen(PriorityAttribute)) - atoi(pri2 + strlen(PriorityAttribute)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ComparePriority File: src/fontfile/catalogue.c Repository: xorg/lib/libXfont The code follows secure coding practices.
[ "CWE-119" ]
CVE-2007-5199
HIGH
7.5
xorg/lib/libXfont
ComparePriority
src/fontfile/catalogue.c
5bf703700ee4a5d6eae20da07cb7a29369667aef
0
Analyze the following code function for security vulnerabilities
gboolean nm_device_can_assume_active_connection (NMDevice *self) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMConnection *connection; const char *method; const char *assumable_ip6_methods[] = { NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NM_SETTING_IP6_CONFIG_METHOD_AUTO, NM_SETTING_IP6_CONFIG_METHOD_DHCP, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL, NM_SETTING_IP6_CONFIG_METHOD_MANUAL, NULL }; const char *assumable_ip4_methods[] = { NM_SETTING_IP4_CONFIG_METHOD_DISABLED, NM_SETTING_IP6_CONFIG_METHOD_AUTO, NM_SETTING_IP6_CONFIG_METHOD_MANUAL, NULL }; if (!nm_device_can_assume_connections (self)) return FALSE; connection = nm_device_get_connection (self); if (!connection) return FALSE; /* Can't assume connections that aren't yet configured * FIXME: what about bridges/bonds waiting for slaves? */ if (priv->state < NM_DEVICE_STATE_IP_CONFIG) return FALSE; if (priv->ip4_state != IP_DONE && priv->ip6_state != IP_DONE) return FALSE; method = nm_utils_get_ip_config_method (connection, NM_TYPE_SETTING_IP6_CONFIG); if (!_nm_utils_string_in_list (method, assumable_ip6_methods)) return FALSE; method = nm_utils_get_ip_config_method (connection, NM_TYPE_SETTING_IP4_CONFIG); if (!_nm_utils_string_in_list (method, assumable_ip4_methods)) return FALSE; return TRUE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nm_device_can_assume_active_connection File: src/devices/nm-device.c Repository: NetworkManager The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2015-0272
MEDIUM
5
NetworkManager
nm_device_can_assume_active_connection
src/devices/nm-device.c
d5fc88e573fa58b93034b04d35a2454f5d28cad9
0
Analyze the following code function for security vulnerabilities
uint32_t AudioFlinger::PlaybackThread::Track::sampleRate() const { return mAudioTrackServerProxy->getSampleRate(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: AudioFlinger::PlaybackThread::Track::sampleRate File: services/audioflinger/Tracks.cpp Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-20942
MEDIUM
5.5
android
AudioFlinger::PlaybackThread::Track::sampleRate
services/audioflinger/Tracks.cpp
bae3b00a5873d1562679a1289fd8490178cfe064
0
Analyze the following code function for security vulnerabilities
static void ext4_clear_journal_err(struct super_block *sb, struct ext4_super_block *es) { journal_t *journal; int j_errno; const char *errstr; BUG_ON(!ext4_has_feature_journal(sb)); journal = EXT4_SB(sb)->s_journal; /* * Now check for any error status which may have been recorded in the * journal by a prior ext4_error() or ext4_abort() */ j_errno = jbd2_journal_errno(journal); if (j_errno) { char nbuf[16]; errstr = ext4_decode_error(sb, j_errno, nbuf); ext4_warning(sb, "Filesystem error recorded " "from previous mount: %s", errstr); ext4_warning(sb, "Marking fs in need of filesystem check."); EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; es->s_state |= cpu_to_le16(EXT4_ERROR_FS); ext4_commit_super(sb, 1); jbd2_journal_clear_err(journal); jbd2_journal_update_sb_errno(journal); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ext4_clear_journal_err File: fs/ext4/super.c Repository: kernel/git/tytso/ext4 The code follows secure coding practices.
[ "CWE-476" ]
CVE-2018-1094
HIGH
7.1
kernel/git/tytso/ext4
ext4_clear_journal_err
fs/ext4/super.c
18db4b4e6fc31eda838dd1c1296d67dbcb3dc957
0
Analyze the following code function for security vulnerabilities
MA_API void ma_pcm_deinterleave_s16(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_deinterleave_s16__reference(dst, src, frameCount, channels); #else ma_pcm_deinterleave_s16__optimized(dst, src, frameCount, channels); #endif }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ma_pcm_deinterleave_s16 File: miniaudio.h Repository: mackron/miniaudio The code follows secure coding practices.
[ "CWE-415" ]
CVE-2021-34184
HIGH
7.5
mackron/miniaudio
ma_pcm_deinterleave_s16
miniaudio.h
8234df87c9268507847e0033280067bade9a57a1
0
Analyze the following code function for security vulnerabilities
int fastcall aio_complete(struct kiocb *iocb, long res, long res2) { struct kioctx *ctx = iocb->ki_ctx; struct aio_ring_info *info; struct aio_ring *ring; struct io_event *event; unsigned long flags; unsigned long tail; int ret; /* * Special case handling for sync iocbs: * - events go directly into the iocb for fast handling * - the sync task with the iocb in its stack holds the single iocb * ref, no other paths have a way to get another ref * - the sync task helpfully left a reference to itself in the iocb */ if (is_sync_kiocb(iocb)) { BUG_ON(iocb->ki_users != 1); iocb->ki_user_data = res; iocb->ki_users = 0; wake_up_process(iocb->ki_obj.tsk); return 1; } /* * Check if the user asked us to deliver the result through an * eventfd. The eventfd_signal() function is safe to be called * from IRQ context. */ if (!IS_ERR(iocb->ki_eventfd)) eventfd_signal(iocb->ki_eventfd, 1); info = &ctx->ring_info; /* add a completion event to the ring buffer. * must be done holding ctx->ctx_lock to prevent * other code from messing with the tail * pointer since we might be called from irq * context. */ spin_lock_irqsave(&ctx->ctx_lock, flags); if (iocb->ki_run_list.prev && !list_empty(&iocb->ki_run_list)) list_del_init(&iocb->ki_run_list); /* * cancelled requests don't get events, userland was given one * when the event got cancelled. */ if (kiocbIsCancelled(iocb)) goto put_rq; ring = kmap_atomic(info->ring_pages[0], KM_IRQ1); tail = info->tail; event = aio_ring_event(info, tail, KM_IRQ0); if (++tail >= info->nr) tail = 0; event->obj = (u64)(unsigned long)iocb->ki_obj.user; event->data = iocb->ki_user_data; event->res = res; event->res2 = res2; dprintk("aio_complete: %p[%lu]: %p: %p %Lx %lx %lx\n", ctx, tail, iocb, iocb->ki_obj.user, iocb->ki_user_data, res, res2); /* after flagging the request as done, we * must never even look at it again */ smp_wmb(); /* make event visible before updating tail */ info->tail = tail; ring->tail = tail; put_aio_ring_event(event, KM_IRQ0); kunmap_atomic(ring, KM_IRQ1); pr_debug("added to ring %p at [%lu]\n", iocb, tail); put_rq: /* everything turned out well, dispose of the aiocb. */ ret = __aio_put_req(ctx, iocb); if (waitqueue_active(&ctx->wait)) wake_up(&ctx->wait); spin_unlock_irqrestore(&ctx->ctx_lock, flags); return ret; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: aio_complete File: fs/aio.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2010-3066
MEDIUM
4.9
torvalds/linux
aio_complete
fs/aio.c
87e2831c3fa39cbf6f7ab676bb5aef039b9659e2
0
Analyze the following code function for security vulnerabilities
static struct io_kiocb *io_poll_file_find(struct io_ring_ctx *ctx, struct io_cancel_data *cd) __must_hold(&ctx->completion_lock) { struct io_kiocb *req; int i; for (i = 0; i < (1U << ctx->cancel_hash_bits); i++) { struct hlist_head *list; list = &ctx->cancel_hash[i]; hlist_for_each_entry(req, list, hash_node) { if (!(cd->flags & IORING_ASYNC_CANCEL_ANY) && req->file != cd->file) continue; if (cd->seq == req->work.cancel_seq) continue; req->work.cancel_seq = cd->seq; return req; } } return NULL; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: io_poll_file_find File: fs/io_uring.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-476" ]
CVE-2022-4127
MEDIUM
5.5
torvalds/linux
io_poll_file_find
fs/io_uring.c
d785a773bed966a75ca1f11d108ae1897189975b
0
Analyze the following code function for security vulnerabilities
static int snd_pcm_tstamp(struct snd_pcm_substream *substream, int __user *_arg) { struct snd_pcm_runtime *runtime = substream->runtime; int arg; if (get_user(arg, _arg)) return -EFAULT; if (arg < 0 || arg > SNDRV_PCM_TSTAMP_TYPE_LAST) return -EINVAL; runtime->tstamp_type = arg; return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: snd_pcm_tstamp File: sound/core/pcm_native.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-416" ]
CVE-2017-0861
MEDIUM
4.6
torvalds/linux
snd_pcm_tstamp
sound/core/pcm_native.c
e11f0f90a626f93899687b1cc909ee37dd6c5809
0
Analyze the following code function for security vulnerabilities
static void info_callback(const char *msg, void *client_data) { (void)client_data; fprintf(stdout, "[INFO] %s", msg); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: info_callback File: src/bin/jp2/opj_compress.c Repository: uclouvain/openjpeg The code follows secure coding practices.
[ "CWE-190" ]
CVE-2021-29338
MEDIUM
4.3
uclouvain/openjpeg
info_callback
src/bin/jp2/opj_compress.c
f0727df07c4d944d7d1c5002451cfbc9545d3288
0
Analyze the following code function for security vulnerabilities
bool Browser::CanReloadContents(content::WebContents* web_contents) const { return chrome::CanReload(this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: Browser::CanReloadContents File: chrome/browser/ui/browser.cc Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2015-6583
MEDIUM
4.3
chromium
Browser::CanReloadContents
chrome/browser/ui/browser.cc
11bd6ed1f622cd9421ed4cdb53454e08d689e342
0
Analyze the following code function for security vulnerabilities
long mg_current_thread_id(void) { #if defined(_WIN32) return GetCurrentThreadId(); #else #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" /* For every compiler, either "sizeof(pthread_t) > sizeof(unsigned long)" * or not, so one of the two conditions will be unreachable by construction. * Unfortunately the C standard does not define a way to check this at * compile time, since the #if preprocessor conditions can not use the sizeof * operator as an argument. */ #endif if (sizeof(pthread_t) > sizeof(unsigned long)) { /* This is the problematic case for CRYPTO_set_id_callback: * The OS pthread_t can not be cast to unsigned long. */ struct mg_workerTLS *tls = (struct mg_workerTLS *)pthread_getspecific(sTlsKey); if (tls == NULL) { /* SSL called from an unknown thread: Create some thread index. */ tls = (struct mg_workerTLS *)mg_malloc(sizeof(struct mg_workerTLS)); tls->is_master = -2; /* -2 means "3rd party thread" */ tls->thread_idx = (unsigned)mg_atomic_inc(&thread_idx_max); pthread_setspecific(sTlsKey, tls); } return tls->thread_idx; } else { /* pthread_t may be any data type, so a simple cast to unsigned long * can rise a warning/error, depending on the platform. * Here memcpy is used as an anything-to-anything cast. */ unsigned long ret = 0; pthread_t t = pthread_self(); memcpy(&ret, &t, sizeof(pthread_t)); return ret; } #if defined(__clang__) #pragma clang diagnostic pop #endif #endif }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: mg_current_thread_id File: src/civetweb.c Repository: civetweb The code follows secure coding practices.
[ "CWE-200", "CWE-125" ]
CVE-2018-12684
MEDIUM
5.8
civetweb
mg_current_thread_id
src/civetweb.c
8fd069f6dedb064339f1091069ac96f3f8bdb552
0
Analyze the following code function for security vulnerabilities
static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_left_side__sse2(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i right = _mm_sub_epi32(left, side); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), drflac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 left = pInputSamples0U32[i] << shift0; drflac_uint32 side = pInputSamples1U32[i] << shift1; drflac_uint32 right = left - side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (drflac_int16)left; pOutputSamples[i*2+1] = (drflac_int16)right; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: drflac_read_pcm_frames_s16__decode_left_side__sse2 File: miniaudio.h Repository: mackron/miniaudio The code follows secure coding practices.
[ "CWE-415" ]
CVE-2021-34184
HIGH
7.5
mackron/miniaudio
drflac_read_pcm_frames_s16__decode_left_side__sse2
miniaudio.h
8234df87c9268507847e0033280067bade9a57a1
0
Analyze the following code function for security vulnerabilities
void LibRaw::sony_load_raw() { uchar head[40]; ushort *pixel; unsigned i, key, row, col; fseek(ifp, 200896, SEEK_SET); fseek(ifp, (unsigned)fgetc(ifp) * 4 - 1, SEEK_CUR); order = 0x4d4d; key = get4(); fseek(ifp, 164600, SEEK_SET); fread(head, 1, 40, ifp); sony_decrypt((unsigned *)head, 10, 1, key); for (i = 26; i-- > 22;) key = key << 8 | head[i]; fseek(ifp, data_offset, SEEK_SET); for (row = 0; row < raw_height; row++) { checkCancel(); pixel = raw_image + row * raw_width; if (fread(pixel, 2, raw_width, ifp) < raw_width) derror(); sony_decrypt((unsigned *)pixel, raw_width / 2, !row, key); for (col = 0; col < raw_width; col++) if ((pixel[col] = ntohs(pixel[col])) >> 14) derror(); } maximum = 0x3ff0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: LibRaw::sony_load_raw File: src/decoders/decoders_dcraw.cpp Repository: LibRaw The code follows secure coding practices.
[ "CWE-125" ]
CVE-2020-35533
MEDIUM
5.5
LibRaw
LibRaw::sony_load_raw
src/decoders/decoders_dcraw.cpp
a6937d4046a7c4742b683a04c8564605fd9be4fb
0
Analyze the following code function for security vulnerabilities
static int nfs_pagein_multi(struct inode *inode, struct list_head *head, unsigned int npages, size_t count, int flags) { struct nfs_page *req = nfs_list_entry(head->next); struct page *page = req->wb_page; struct nfs_read_data *data; size_t rsize = NFS_SERVER(inode)->rsize, nbytes; unsigned int offset; int requests = 0; int ret = 0; LIST_HEAD(list); nfs_list_remove_request(req); nbytes = count; do { size_t len = min(nbytes,rsize); data = nfs_readdata_alloc(1); if (!data) goto out_bad; list_add(&data->pages, &list); requests++; nbytes -= len; } while(nbytes != 0); atomic_set(&req->wb_complete, requests); ClearPageError(page); offset = 0; nbytes = count; do { int ret2; data = list_entry(list.next, struct nfs_read_data, pages); list_del_init(&data->pages); data->pagevec[0] = page; if (nbytes < rsize) rsize = nbytes; ret2 = nfs_read_rpcsetup(req, data, &nfs_read_partial_ops, rsize, offset); if (ret == 0) ret = ret2; offset += rsize; nbytes -= rsize; } while (nbytes != 0); return ret; out_bad: while (!list_empty(&list)) { data = list_entry(list.next, struct nfs_read_data, pages); list_del(&data->pages); nfs_readdata_free(data); } SetPageError(page); nfs_readpage_release(req); return -ENOMEM; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nfs_pagein_multi File: fs/nfs/read.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2011-4325
MEDIUM
4.9
torvalds/linux
nfs_pagein_multi
fs/nfs/read.c
1ae88b2e446261c038f2c0c3150ffae142b227a2
0
Analyze the following code function for security vulnerabilities
return_t dispatch (const T &obj) { hb_applicable_t *entry = &array[i++]; entry->init (obj, apply_to<T> #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE , apply_cached_to<T> , cache_func_to<T> #endif ); #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE /* Cache handling * * We allow one subtable from each lookup to use a cache. The assumption * being that multiple subtables of the same lookup cannot use a cache * because the resources they would use will collide. As such, we ask * each subtable to tell us how much it costs (which a cache would avoid), * and we allocate the cache opportunity to the costliest subtable. */ unsigned cost = cache_cost (obj, hb_prioritize); if (cost > cache_user_cost) { cache_user_idx = i - 1; cache_user_cost = cost; } #endif return hb_empty_t (); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dispatch File: src/hb-ot-layout-gsubgpos.hh Repository: harfbuzz The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-25193
HIGH
7.5
harfbuzz
dispatch
src/hb-ot-layout-gsubgpos.hh
85be877925ddbf34f74a1229f3ca1716bb6170dc
0
Analyze the following code function for security vulnerabilities
bool BandwidthRecord::addFrame(int size, int maxpersec) { QMutexLocker ml(&qmMutex); quint64 elapsed = a_qtWhen[iRecNum].elapsed(); if (elapsed == 0) return false; int nsum = iSum-a_iBW[iRecNum]+size; int bw = static_cast<int>((nsum * 1000000LL) / elapsed); if (bw > maxpersec) return false; a_iBW[iRecNum] = static_cast<unsigned short>(size); a_qtWhen[iRecNum].restart(); iSum = nsum; iRecNum++; if (iRecNum == N_BANDWIDTH_SLOTS) iRecNum = 0; return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: BandwidthRecord::addFrame File: src/murmur/ServerUser.cpp Repository: mumble-voip/mumble The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-20743
MEDIUM
5
mumble-voip/mumble
BandwidthRecord::addFrame
src/murmur/ServerUser.cpp
4761ca41ab1f611cd4a6d117f9f6cfd7c64f6b55
0
Analyze the following code function for security vulnerabilities
bfd_boolean elf_slurp_reloc_table (bfd *abfd, asection *asect, asymbol **symbols, bfd_boolean dynamic) { const struct elf_backend_data * const bed = get_elf_backend_data (abfd); struct bfd_elf_section_data * const d = elf_section_data (asect); Elf_Internal_Shdr *rel_hdr; Elf_Internal_Shdr *rel_hdr2; bfd_size_type reloc_count; bfd_size_type reloc_count2; arelent *relents; size_t amt; if (asect->relocation != NULL) return TRUE; if (! dynamic) { if ((asect->flags & SEC_RELOC) == 0 || asect->reloc_count == 0) return TRUE; rel_hdr = d->rel.hdr; reloc_count = rel_hdr ? NUM_SHDR_ENTRIES (rel_hdr) : 0; rel_hdr2 = d->rela.hdr; reloc_count2 = rel_hdr2 ? NUM_SHDR_ENTRIES (rel_hdr2) : 0; /* PR 17512: file: 0b4f81b7. */ if (asect->reloc_count != reloc_count + reloc_count2) return FALSE; BFD_ASSERT ((rel_hdr && asect->rel_filepos == rel_hdr->sh_offset) || (rel_hdr2 && asect->rel_filepos == rel_hdr2->sh_offset)); } else { /* Note that ASECT->RELOC_COUNT tends not to be accurate in this case because relocations against this section may use the dynamic symbol table, and in that case bfd_section_from_shdr in elf.c does not update the RELOC_COUNT. */ if (asect->size == 0) return TRUE; rel_hdr = &d->this_hdr; reloc_count = NUM_SHDR_ENTRIES (rel_hdr); rel_hdr2 = NULL; reloc_count2 = 0; } if (_bfd_mul_overflow (reloc_count + reloc_count2, sizeof (arelent), &amt)) { bfd_set_error (bfd_error_file_too_big); return FALSE; } relents = (arelent *) bfd_alloc (abfd, amt); if (relents == NULL) return FALSE; if (rel_hdr && !elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count, relents, symbols, dynamic)) return FALSE; if (rel_hdr2 && !elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr2, reloc_count2, relents + reloc_count, symbols, dynamic)) return FALSE; if (!bed->slurp_secondary_relocs (abfd, asect, symbols)) return FALSE; asect->relocation = relents; return TRUE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: elf_slurp_reloc_table File: bfd/elfcode.h Repository: binutils-gdb The code follows secure coding practices.
[ "CWE-125" ]
CVE-2020-35448
MEDIUM
4.3
binutils-gdb
elf_slurp_reloc_table
bfd/elfcode.h
8642dafaef21aa6747cec01df1977e9c52eb4679
0
Analyze the following code function for security vulnerabilities
static void tpacket_destruct_skb(struct sk_buff *skb) { struct packet_sock *po = pkt_sk(skb->sk); void *ph; BUG_ON(skb == NULL); if (likely(po->tx_ring.pg_vec)) { ph = skb_shinfo(skb)->destructor_arg; BUG_ON(__packet_get_status(po, ph) != TP_STATUS_SENDING); BUG_ON(atomic_read(&po->tx_ring.pending) == 0); atomic_dec(&po->tx_ring.pending); __packet_set_status(po, ph, TP_STATUS_AVAILABLE); } sock_wfree(skb); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: tpacket_destruct_skb File: net/packet/af_packet.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-200" ]
CVE-2011-2898
LOW
1.9
torvalds/linux
tpacket_destruct_skb
net/packet/af_packet.c
13fcb7bd322164c67926ffe272846d4860196dc6
0
Analyze the following code function for security vulnerabilities
int tls_construct_finished(SSL *s, const char *sender, int slen) { unsigned char *p; int i; unsigned long l; p = ssl_handshake_start(s); i = s->method->ssl3_enc->final_finish_mac(s, sender, slen, s->s3->tmp.finish_md); if (i <= 0) return 0; s->s3->tmp.finish_md_len = i; memcpy(p, s->s3->tmp.finish_md, i); l = i; /* * Copy the finished so we can use it for renegotiation checks */ if (!s->server) { OPENSSL_assert(i <= EVP_MAX_MD_SIZE); memcpy(s->s3->previous_client_finished, s->s3->tmp.finish_md, i); s->s3->previous_client_finished_len = i; } else { OPENSSL_assert(i <= EVP_MAX_MD_SIZE); memcpy(s->s3->previous_server_finished, s->s3->tmp.finish_md, i); s->s3->previous_server_finished_len = i; } if (!ssl_set_handshake_header(s, SSL3_MT_FINISHED, l)) { SSLerr(SSL_F_TLS_CONSTRUCT_FINISHED, ERR_R_INTERNAL_ERROR); return 0; } return 1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: tls_construct_finished File: ssl/statem/statem_lib.c Repository: openssl The code follows secure coding practices.
[ "CWE-399" ]
CVE-2016-2179
MEDIUM
5
openssl
tls_construct_finished
ssl/statem/statem_lib.c
f5c7f5dfbaf0d2f7d946d0fe86f08e6bcb36ed0d
0
Analyze the following code function for security vulnerabilities
static void zrangeResultFinalizeClient(zrange_result_handler *handler, size_t result_count) { /* If the reply size was know at start there's nothing left to do */ if (!handler->userdata) return; /* In case of WITHSCORES, respond with a single array in RESP2, and * nested arrays in RESP3. We can't use a map response type since the * client library needs to know to respect the order. */ if (handler->withscores && (handler->client->resp == 2)) { result_count *= 2; } setDeferredArrayLen(handler->client, handler->userdata, result_count); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: zrangeResultFinalizeClient File: src/t_zset.c Repository: redis The code follows secure coding practices.
[ "CWE-190" ]
CVE-2023-22458
MEDIUM
5.5
redis
zrangeResultFinalizeClient
src/t_zset.c
16f408b1a0121cacd44cbf8aee275d69dc627f02
0
Analyze the following code function for security vulnerabilities
krb5_error_code krb5_ldap_iterate_password_policy(krb5_context context, char *match_expr, void (*func)(krb5_pointer, osa_policy_ent_t), krb5_pointer func_arg) { osa_policy_ent_rec *entry=NULL; char *policy=NULL; krb5_error_code st=0, tempst=0; LDAP *ld=NULL; LDAPMessage *result=NULL, *ent=NULL; kdb5_dal_handle *dal_handle=NULL; krb5_ldap_context *ldap_context=NULL; krb5_ldap_server_handle *ldap_server_handle=NULL; /* Clear the global error string */ krb5_clear_error_message(context); SETUP_CONTEXT(); GET_HANDLE(); if (ldap_context->lrparams->realmdn == NULL) { st = EINVAL; goto cleanup; } LDAP_SEARCH(ldap_context->lrparams->realmdn, LDAP_SCOPE_ONELEVEL, "(objectclass=krbpwdpolicy)", password_policy_attributes); for (ent=ldap_first_entry(ld, result); ent != NULL; ent=ldap_next_entry(ld, ent)) { krb5_boolean attr_present; st = krb5_ldap_get_string(ld, ent, "cn", &policy, &attr_present); if (st != 0) goto cleanup; if (attr_present == FALSE) continue; entry = (osa_policy_ent_t) malloc(sizeof(osa_policy_ent_rec)); CHECK_NULL(entry); memset(entry, 0, sizeof(osa_policy_ent_rec)); if ((st = populate_policy(context, ld, ent, policy, entry)) != 0) goto cleanup; (*func)(func_arg, entry); krb5_ldap_free_password_policy(context, entry); entry = NULL; free(policy); policy = NULL; } cleanup: free(entry); free(policy); ldap_msgfree(result); krb5_ldap_put_handle_to_pool(ldap_context, ldap_server_handle); return st; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: krb5_ldap_iterate_password_policy File: src/plugins/kdb/ldap/libkdb_ldap/ldap_pwd_policy.c Repository: krb5 The code follows secure coding practices.
[ "CWE-476" ]
CVE-2014-5353
LOW
3.5
krb5
krb5_ldap_iterate_password_policy
src/plugins/kdb/ldap/libkdb_ldap/ldap_pwd_policy.c
d1f707024f1d0af6e54a18885322d70fa15ec4d3
0
Analyze the following code function for security vulnerabilities
static int validate_table_offset(BlockDriverState *bs, uint64_t offset, uint64_t entries, size_t entry_len) { BDRVQcowState *s = bs->opaque; uint64_t size; /* Use signed INT64_MAX as the maximum even for uint64_t header fields, * because values will be passed to qemu functions taking int64_t. */ if (entries > INT64_MAX / entry_len) { return -EINVAL; } size = entries * entry_len; if (INT64_MAX - size < offset) { return -EINVAL; } /* Tables must be cluster aligned */ if (offset & (s->cluster_size - 1)) { return -EINVAL; } return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validate_table_offset File: block/qcow2.c Repository: qemu The code follows secure coding practices.
[ "CWE-476" ]
CVE-2014-0146
LOW
1.9
qemu
validate_table_offset
block/qcow2.c
11b128f4062dd7f89b14abc8877ff20d41b28be9
0
Analyze the following code function for security vulnerabilities
pdfio_array_t * // O - Array with binary strings pdfioFileGetID(pdfio_file_t *pdf) // I - PDF file { return (pdf ? pdf->id_array : NULL); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: pdfioFileGetID File: pdfio-file.c Repository: michaelrsweet/pdfio The code follows secure coding practices.
[ "CWE-835" ]
CVE-2023-24808
MEDIUM
6.5
michaelrsweet/pdfio
pdfioFileGetID
pdfio-file.c
4f10021e7ee527c1aa24853e2947e38e154d9ccb
0
Analyze the following code function for security vulnerabilities
static int imap_mbox_check(struct Context *ctx, int *index_hint) { int rc; (void) index_hint; imap_allow_reopen(ctx); rc = imap_check(ctx->data, 0); imap_disallow_reopen(ctx); return rc; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: imap_mbox_check File: imap/imap.c Repository: neomutt The code follows secure coding practices.
[ "CWE-78" ]
CVE-2018-14354
HIGH
7.5
neomutt
imap_mbox_check
imap/imap.c
95e80bf9ff10f68cb6443f760b85df4117cb15eb
0
Analyze the following code function for security vulnerabilities
int conn_write(const void *buf, size_t count) { conn_debug("Local", buf, count); return WRITE(buf, count); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: conn_write File: conn.c Repository: LINBIT/csync2 The code follows secure coding practices.
[ "CWE-252" ]
CVE-2019-15523
MEDIUM
5
LINBIT/csync2
conn_write
conn.c
92742544a56bcbcd9ec99ca15f898b31797e39e2
0
Analyze the following code function for security vulnerabilities
static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) { struct brcmf_cfg80211_assoc_ielen_le *assoc_info; struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg); u32 req_len; u32 resp_len; s32 err = 0; brcmf_clear_assoc_ies(cfg); err = brcmf_fil_iovar_data_get(ifp, "assoc_info", cfg->extra_buf, WL_ASSOC_INFO_MAX); if (err) { brcmf_err("could not get assoc info (%d)\n", err); return err; } assoc_info = (struct brcmf_cfg80211_assoc_ielen_le *)cfg->extra_buf; req_len = le32_to_cpu(assoc_info->req_len); resp_len = le32_to_cpu(assoc_info->resp_len); if (req_len) { err = brcmf_fil_iovar_data_get(ifp, "assoc_req_ies", cfg->extra_buf, WL_ASSOC_INFO_MAX); if (err) { brcmf_err("could not get assoc req (%d)\n", err); return err; } conn_info->req_ie_len = req_len; conn_info->req_ie = kmemdup(cfg->extra_buf, conn_info->req_ie_len, GFP_KERNEL); } else { conn_info->req_ie_len = 0; conn_info->req_ie = NULL; } if (resp_len) { err = brcmf_fil_iovar_data_get(ifp, "assoc_resp_ies", cfg->extra_buf, WL_ASSOC_INFO_MAX); if (err) { brcmf_err("could not get assoc resp (%d)\n", err); return err; } conn_info->resp_ie_len = resp_len; conn_info->resp_ie = kmemdup(cfg->extra_buf, conn_info->resp_ie_len, GFP_KERNEL); } else { conn_info->resp_ie_len = 0; conn_info->resp_ie = NULL; } brcmf_dbg(CONN, "req len (%d) resp len (%d)\n", conn_info->req_ie_len, conn_info->resp_ie_len); return err; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: brcmf_get_assoc_ies File: drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-119" ]
CVE-2017-7541
HIGH
7.2
torvalds/linux
brcmf_get_assoc_ies
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
8f44c9a41386729fea410e688959ddaa9d51be7c
0
Analyze the following code function for security vulnerabilities
static int manager_check_ask_password(Manager *m) { int r; assert(m); if (!m->ask_password_event_source) { assert(m->ask_password_inotify_fd < 0); mkdir_p_label("/run/systemd/ask-password", 0755); m->ask_password_inotify_fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC); if (m->ask_password_inotify_fd < 0) return log_error_errno(errno, "inotify_init1() failed: %m"); if (inotify_add_watch(m->ask_password_inotify_fd, "/run/systemd/ask-password", IN_CREATE|IN_DELETE|IN_MOVE) < 0) { log_error_errno(errno, "Failed to add watch on /run/systemd/ask-password: %m"); manager_close_ask_password(m); return -errno; } r = sd_event_add_io(m->event, &m->ask_password_event_source, m->ask_password_inotify_fd, EPOLLIN, manager_dispatch_ask_password_fd, m); if (r < 0) { log_error_errno(errno, "Failed to add event source for /run/systemd/ask-password: %m"); manager_close_ask_password(m); return -errno; } (void) sd_event_source_set_description(m->ask_password_event_source, "manager-ask-password"); /* Queries might have been added meanwhile... */ manager_dispatch_ask_password_fd(m->ask_password_event_source, m->ask_password_inotify_fd, EPOLLIN, m); } return m->have_ask_password; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: manager_check_ask_password File: src/core/manager.c Repository: systemd The code follows secure coding practices.
[ "CWE-20" ]
CVE-2016-7795
MEDIUM
4.9
systemd
manager_check_ask_password
src/core/manager.c
531ac2b2349da02acc9c382849758e07eb92b020
0
Analyze the following code function for security vulnerabilities
static void low_mode_from_nfs4(u32 perm, unsigned short *mode, unsigned int flags) { u32 write_mode = NFS4_WRITE_MODE; if (flags & NFS4_ACL_DIR) write_mode |= NFS4_ACE_DELETE_CHILD; *mode = 0; if ((perm & NFS4_READ_MODE) == NFS4_READ_MODE) *mode |= ACL_READ; if ((perm & write_mode) == write_mode) *mode |= ACL_WRITE; if ((perm & NFS4_EXECUTE_MODE) == NFS4_EXECUTE_MODE) *mode |= ACL_EXECUTE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: low_mode_from_nfs4 File: fs/nfsd/nfs4acl.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-1237
MEDIUM
4.9
torvalds/linux
low_mode_from_nfs4
fs/nfsd/nfs4acl.c
999653786df6954a31044528ac3f7a5dadca08f4
0
Analyze the following code function for security vulnerabilities
static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) { struct dst_entry *dst = skb_dst(skb); if (dst && dst_hold_safe(dst)) { const struct rt6_info *rt = (const struct rt6_info *)dst; sk->sk_rx_dst = dst; inet_sk(sk)->rx_dst_ifindex = skb->skb_iif; inet6_sk(sk)->rx_dst_cookie = rt6_get_cookie(rt); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: inet6_sk_rx_dst_set File: net/ipv6/tcp_ipv6.c Repository: linux-audit/audit-kernel The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-6136
LOW
1.9
linux-audit/audit-kernel
inet6_sk_rx_dst_set
net/ipv6/tcp_ipv6.c
45caeaa5ac0b4b11784ac6f932c0ad4c6b67cda0
0
Analyze the following code function for security vulnerabilities
int ulfius_add_endpoint(struct _u_instance * u_instance, const struct _u_endpoint * u_endpoint) { int res; if (u_instance != NULL && u_endpoint != NULL) { if (ulfius_is_valid_endpoint(u_endpoint, 0)) { if (u_instance->endpoint_list == NULL) { // No endpoint, create a list with 2 endpoints so the last one is an empty one u_instance->endpoint_list = o_malloc(2 * sizeof(struct _u_endpoint)); if (u_instance->endpoint_list == NULL) { y_log_message(Y_LOG_LEVEL_ERROR, "Ulfius - ulfius_add_endpoint, Error allocating memory for u_instance->endpoint_list"); return U_ERROR_MEMORY; } u_instance->nb_endpoints = 1; } else { u_instance->nb_endpoints++; u_instance->endpoint_list = o_realloc(u_instance->endpoint_list, (u_instance->nb_endpoints + 1) * sizeof(struct _u_endpoint)); if (u_instance->endpoint_list == NULL) { y_log_message(Y_LOG_LEVEL_ERROR, "Ulfius - ulfius_add_endpoint, Error reallocating memory for u_instance->endpoint_list"); return U_ERROR_MEMORY; } } res = ulfius_copy_endpoint(&u_instance->endpoint_list[u_instance->nb_endpoints - 1], u_endpoint); if (res != U_OK) { return res; } else { // Add empty endpoint at the end of the endpoint list ulfius_copy_endpoint(&u_instance->endpoint_list[u_instance->nb_endpoints], ulfius_empty_endpoint()); } return U_OK; } else { y_log_message(Y_LOG_LEVEL_ERROR, "Ulfius - ulfius_add_endpoint, invalid struct _u_endpoint"); return U_ERROR_PARAMS; } } else { y_log_message(Y_LOG_LEVEL_ERROR, "Ulfius - ulfius_add_endpoint, invalid parameters"); return U_ERROR_PARAMS; } return U_ERROR; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ulfius_add_endpoint File: src/ulfius.c Repository: babelouest/ulfius The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2021-40540
HIGH
7.5
babelouest/ulfius
ulfius_add_endpoint
src/ulfius.c
c83f564c184a27145e07c274b305cabe943bbfaa
0
Analyze the following code function for security vulnerabilities
void WasmBinaryWriter::writeExpression(Expression* curr) { ExpressionStackWriter<WasmBinaryWriter>(curr, *this, o, debug); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: WasmBinaryWriter::writeExpression File: src/wasm/wasm-binary.cpp Repository: WebAssembly/binaryen The code follows secure coding practices.
[ "CWE-787", "CWE-476" ]
CVE-2020-18378
MEDIUM
6.5
WebAssembly/binaryen
WasmBinaryWriter::writeExpression
src/wasm/wasm-binary.cpp
766ff5108464161887dbcd209033c303bcff432c
0
Analyze the following code function for security vulnerabilities
static int svm_vcpu_pre_run(struct kvm_vcpu *vcpu) { return 1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: svm_vcpu_pre_run File: arch/x86/kvm/svm/svm.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2022-39189
HIGH
7.8
torvalds/linux
svm_vcpu_pre_run
arch/x86/kvm/svm/svm.c
6cd88243c7e03845a450795e134b488fc2afb736
0
Analyze the following code function for security vulnerabilities
static noinline int mmc_ioctl_cdrom_play_blk(struct cdrom_device_info *cdi, void __user *arg, struct packet_command *cgc) { struct cdrom_device_ops *cdo = cdi->ops; struct cdrom_blk blk; cdinfo(CD_DO_IOCTL, "entering CDROMPLAYBLK\n"); IOCTL_IN(arg, struct cdrom_blk, blk); cgc->cmd[0] = GPCMD_PLAY_AUDIO_10; cgc->cmd[2] = (blk.from >> 24) & 0xff; cgc->cmd[3] = (blk.from >> 16) & 0xff; cgc->cmd[4] = (blk.from >> 8) & 0xff; cgc->cmd[5] = blk.from & 0xff; cgc->cmd[7] = (blk.len >> 8) & 0xff; cgc->cmd[8] = blk.len & 0xff; cgc->data_direction = CGC_DATA_NONE; return cdo->generic_packet(cdi, cgc); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: mmc_ioctl_cdrom_play_blk File: drivers/cdrom/cdrom.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-200" ]
CVE-2013-2164
LOW
2.1
torvalds/linux
mmc_ioctl_cdrom_play_blk
drivers/cdrom/cdrom.c
050e4b8fb7cdd7096c987a9cd556029c622c7fe2
0
Analyze the following code function for security vulnerabilities
explicit CSRequest(X509_REQ *csr) : m_csr(csr) { assertx(m_csr); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: CSRequest File: hphp/runtime/ext/openssl/ext_openssl.cpp Repository: facebook/hhvm The code follows secure coding practices.
[ "CWE-787", "CWE-190", "CWE-125" ]
CVE-2020-1917
HIGH
7.5
facebook/hhvm
CSRequest
hphp/runtime/ext/openssl/ext_openssl.cpp
08193b7f0cd3910256e00d599f0f3eb2519c44ca
0
Analyze the following code function for security vulnerabilities
static Bool Background2D_get_aq_info(GF_Node *n, u32 FieldIndex, u8 *QType, u8 *AType, Fixed *b_min, Fixed *b_max, u32 *QT13_bits) { switch (FieldIndex) { case 1: *AType = 4; *QType = 4; *b_min = FLT2FIX(0); *b_max = FLT2FIX(1); return 1; default: return 0; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: Background2D_get_aq_info File: src/scenegraph/mpeg4_nodes.c Repository: gpac The code follows secure coding practices.
[ "CWE-476" ]
CVE-2021-46234
MEDIUM
4.3
gpac
Background2D_get_aq_info
src/scenegraph/mpeg4_nodes.c
70c6f6f832dccff814a19a74d87b97b3d68a4af5
0
Analyze the following code function for security vulnerabilities
byte* wolfSSL_X509_get_authorityKeyID(WOLFSSL_X509* x509, byte* dst, int* dstLen) { byte *id = NULL; int copySz = 0; WOLFSSL_ENTER("wolfSSL_X509_get_authorityKeyID"); if (x509 != NULL) { if (x509->authKeyIdSet) { copySz = min(dstLen != NULL ? *dstLen : 0, (int)x509->authKeyIdSz); id = x509->authKeyId; } if (dst != NULL && dstLen != NULL && id != NULL && copySz > 0) { XMEMCPY(dst, id, copySz); id = dst; *dstLen = copySz; } } WOLFSSL_LEAVE("wolfSSL_X509_get_authorityKeyID", copySz); return id; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: wolfSSL_X509_get_authorityKeyID File: src/ssl.c Repository: wolfSSL/wolfssl The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2021-37155
HIGH
7.5
wolfSSL/wolfssl
wolfSSL_X509_get_authorityKeyID
src/ssl.c
73076940af8904f98eee085994c176fe1876b95a
0
Analyze the following code function for security vulnerabilities
int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **err) { FILE *fh; int fd; int64_t ret = -1, handle; if (!has_mode) { mode = "r"; } slog("guest-file-open called, filepath: %s, mode: %s", path, mode); fh = fopen(path, mode); if (!fh) { error_setg_errno(err, errno, "failed to open file '%s' (mode: '%s')", path, mode); return -1; } /* set fd non-blocking to avoid common use cases (like reading from a * named pipe) from hanging the agent */ fd = fileno(fh); ret = fcntl(fd, F_GETFL); ret = fcntl(fd, F_SETFL, ret | O_NONBLOCK); if (ret == -1) { error_setg_errno(err, errno, "failed to make file '%s' non-blocking", path); fclose(fh); return -1; } handle = guest_file_handle_add(fh, err); if (error_is_set(err)) { fclose(fh); return -1; } slog("guest-file-open, handle: %d", handle); return handle; }
Vulnerability Classification: - CWE: CWE-264 - CVE: CVE-2013-2007 - Severity: MEDIUM - CVSS Score: 6.9 Description: qga: set umask 0077 when daemonizing (CVE-2013-2007) The qemu guest agent creates a bunch of files with insecure permissions when started in daemon mode. For example: -rw-rw-rw- 1 root root /var/log/qemu-ga.log -rw-rw-rw- 1 root root /var/run/qga.state -rw-rw-rw- 1 root root /var/log/qga-fsfreeze-hook.log In addition, at least all files created with the "guest-file-open" QMP command, and all files created with shell output redirection (or otherwise) by utilities invoked by the fsfreeze hook script are affected. For now mask all file mode bits for "group" and "others" in become_daemon(). Temporarily, for compatibility reasons, stick with the 0666 file-mode in case of files newly created by the "guest-file-open" QMP call. Do so without changing the umask temporarily. Signed-off-by: Laszlo Ersek <[email protected]> Signed-off-by: Anthony Liguori <[email protected]> Function: qmp_guest_file_open File: qga/commands-posix.c Repository: qemu Fixed Code: int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **err) { FILE *fh; Error *local_err = NULL; int fd; int64_t ret = -1, handle; if (!has_mode) { mode = "r"; } slog("guest-file-open called, filepath: %s, mode: %s", path, mode); fh = safe_open_or_create(path, mode, &local_err); if (local_err != NULL) { error_propagate(err, local_err); return -1; } /* set fd non-blocking to avoid common use cases (like reading from a * named pipe) from hanging the agent */ fd = fileno(fh); ret = fcntl(fd, F_GETFL); ret = fcntl(fd, F_SETFL, ret | O_NONBLOCK); if (ret == -1) { error_setg_errno(err, errno, "failed to make file '%s' non-blocking", path); fclose(fh); return -1; } handle = guest_file_handle_add(fh, err); if (error_is_set(err)) { fclose(fh); return -1; } slog("guest-file-open, handle: %d", handle); return handle; }
[ "CWE-264" ]
CVE-2013-2007
MEDIUM
6.9
qemu
qmp_guest_file_open
qga/commands-posix.c
c689b4f1bac352dcfd6ecb9a1d45337de0f1de67
1
Analyze the following code function for security vulnerabilities
static void convertFunctionWordToUint32() {}
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: convertFunctionWordToUint32 File: source/extensions/common/wasm/wasm.cc Repository: istio/envoy The code follows secure coding practices.
[ "CWE-476" ]
CVE-2020-10739
MEDIUM
5
istio/envoy
convertFunctionWordToUint32
source/extensions/common/wasm/wasm.cc
8788a3cf255b647fd14e6b5e2585abaaedb28153
0
Analyze the following code function for security vulnerabilities
txBoolean fxEnvironmentDeleteProperty(txMachine* the, txSlot* instance, txID id, txIndex index) { if (id) { txSlot** address = &(instance->next->next); txSlot* property; while ((property = *address)) { if (property->ID == id) { if (property->flag & XS_DONT_DELETE_FLAG) return 0; *address = property->next; property->next = C_NULL; return 1; } address = &(property->next); } return 1; } return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fxEnvironmentDeleteProperty File: xs/sources/xsType.c Repository: Moddable-OpenSource/moddable The code follows secure coding practices.
[ "CWE-125" ]
CVE-2021-29328
MEDIUM
5.8
Moddable-OpenSource/moddable
fxEnvironmentDeleteProperty
xs/sources/xsType.c
ef5216cc8bf87f8b16313eb13af0b54b06917c06
0
Analyze the following code function for security vulnerabilities
static size_t push_pipe(struct iov_iter *i, size_t size, int *idxp, size_t *offp) { struct pipe_inode_info *pipe = i->pipe; size_t off; int idx; ssize_t left; if (unlikely(size > i->count)) size = i->count; if (unlikely(!size)) return 0; left = size; data_start(i, &idx, &off); *idxp = idx; *offp = off; if (off) { left -= PAGE_SIZE - off; if (left <= 0) { pipe->bufs[idx].len += size; return size; } pipe->bufs[idx].len = PAGE_SIZE; idx = next_idx(idx, pipe); } while (idx != pipe->curbuf || !pipe->nrbufs) { struct page *page = alloc_page(GFP_USER); if (!page) break; pipe->nrbufs++; pipe->bufs[idx].ops = &default_pipe_buf_ops; pipe->bufs[idx].page = page; pipe->bufs[idx].offset = 0; if (left <= PAGE_SIZE) { pipe->bufs[idx].len = left; return size; } pipe->bufs[idx].len = PAGE_SIZE; left -= PAGE_SIZE; idx = next_idx(idx, pipe); } return size - left; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: push_pipe File: lib/iov_iter.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-200" ]
CVE-2017-5550
LOW
2.1
torvalds/linux
push_pipe
lib/iov_iter.c
b9dc6f65bc5e232d1c05fe34b5daadc7e8bbf1fb
0
Analyze the following code function for security vulnerabilities
intptr_t TR_J9SharedCacheVM::methodTrampolineLookup(TR::Compilation *comp, TR::SymbolReference * symRef, void * callSite) { TR_ASSERT(0, "methodTrampolineLookup not implemented for AOT"); return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: TR_J9SharedCacheVM::methodTrampolineLookup File: runtime/compiler/env/VMJ9.cpp Repository: eclipse-openj9/openj9 The code follows secure coding practices.
[ "CWE-440", "CWE-250" ]
CVE-2021-41035
HIGH
7.5
eclipse-openj9/openj9
TR_J9SharedCacheVM::methodTrampolineLookup
runtime/compiler/env/VMJ9.cpp
c6e0d9296ff9a3084965d83e207403de373c0bad
0
Analyze the following code function for security vulnerabilities
static void *WebObjects_create_config(apr_pool_t *p, server_rec *s) { WebObjects_config *wc; // allocate space for the configuration structure from the provided pool p. wc = (WebObjects_config *) apr_pcalloc(p, sizeof(WebObjects_config)); // set the default value for the document root. wc->root = NULL; // set the default value for the alias. wc->WebObjects_alias = (char *)WEBOBJECTS; // set the options wc->options = st_new(8); // return the new server configuration structure. return (void *) wc; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: WebObjects_create_config File: Utilities/Adaptors/Apache2.2/mod_WebObjects.c Repository: wocommunity/wonder The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-37724
MEDIUM
6.1
wocommunity/wonder
WebObjects_create_config
Utilities/Adaptors/Apache2.2/mod_WebObjects.c
9e75cb6cadd4df2d225209f2ff9f82bfd7fbe432
0
Analyze the following code function for security vulnerabilities
void destroyVideoDepacketizer(void) { if ((VideoCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) { freeDecodeUnitList(LbqDestroyLinkedBlockingQueue(&decodeUnitQueue)); } cleanupFrameState(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: destroyVideoDepacketizer File: src/VideoDepacketizer.c Repository: moonlight-stream/moonlight-common-c The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-42801
HIGH
7.6
moonlight-stream/moonlight-common-c
destroyVideoDepacketizer
src/VideoDepacketizer.c
f57bd745b4cbed577ea654fad4701bea4d38b44c
0
Analyze the following code function for security vulnerabilities
static void remove_migration_ptes(struct page *old, struct page *new) { rmap_walk(new, remove_migration_pte, old); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: remove_migration_ptes File: mm/migrate.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2010-0415
MEDIUM
4.6
torvalds/linux
remove_migration_ptes
mm/migrate.c
6f5a55f1a6c5abee15a0e878e5c74d9f1569b8b0
0
Analyze the following code function for security vulnerabilities
static void free_elfs(struct user_ta_elf_head *elfs) { struct user_ta_elf *elf; struct user_ta_elf *next; TAILQ_FOREACH_SAFE(elf, elfs, link, next) { TAILQ_REMOVE(elfs, elf, link); mobj_free(elf->mobj_code); free(elf->segs); free(elf); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: free_elfs File: core/arch/arm/kernel/user_ta.c Repository: OP-TEE/optee_os The code follows secure coding practices.
[ "CWE-189" ]
CVE-2019-1010294
MEDIUM
5
OP-TEE/optee_os
free_elfs
core/arch/arm/kernel/user_ta.c
7e768f8a473409215fe3fff8f6e31f8a3a0103c6
0
Analyze the following code function for security vulnerabilities
struct virtio_mei * vmei_host_client_to_vmei(struct vmei_host_client *hclient) { if (hclient && hclient->mclient) return hclient->mclient->vmei; return NULL; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: vmei_host_client_to_vmei File: devicemodel/hw/pci/virtio/virtio_mei.c Repository: projectacrn/acrn-hypervisor The code follows secure coding practices.
[ "CWE-416" ]
CVE-2021-36144
MEDIUM
5
projectacrn/acrn-hypervisor
vmei_host_client_to_vmei
devicemodel/hw/pci/virtio/virtio_mei.c
dd88504804e186029f845a166dc5c31695e2cca2
0
Analyze the following code function for security vulnerabilities
static void __init __maybe_unused build_assertions(void) { /* 2MB aligned regions */ BUILD_BUG_ON(XEN_VIRT_START & ~SECOND_MASK); BUILD_BUG_ON(FIXMAP_ADDR(0) & ~SECOND_MASK); BUILD_BUG_ON(BOOT_RELOC_VIRT_START & ~SECOND_MASK); /* 1GB aligned regions */ #ifdef CONFIG_ARM_32 BUILD_BUG_ON(XENHEAP_VIRT_START & ~FIRST_MASK); #else BUILD_BUG_ON(DIRECTMAP_VIRT_START & ~FIRST_MASK); #endif /* Page table structure constraints */ #ifdef CONFIG_ARM_64 BUILD_BUG_ON(zeroeth_table_offset(XEN_VIRT_START)); #endif BUILD_BUG_ON(first_table_offset(XEN_VIRT_START)); BUILD_BUG_ON(second_linear_offset(XEN_VIRT_START) >= LPAE_ENTRIES); #ifdef CONFIG_DOMAIN_PAGE BUILD_BUG_ON(DOMHEAP_VIRT_START & ~FIRST_MASK); #endif }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: build_assertions File: xen/arch/arm/mm.c Repository: xen-project/xen The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2020-27671
MEDIUM
6.9
xen-project/xen
build_assertions
xen/arch/arm/mm.c
5777a3742d88ff1c0ebc626ceb4fd47f9b3dc6d5
0
Analyze the following code function for security vulnerabilities
Expression* ParserTraits::NewThrowSyntaxError(MessageTemplate::Template message, const AstRawString* arg, int pos) { return NewThrowError(Runtime::kNewSyntaxError, message, arg, pos); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ParserTraits::NewThrowSyntaxError File: src/parsing/parser.cc Repository: chromium The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-5172
MEDIUM
4.3
chromium
ParserTraits::NewThrowSyntaxError
src/parsing/parser.cc
0e14baf712955a1993f742647bb2adc293702b80
0
Analyze the following code function for security vulnerabilities
static GF_Err PathLayout_get_field_index(GF_Node *n, u32 inField, u8 IndexMode, u32 *allField) { switch(IndexMode) { case GF_SG_FIELD_CODING_IN: *allField = PathLayout_In2All[inField]; return GF_OK; case GF_SG_FIELD_CODING_DEF: *allField = PathLayout_Def2All[inField]; return GF_OK; case GF_SG_FIELD_CODING_OUT: *allField = PathLayout_Out2All[inField]; return GF_OK; case GF_SG_FIELD_CODING_DYN: *allField = PathLayout_Dyn2All[inField]; return GF_OK; default: return GF_BAD_PARAM; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: PathLayout_get_field_index File: src/scenegraph/mpeg4_nodes.c Repository: gpac The code follows secure coding practices.
[ "CWE-476" ]
CVE-2021-46234
MEDIUM
4.3
gpac
PathLayout_get_field_index
src/scenegraph/mpeg4_nodes.c
70c6f6f832dccff814a19a74d87b97b3d68a4af5
0
Analyze the following code function for security vulnerabilities
static ssize_t aac_show_serial_number(struct device *device, struct device_attribute *attr, char *buf) { struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata; int len = 0; if (le32_to_cpu(dev->adapter_info.serial[0]) != 0xBAD0) len = snprintf(buf, 16, "%06X\n", le32_to_cpu(dev->adapter_info.serial[0])); if (len && !memcmp(&dev->supplement_adapter_info.MfgPcbaSerialNo[ sizeof(dev->supplement_adapter_info.MfgPcbaSerialNo)-len], buf, len-1)) len = snprintf(buf, 16, "%.*s\n", (int)sizeof(dev->supplement_adapter_info.MfgPcbaSerialNo), dev->supplement_adapter_info.MfgPcbaSerialNo); return min(len, 16); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: aac_show_serial_number File: drivers/scsi/aacraid/linit.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-6383
MEDIUM
6.9
torvalds/linux
aac_show_serial_number
drivers/scsi/aacraid/linit.c
f856567b930dfcdbc3323261bf77240ccdde01f5
0
Analyze the following code function for security vulnerabilities
bool omx_vdec::omx_cmd_queue::pop_entry(unsigned long *p1, unsigned long *p2, unsigned long *id) { bool ret = true; if (m_size > 0) { *id = m_q[m_read].id; *p1 = m_q[m_read].param1; *p2 = m_q[m_read].param2; // Move the read pointer ahead ++m_read; --m_size; if (m_read >= OMX_CORE_CONTROL_CMDQ_SIZE) { m_read = 0; } } else { ret = false; } return ret; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: omx_vdec::omx_cmd_queue::pop_entry File: mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2016-3746
HIGH
7.5
android
omx_vdec::omx_cmd_queue::pop_entry
mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp
5b82f4f90c3d531313714df4b936f92fb0ff15cf
0
Analyze the following code function for security vulnerabilities
static void rndr_header_anchor(struct buf *out, const struct buf *anchor) { static const char *STRIPPED = " -&+$,/:;=?@\"#{}|^~[]`\\*()%.!'"; const uint8_t *a = anchor->data; const size_t size = anchor->size; size_t i = 0; int stripped = 0, inserted = 0; for (; i < size; ++i) { // skip html tags if (a[i] == '<') { while (i < size && a[i] != '>') i++; // skip html entities } else if (a[i] == '&') { while (i < size && a[i] != ';') i++; } // replace non-ascii or invalid characters with dashes else if (!isascii(a[i]) || strchr(STRIPPED, a[i])) { if (inserted && !stripped) bufputc(out, '-'); // and do it only once stripped = 1; } else { bufputc(out, tolower(a[i])); stripped = 0; inserted++; } } // replace the last dash if there was anything added if (stripped && inserted) out->size--; // if anchor found empty, use djb2 hash for it if (!inserted && anchor->size) { unsigned long hash = 5381; for (i = 0; i < size; ++i) { hash = ((hash << 5) + hash) + a[i]; /* h * 33 + c */ } bufprintf(out, "part-%lx", hash); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: rndr_header_anchor File: ext/redcarpet/html.c Repository: vmg/redcarpet The code follows secure coding practices.
[ "CWE-79", "CWE-74" ]
CVE-2020-26298
LOW
3.5
vmg/redcarpet
rndr_header_anchor
ext/redcarpet/html.c
a699c82292b17c8e6a62e1914d5eccc252272793
0
Analyze the following code function for security vulnerabilities
static int xmlValidateNmtokensValueInternal(xmlDocPtr doc, const xmlChar *value) { const xmlChar *cur; int val, len; if (value == NULL) return(0); cur = value; val = xmlStringCurrentChar(NULL, cur, &len); cur += len; while (IS_BLANK(val)) { val = xmlStringCurrentChar(NULL, cur, &len); cur += len; } if (!xmlIsDocNameChar(doc, val)) return(0); while (xmlIsDocNameChar(doc, val)) { val = xmlStringCurrentChar(NULL, cur, &len); cur += len; } /* Should not test IS_BLANK(val) here -- see erratum E20*/ while (val == 0x20) { while (val == 0x20) { val = xmlStringCurrentChar(NULL, cur, &len); cur += len; } if (val == 0) return(1); if (!xmlIsDocNameChar(doc, val)) return(0); val = xmlStringCurrentChar(NULL, cur, &len); cur += len; while (xmlIsDocNameChar(doc, val)) { val = xmlStringCurrentChar(NULL, cur, &len); cur += len; } } if (val != 0) return(0); return(1); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: xmlValidateNmtokensValueInternal File: valid.c Repository: GNOME/libxml2 The code follows secure coding practices.
[ "CWE-416" ]
CVE-2022-23308
MEDIUM
4.3
GNOME/libxml2
xmlValidateNmtokensValueInternal
valid.c
652dd12a858989b14eed4e84e453059cd3ba340e
0
Analyze the following code function for security vulnerabilities
void VisitBinop(Node* node, UseInfo input_use, NodeOutputInfo output) { VisitBinop(node, input_use, input_use, output); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: VisitBinop File: src/compiler/simplified-lowering.cc Repository: chromium The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-1653
HIGH
9.3
chromium
VisitBinop
src/compiler/simplified-lowering.cc
58ab990aa8c3aeee38e888c1c33404f4b5a14759
0
Analyze the following code function for security vulnerabilities
static void nf_tables_commit_chain_prepare_cancel(struct net *net) { struct nftables_pernet *nft_net = nft_pernet(net); struct nft_trans *trans, *next; list_for_each_entry_safe(trans, next, &nft_net->commit_list, list) { struct nft_chain *chain = trans->ctx.chain; if (trans->msg_type == NFT_MSG_NEWRULE || trans->msg_type == NFT_MSG_DELRULE) { kvfree(chain->rules_next); chain->rules_next = NULL; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nf_tables_commit_chain_prepare_cancel File: net/netfilter/nf_tables_api.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-665" ]
CVE-2021-46283
MEDIUM
4.9
torvalds/linux
nf_tables_commit_chain_prepare_cancel
net/netfilter/nf_tables_api.c
ad9f151e560b016b6ad3280b48e42fa11e1a5440
0
Analyze the following code function for security vulnerabilities
static void h2_session_destroy(h2_session *session) { ap_assert(session); if (session->mplx) { h2_mplx_set_consumed_cb(session->mplx, NULL, NULL); h2_mplx_release_and_join(session->mplx, session->iowait); session->mplx = NULL; } ap_remove_input_filter_byhandle((session->r? session->r->input_filters : session->c->input_filters), "H2_IN"); if (session->ngh2) { nghttp2_session_del(session->ngh2); session->ngh2 = NULL; } if (session->c) { h2_ctx_clear(session->c); } if (APLOGctrace1(session->c)) { ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c, "h2_session(%ld): destroy", session->id); } if (session->pool) { apr_pool_destroy(session->pool); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: h2_session_destroy File: modules/http2/h2_session.c Repository: apache/httpd The code follows secure coding practices.
[ "CWE-20", "CWE-399" ]
CVE-2016-8740
MEDIUM
5
apache/httpd
h2_session_destroy
modules/http2/h2_session.c
29c63b786ae028d82405421585e91283c8fa0da3
0
Analyze the following code function for security vulnerabilities
static int llc_ui_listen(struct socket *sock, int backlog) { struct sock *sk = sock->sk; int rc = -EINVAL; lock_sock(sk); if (unlikely(sock->state != SS_UNCONNECTED)) goto out; rc = -EOPNOTSUPP; if (unlikely(sk->sk_type != SOCK_STREAM)) goto out; rc = -EAGAIN; if (sock_flag(sk, SOCK_ZAPPED)) goto out; rc = 0; if (!(unsigned int)backlog) /* BSDism */ backlog = 1; sk->sk_max_ack_backlog = backlog; if (sk->sk_state != TCP_LISTEN) { sk->sk_ack_backlog = 0; sk->sk_state = TCP_LISTEN; } sk->sk_socket->flags |= __SO_ACCEPTCON; out: release_sock(sk); return rc; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: llc_ui_listen File: net/llc/af_llc.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2022-28356
LOW
2.1
torvalds/linux
llc_ui_listen
net/llc/af_llc.c
764f4eb6846f5475f1244767d24d25dd86528a4a
0
Analyze the following code function for security vulnerabilities
static void dof_session_add_proto_data(dof_session_data *session, int proto, void *proto_data) { dof_proto_data *p1 = wmem_new0(wmem_packet_scope(), dof_proto_data); p1->proto = proto; p1->proto_data = proto_data; /* Add it to the list of items for this conversation. */ session->data_list = g_slist_insert_sorted(session->data_list, (gpointer *)p1, p_compare); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dof_session_add_proto_data File: epan/dissectors/packet-dof.c Repository: wireshark The code follows secure coding practices.
[ "CWE-835" ]
CVE-2017-7704
HIGH
7.8
wireshark
dof_session_add_proto_data
epan/dissectors/packet-dof.c
da53a90b6895e47e03c5de05edf84bd99d535fd8
0
Analyze the following code function for security vulnerabilities
FT_LOCAL_DEF( void ) cff_face_done( FT_Face cffface ) /* CFF_Face */ { CFF_Face face = (CFF_Face)cffface; FT_Memory memory; SFNT_Service sfnt; if ( !face ) return; memory = cffface->memory; sfnt = (SFNT_Service)face->sfnt; if ( sfnt ) sfnt->done_face( face ); { CFF_Font cff = (CFF_Font)face->extra.data; if ( cff ) { cff_font_done( cff ); FT_FREE( face->extra.data ); } } #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT cff_done_blend( face ); face->blend = NULL; #endif }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cff_face_done File: src/cff/cffobjs.c Repository: android The code follows secure coding practices.
[ "CWE-843" ]
CVE-2023-21287
CRITICAL
9.8
android
cff_face_done
src/cff/cffobjs.c
a79e80a25874dacaa266906a9048f13d4bac41c6
0
Analyze the following code function for security vulnerabilities
static GF_Err FootPrintSetNode_get_field_index(GF_Node *n, u32 inField, u8 IndexMode, u32 *allField) { switch(IndexMode) { case GF_SG_FIELD_CODING_IN: *allField = FootPrintSetNode_In2All[inField]; return GF_OK; case GF_SG_FIELD_CODING_DEF: *allField = FootPrintSetNode_Def2All[inField]; return GF_OK; case GF_SG_FIELD_CODING_OUT: *allField = FootPrintSetNode_Out2All[inField]; return GF_OK; default: return GF_BAD_PARAM; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: FootPrintSetNode_get_field_index File: src/scenegraph/mpeg4_nodes.c Repository: gpac The code follows secure coding practices.
[ "CWE-476" ]
CVE-2021-46234
MEDIUM
4.3
gpac
FootPrintSetNode_get_field_index
src/scenegraph/mpeg4_nodes.c
70c6f6f832dccff814a19a74d87b97b3d68a4af5
0
Analyze the following code function for security vulnerabilities
static u32 ctrn_sample_flags_to_index(u32 val) { if (!val) return 0; if (val & 0x0000FFFF) return 3; if (val & 0x00FF0000) return 2; return 1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ctrn_sample_flags_to_index File: src/isomedia/box_code_base.c Repository: gpac The code follows secure coding practices.
[ "CWE-125" ]
CVE-2023-5377
HIGH
7.1
gpac
ctrn_sample_flags_to_index
src/isomedia/box_code_base.c
8e9d6b38c036a97020c462ad48e1132e0ddc57ce
0
Analyze the following code function for security vulnerabilities
static void *writer_child_next(void *obj, void *prev) { WriterContext *ctx = obj; if (!prev && ctx->writer && ctx->writer->priv_class && ctx->priv) return ctx->priv; return NULL; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writer_child_next File: ffprobe.c Repository: ffmpeg The code follows secure coding practices.
[ "CWE-476" ]
CVE-2017-14225
MEDIUM
6.8
ffmpeg
writer_child_next
ffprobe.c
837cb4325b712ff1aab531bf41668933f61d75d2
0
Analyze the following code function for security vulnerabilities
static s32 brcmf_cfg80211_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request) { struct brcmf_cfg80211_vif *vif; s32 err = 0; brcmf_dbg(TRACE, "Enter\n"); vif = container_of(request->wdev, struct brcmf_cfg80211_vif, wdev); if (!check_vif_up(vif)) return -EIO; err = brcmf_cfg80211_escan(wiphy, vif, request, NULL); if (err) brcmf_err("scan error (%d)\n", err); brcmf_dbg(TRACE, "Exit\n"); return err; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: brcmf_cfg80211_scan File: drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-119" ]
CVE-2017-7541
HIGH
7.2
torvalds/linux
brcmf_cfg80211_scan
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
8f44c9a41386729fea410e688959ddaa9d51be7c
0
Analyze the following code function for security vulnerabilities
void SSH_notify_cred(PTInstVar pvar) { try_send_credentials(pvar); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: SSH_notify_cred File: ttssh2/ttxssh/ssh.c Repository: TeraTermProject/teraterm The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
TeraTermProject/teraterm
SSH_notify_cred
ttssh2/ttxssh/ssh.c
7279fbd6ef4d0c8bdd6a90af4ada2899d786eec0
0
Analyze the following code function for security vulnerabilities
static int ip_mc_leave_src(struct sock *sk, struct ip_mc_socklist *iml, struct in_device *in_dev) { struct ip_sf_socklist *psf = rtnl_dereference(iml->sflist); int err; if (psf == NULL) { /* any-source empty exclude case */ return ip_mc_del_src(in_dev, &iml->multi.imr_multiaddr.s_addr, iml->sfmode, 0, NULL, 0); } err = ip_mc_del_src(in_dev, &iml->multi.imr_multiaddr.s_addr, iml->sfmode, psf->sl_count, psf->sl_addr, 0); RCU_INIT_POINTER(iml->sflist, NULL); /* decrease mem now to avoid the memleak warning */ atomic_sub(IP_SFLSIZE(psf->sl_max), &sk->sk_omem_alloc); kfree_rcu(psf, rcu); return err; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ip_mc_leave_src File: net/ipv4/igmp.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-369" ]
CVE-2012-0207
HIGH
7.8
torvalds/linux
ip_mc_leave_src
net/ipv4/igmp.c
25c413ad0029ea86008234be28aee33456e53e5b
0
Analyze the following code function for security vulnerabilities
static struct ucounts *inc_net_namespaces(struct user_namespace *ns) { return inc_ucount(ns, current_euid(), UCOUNT_NET_NAMESPACES); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: inc_net_namespaces File: net/core/net_namespace.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-362" ]
CVE-2017-15129
MEDIUM
4.9
torvalds/linux
inc_net_namespaces
net/core/net_namespace.c
21b5944350052d2583e82dd59b19a9ba94a007f0
0
Analyze the following code function for security vulnerabilities
static ssize_t bfad_im_optionrom_version_show(struct device *dev, struct device_attribute *attr, char *buf) { struct Scsi_Host *shost = class_to_shost(dev); struct bfad_im_port_s *im_port = (struct bfad_im_port_s *) shost->hostdata[0]; struct bfad_s *bfad = im_port->bfad; char optrom_ver[BFA_VERSION_LEN]; bfa_get_adapter_optrom_ver(&bfad->bfa, optrom_ver); return snprintf(buf, PAGE_SIZE, "%s\n", optrom_ver); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: bfad_im_optionrom_version_show File: drivers/scsi/bfa/bfad_attr.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-401" ]
CVE-2019-19066
MEDIUM
4.7
torvalds/linux
bfad_im_optionrom_version_show
drivers/scsi/bfa/bfad_attr.c
0e62395da2bd5166d7c9e14cbc7503b256a34cb0
0
Analyze the following code function for security vulnerabilities
ALWAYS_INLINE void LoadThreeScalars(const T** data, Packet* l1, Packet* l2, Packet* l3) { LoadTwoScalars(data, l1, l2); LoadSingleScalar(data, l3); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: LoadThreeScalars File: tensorflow/core/kernels/sparse_matmul_op.cc Repository: tensorflow The code follows secure coding practices.
[ "CWE-125" ]
CVE-2021-41219
MEDIUM
4.6
tensorflow
LoadThreeScalars
tensorflow/core/kernels/sparse_matmul_op.cc
e6cf28c72ba2eb949ca950d834dd6d66bb01cfae
0
Analyze the following code function for security vulnerabilities
static int stbi__create_png_image(stbi__png *a, stbi_uc *image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) { int bytes = (depth == 16 ? 2 : 1); int out_bytes = out_n * bytes; stbi_uc *final; int p; if (!interlaced) return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); // de-interlacing final = (stbi_uc *) stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); if (!final) return stbi__err("outofmem", "Out of memory"); for (p=0; p < 7; ++p) { int xorig[] = { 0,4,0,2,0,1,0 }; int yorig[] = { 0,0,4,0,2,0,1 }; int xspc[] = { 8,8,4,4,2,2,1 }; int yspc[] = { 8,8,8,4,4,2,2 }; int i,j,x,y; // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 x = (a->s->img_x - xorig[p] + xspc[p]-1) / xspc[p]; y = (a->s->img_y - yorig[p] + yspc[p]-1) / yspc[p]; if (x && y) { stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { STBI_FREE(final); return 0; } for (j=0; j < y; ++j) { for (i=0; i < x; ++i) { int out_y = j*yspc[p]+yorig[p]; int out_x = i*xspc[p]+xorig[p]; memcpy(final + out_y*a->s->img_x*out_bytes + out_x*out_bytes, a->out + (j*x+i)*out_bytes, out_bytes); } } STBI_FREE(a->out); image_data += img_len; image_data_len -= img_len; } } a->out = final; return 1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: stbi__create_png_image File: stb_image.h Repository: nothings/stb The code follows secure coding practices.
[ "CWE-787" ]
CVE-2021-28021
MEDIUM
6.8
nothings/stb
stbi__create_png_image
stb_image.h
86b7570cfba845e8209c6aec2d15e487bb1d8bb4
0
Analyze the following code function for security vulnerabilities
static bool is_flow_key_reg(struct bpf_verifier_env *env, int regno) { const struct bpf_reg_state *reg = reg_state(env, regno); /* Separate to is_ctx_reg() since we still want to allow BPF_ST here. */ return reg->type == PTR_TO_FLOW_KEYS; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: is_flow_key_reg File: kernel/bpf/verifier.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-476" ]
CVE-2022-23222
HIGH
7.2
torvalds/linux
is_flow_key_reg
kernel/bpf/verifier.c
64620e0a1e712a778095bd35cbb277dc2259281f
0
Analyze the following code function for security vulnerabilities
static int selinux_file_fcntl(struct file *file, unsigned int cmd, unsigned long arg) { const struct cred *cred = current_cred(); int err = 0; switch (cmd) { case F_SETFL: if ((file->f_flags & O_APPEND) && !(arg & O_APPEND)) { err = file_has_perm(cred, file, FILE__WRITE); break; } /* fall through */ case F_SETOWN: case F_SETSIG: case F_GETFL: case F_GETOWN: case F_GETSIG: case F_GETOWNER_UIDS: /* Just check FD__USE permission */ err = file_has_perm(cred, file, 0); break; case F_GETLK: case F_SETLK: case F_SETLKW: case F_OFD_GETLK: case F_OFD_SETLK: case F_OFD_SETLKW: #if BITS_PER_LONG == 32 case F_GETLK64: case F_SETLK64: case F_SETLKW64: #endif err = file_has_perm(cred, file, FILE__LOCK); break; } return err; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: selinux_file_fcntl File: security/selinux/hooks.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-349" ]
CVE-2020-10751
LOW
3.6
torvalds/linux
selinux_file_fcntl
security/selinux/hooks.c
fb73974172ffaaf57a7c42f35424d9aece1a5af6
0
Analyze the following code function for security vulnerabilities
static void redisPushAutoFree(void *privdata, void *reply) { (void)privdata; freeReplyObject(reply); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: redisPushAutoFree File: deps/hiredis/hiredis.c Repository: redis The code follows secure coding practices.
[ "CWE-190", "CWE-680" ]
CVE-2021-32762
HIGH
9
redis
redisPushAutoFree
deps/hiredis/hiredis.c
0215324a66af949be39b34be2d55143232c1cb71
0
Analyze the following code function for security vulnerabilities
static void onInterruptCallback(v8::Isolate* isolate, void* data) { V8IsolateInterruptor* interruptor = reinterpret_cast<V8IsolateInterruptor*>(data); interruptor->onInterrupted(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onInterruptCallback File: third_party/WebKit/Source/bindings/core/v8/V8Binding.h Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2015-1268
MEDIUM
5
chromium
onInterruptCallback
third_party/WebKit/Source/bindings/core/v8/V8Binding.h
542ab473e104b7df23e95f933bda41723794d4da
0
Analyze the following code function for security vulnerabilities
int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3) { gfn_t pdpt_gfn = cr3 >> PAGE_SHIFT; unsigned offset = ((cr3 & (PAGE_SIZE-1)) >> 5) << 2; int i; int ret; u64 pdpte[ARRAY_SIZE(vcpu->arch.pdptrs)]; ret = kvm_read_guest_page(vcpu->kvm, pdpt_gfn, pdpte, offset * sizeof(u64), sizeof(pdpte)); if (ret < 0) { ret = 0; goto out; } for (i = 0; i < ARRAY_SIZE(pdpte); ++i) { if (is_present_gpte(pdpte[i]) && (pdpte[i] & vcpu->arch.mmu.rsvd_bits_mask[0][2])) { ret = 0; goto out; } } ret = 1; memcpy(vcpu->arch.pdptrs, pdpte, sizeof(vcpu->arch.pdptrs)); __set_bit(VCPU_EXREG_PDPTR, (unsigned long *)&vcpu->arch.regs_avail); __set_bit(VCPU_EXREG_PDPTR, (unsigned long *)&vcpu->arch.regs_dirty); out: return ret; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: load_pdptrs File: arch/x86/kvm/x86.c Repository: torvalds/linux The code follows secure coding practices.
[ "CWE-399" ]
CVE-2009-3290
HIGH
7.2
torvalds/linux
load_pdptrs
arch/x86/kvm/x86.c
07708c4af1346ab1521b26a202f438366b7bcffd
0
Analyze the following code function for security vulnerabilities
static inline int mpeg4_decode_dc(MpegEncContext *s, int n, int *dir_ptr) { int level, code; if (n < 4) code = get_vlc2(&s->gb, dc_lum.table, DC_VLC_BITS, 1); else code = get_vlc2(&s->gb, dc_chrom.table, DC_VLC_BITS, 1); if (code < 0 || code > 9 /* && s->nbit < 9 */) { av_log(s->avctx, AV_LOG_ERROR, "illegal dc vlc\n"); return -1; } if (code == 0) { level = 0; } else { if (IS_3IV1) { if (code == 1) level = 2 * get_bits1(&s->gb) - 1; else { if (get_bits1(&s->gb)) level = get_bits(&s->gb, code - 1) + (1 << (code - 1)); else level = -get_bits(&s->gb, code - 1) - (1 << (code - 1)); } } else { level = get_xbits(&s->gb, code); } if (code > 8) { if (get_bits1(&s->gb) == 0) { /* marker */ if (s->err_recognition & (AV_EF_BITSTREAM|AV_EF_COMPLIANT)) { av_log(s->avctx, AV_LOG_ERROR, "dc marker bit missing\n"); return -1; } } } } return ff_mpeg4_pred_dc(s, n, level, dir_ptr, 0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: mpeg4_decode_dc File: libavcodec/mpeg4videodec.c Repository: ffmpeg The code follows secure coding practices.
[ "CWE-787" ]
CVE-2014-125005
MEDIUM
4.3
ffmpeg
mpeg4_decode_dc
libavcodec/mpeg4videodec.c
3edc3b159503d512c919b3d5902f7026e961823a
0
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
38