instruction
stringclasses
1 value
input
stringlengths
64
129k
output
int64
0
1
__index_level_0__
int64
0
30k
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void RedirectToNtpOrAppsPage(content::WebContents* contents, signin::Source source) { VLOG(1) << "RedirectToNtpOrAppsPage"; GURL url(source == signin::SOURCE_APPS_PAGE_LINK ? chrome::kChromeUIAppsURL : chrome::kChromeUINewTabURL); content::OpenURLParams params(url, ...
0
1,446
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void VoidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { ExceptionState exception_state(info.GetIsolate(), ExceptionState::kExecutionContext, "TestObject", "voidMethodLongLongArg"); TestObject* impl = V8TestObject::ToImpl(info.Holder()); if (UNLIKELY(info.Length() < 1)) {...
0
23,416
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: free_key_ctx_bi (struct key_ctx_bi *ctx) { free_key_ctx(&ctx->encrypt); free_key_ctx(&ctx->decrypt); } Commit Message: Use constant time memcmp when comparing HMACs in openvpn_decrypt. Signed-off-by: Steffan Karger <steffan.karger@fox-it.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: Gert ...
0
5,719
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int do_last(struct nameidata *nd, struct file *file, const struct open_flags *op, int *opened) { struct dentry *dir = nd->path.dentry; int open_flag = op->open_flag; bool will_truncate = (open_flag & O_TRUNC) != 0; bool got_write = false; int acc_mode = op->acc_mode; unsigned seq; struct i...
0
16,136
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void __pg_init_all_paths(struct multipath *m) { struct pgpath *pgpath; unsigned long pg_init_delay = 0; m->pg_init_count++; m->pg_init_required = 0; if (m->pg_init_delay_retry) pg_init_delay = msecs_to_jiffies(m->pg_init_delay_msecs != DM_PG_INIT_DELAY_DEFAULT ? m->pg_init_delay_msecs : DM_P...
0
2,968
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static struct bpf_map *ld_imm64_to_map_ptr(struct bpf_insn *insn) { u64 imm64 = ((u64) (u32) insn[0].imm) | ((u64) (u32) insn[1].imm) << 32; return (struct bpf_map *) (unsigned long) imm64; } Commit Message: bpf: fix refcnt overflow On a system with >32Gbyte of phyiscal memory and infinite RLIMIT_MEMLOCK, th...
0
16,888
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: SkColor DialogNotification::GetBorderColor() const { switch (type_) { case DialogNotification::WALLET_USAGE_CONFIRMATION: return SkColorSetRGB(0xe5, 0xe5, 0xe5); case DialogNotification::REQUIRED_ACTION: case DialogNotification::WALLET_ERROR: case DialogNotification::DEVELOPER_WARNING: ...
0
22,887
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void pppol2tp_next_tunnel(struct net *net, struct pppol2tp_seq_data *pd) { for (;;) { pd->tunnel = l2tp_tunnel_find_nth(net, pd->tunnel_idx); pd->tunnel_idx++; if (pd->tunnel == NULL) break; /* Ignore L2TPv3 tunnels */ if (pd->tunnel->version < 3) break; } } Commit Message: net/l2tp: d...
0
5,261
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void put_dc(ERContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int mb_x, int mb_y) { int *linesize = s->cur_pic.f->linesize; int dc, dcu, dcv, y, i; for (i = 0; i < 4; i++) { dc = s->dc_val[0][mb_x * 2 + (i & 1) + (mb_y * 2 + (i >> 1)) * s->b8_stride]...
0
8,577
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: attach_cib_generation(xmlNode * msg, const char *field, xmlNode * a_cib) { xmlNode *generation = create_xml_node(NULL, XML_CIB_TAG_GENERATION_TUPPLE); if (a_cib != NULL) { copy_in_properties(generation, a_cib); } add_message_xml(msg, field, generation); free_xml(generation); } Commit...
0
8,237
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void free_fence_locked(struct vrend_fence *fence) { list_del(&fence->fences); glDeleteSync(fence->syncobj); free(fence); } Commit Message: CWE ID: CWE-772
0
17,156
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: PHP_FUNCTION(openssl_pkcs12_read) { zval *zout = NULL, *zextracerts, *zcert, *zpkey; char *pass, *zp12; int pass_len, zp12_len; PKCS12 * p12 = NULL; EVP_PKEY * pkey = NULL; X509 * cert = NULL; STACK_OF(X509) * ca = NULL; BIO * bio_in = NULL; int i; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "...
0
3,174
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int sc_pkcs15emu_sc_hsm_get_ec_public_key(struct sc_context *ctx, sc_cvc_t *cvc, struct sc_pkcs15_pubkey *pubkey) { struct sc_ec_parameters *ecp; const struct sc_lv_data *oid; int r; pubkey->algorithm = SC_ALGORITHM_EC; r = sc_pkcs15emu_sc_hsm_get_curve_oid(cvc, &oid); if (r != SC_SUCCESS) return...
0
25,591
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static __inline__ u32 fib6_new_sernum(void) { u32 n = ++rt_sernum; if ((__s32)n <= 0) rt_sernum = n = 1; return n; } Commit Message: net: fib: fib6_add: fix potential NULL pointer dereference When the kernel is compiled with CONFIG_IPV6_SUBTREES, and we return with an error in fn = fib6_add_1(), then error...
0
21,436
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: wkbReadPoint(wkbObj *w) { pointObj p; wkbReadPointP(w, &p); return p; } Commit Message: Fix potential SQL Injection with postgis TIME filters (#4834) CWE ID: CWE-89
0
19,520
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: _handle_carbons(xmpp_stanza_t *const stanza) { xmpp_stanza_t *carbons = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_CARBONS); if (!carbons) { return FALSE; } const char *name = xmpp_stanza_get_name(carbons); if (!name) { log_error("Unable to retrieve stanza name for Carbon")...
1
27,308
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: url::Origin BadSecurityOrigin() { return url::Origin(GURL(kBadSecurityOriginString)); } Commit Message: Switching AudioOutputAuthorizationHandler from using AudioManager interface to AudioSystem one. BUG=672468 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.ch...
0
17,974
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int hfi1_file_mmap(struct file *fp, struct vm_area_struct *vma) { struct hfi1_filedata *fd = fp->private_data; struct hfi1_ctxtdata *uctxt = fd->uctxt; struct hfi1_devdata *dd; unsigned long flags, pfn; u64 token = vma->vm_pgoff << PAGE_SHIFT, memaddr = 0; u8 subctxt, mapio = 0, vmf = 0, type; ssi...
0
13,153
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: BluetoothSocketSetPausedFunction::BluetoothSocketSetPausedFunction() {} Commit Message: chrome.bluetoothSocket: Fix regression in send() In https://crrev.com/c/997098, params_ was changed to a local variable, but it needs to last longer than that since net::WrappedIOBuffer may use the data after the local varia...
0
8,736
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static struct kvm_memory_slot *__gfn_to_memslot(struct kvm_memslots *slots, gfn_t gfn) { int i; for (i = 0; i < slots->nmemslots; ++i) { struct kvm_memory_slot *memslot = &slots->memslots[i]; if (gfn >= memslot->base_gfn && gfn < memslot->base_gfn + memslot->npages) return memslot; } retu...
0
14,027
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: do_migrate_range(unsigned long start_pfn, unsigned long end_pfn) { unsigned long pfn; struct page *page; int move_pages = NR_OFFLINE_AT_ONCE_PAGES; int not_managed = 0; int ret = 0; LIST_HEAD(source); for (pfn = start_pfn; pfn < end_pfn && move_pages > 0; pfn++) { if (!pfn_valid(pfn)) continue; pag...
0
7,904
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int _job_limits_match(void *x, void *key) { job_mem_limits_t *job_limits_ptr = (job_mem_limits_t *) x; uint32_t *job_id = (uint32_t *) key; if (job_limits_ptr->job_id == *job_id) return 1; return 0; } Commit Message: Fix security issue in _prolog_error(). Fix security issue caused by insecure file ...
0
14,467
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: int lzxd_decompress(struct lzxd_stream *lzx, off_t out_bytes) { /* bitstream and huffman reading variables */ register unsigned int bit_buffer; register int bits_left, i=0; unsigned char *i_ptr, *i_end; register unsigned short sym; int match_length, length_footer, extra, verbatim_bits, bytes_todo; ...
1
12,386
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: calcTabPos(void) { TabBuffer *tab; #if 0 int lcol = 0, rcol = 2, col; #else int lcol = 0, rcol = 0, col; #endif int n1, n2, na, nx, ny, ix, iy; #ifdef USE_MOUSE lcol = mouse_action.menu_str ? mouse_action.menu_width : 0; #endif if (nTab <= 0) return; n1 = (COLS - rcol - lcol) / TabC...
0
14,682
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void CorePageLoadMetricsObserver::OnFailedProvisionalLoad( content::NavigationHandle* navigation_handle) { net::Error error = navigation_handle->GetNetErrorCode(); if (error == net::OK || error == net::ERR_ABORTED) { return; } failed_provisional_load_info_.interval = base::TimeTicks::Now() ...
0
2,348
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int oz_build_endpoints_for_interface(struct usb_hcd *hcd, struct oz_port *port, struct usb_host_interface *intf, gfp_t mem_flags) { struct oz_hcd *ozhcd = port->ozhcd; int i; int if_ix = intf->desc.bInterfaceNumber; int request_heartbeat = 0; oz_dbg(ON, "interface[%d] = %p\n", if_ix, intf); if (...
0
11,366
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: std::string TestURLLoader::TestBasicFileRangePOST() { std::string message; pp::FileSystem file_system(instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY); int32_t rv = OpenFileSystem(&file_system, &message); if (rv != PP_OK) return ReportError(message.c_str(), rv); pp::FileRef file_ref(file_system, "/fil...
0
17,620
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void Parcel::initState() { LOG_ALLOC("Parcel %p: initState", this); mError = NO_ERROR; mData = 0; mDataSize = 0; mDataCapacity = 0; mDataPos = 0; ALOGV("initState Setting data size of %p to %zu", this, mDataSize); ALOGV("initState Setting data pos of %p to %zu", this, mDataPos); ...
0
2,183
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int oz_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) { struct oz_hcd *ozhcd = oz_hcd_private(hcd); int rc; int port_ix; struct oz_port *port; unsigned long irq_state; struct oz_urb_link *urbl; oz_dbg(URB, "%s: (%p)\n", __func__, urb); if (unlikely(ozhcd == NULL)) { ...
0
928
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void WebPagePrivate::resetBlockZoom() { m_currentBlockZoomNode = 0; m_currentBlockZoomAdjustedNode = 0; m_shouldReflowBlock = false; m_shouldConstrainScrollingToContentEdge = true; } Commit Message: [BlackBerry] Adapt to new BlackBerry::Platform::TouchPoint API https://bugs.webkit.org/show_bug.cg...
0
27,884
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( std::unique_ptr<download::DownloadUrlParameters> params, scoped_refptr<network::SharedURLLoaderFactory> blob_url_loader_factory, bool is_new_download, const GURL& site_url, bool is_download_allowed) { if (!is_download_allowed) ...
0
3,585
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static inline StringWithDirection canonicalizedTitle(Document* document, const StringWithDirection& titleWithDirection) { const String& title = titleWithDirection.string(); const CharacterType* characters = title.getCharacters<CharacterType>(); unsigned length = title.length(); unsigned i; St...
0
16,760
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int ipv6_get_saddr_eval(struct net *net, struct ipv6_saddr_score *score, struct ipv6_saddr_dst *dst, int i) { int ret; if (i <= score->rule) { switch (i) { case IPV6_SADDR_RULE_SCOPE: ret = score->scopedist; break; case IPV6_SADDR_RULE_PREFIX: ret = score->ma...
0
19,354
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void WebContentsImpl::OnAllPasswordInputsHiddenOnHttp() { controller_.ssl_manager()->DidHideAllPasswordInputsOnHttp(); } Commit Message: If JavaScript shows a dialog, cause the page to lose fullscreen. BUG=670135, 550017, 726761, 728276 Review-Url: https://codereview.chromium.org/2906133004 Cr-Commit-Positio...
0
25,030
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int __mkroute_input(struct sk_buff *skb, const struct fib_result *res, struct in_device *in_dev, __be32 daddr, __be32 saddr, u32 tos) { struct fib_nh_exception *fnhe; struct rtable *rth; int err; struct in_device *out_dev; bool do_cache; u32 itag = 0; /* get a working reference to...
0
586
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int follow_dotdot_rcu(struct nameidata *nd) { set_root_rcu(nd); while (1) { if (nd->path.dentry == nd->root.dentry && nd->path.mnt == nd->root.mnt) { break; } if (nd->path.dentry != nd->path.mnt->mnt_root) { struct dentry *old = nd->path.dentry; struct dentry *parent = old->d_parent...
0
8,029
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: Bool gf_sys_get_rti_os(u32 refresh_time_ms, GF_SystemRTInfo *rti, u32 flags) { u32 entry_time; u64 process_u_k_time; u32 u_k_time, idle_time; #if 0 char szProc[100]; #endif char line[2048]; FILE *f; assert(sys_init); entry_time = gf_sys_clock(); if (last_update_time && (entry_time - last_update_time < ...
0
21,245
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: ExtensionFunction* ExtensionFunctionDispatcher::CreateExtensionFunction( const ExtensionHostMsg_Request_Params& params, const Extension* extension, int requesting_process_id, const extensions::ProcessMap& process_map, extensions::ExtensionAPI* api, void* profile, IPC::Sender* ipc_sen...
1
27,365
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string) { cJSON *item = cJSON_New_Item(&global_hooks); if (item != NULL) { item->type = cJSON_String | cJSON_IsReference; item->valuestring = (char*)cast_away_const(string); } return item; } Commit Message: Fix cra...
0
2,227
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: TIFFReadDirEntryCheckRangeSlong8Long8(uint64 value) { if (value > TIFF_INT64_MAX) return(TIFFReadDirEntryErrRange); else return(TIFFReadDirEntryErrOk); } Commit Message: * libtiff/tif_dirread.c: modify ChopUpSingleUncompressedStrip() to instanciate compute ntrips as TIFFhowmany_32(td->td_imagelength, rowsp...
0
26,238
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bshift (u64 * b0, u64 * b1) { u64 t[2], mask; t[0] = *b0; t[1] = *b1; mask = -(t[1] & 1) & 0xe1; mask <<= 56; *b1 = (t[1] >> 1) ^ (t[0] << 63); *b0 = (t[0] >> 1) ^ mask; } Commit Message: GCM: move look-up table to .data section and unshare between processes * cipher/cipher-gcm.c (ATTR_ALIGNED_6...
0
11,637
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: BOOL CSoundFile::CanPackSample(LPSTR pSample, UINT nLen, UINT nPacking, BYTE *result) { int pos, old, oldpos, besttable = 0; DWORD dwErr, dwTotal, dwResult; int i,j; if (result) *result = 0; if ((!pSample) || (nLen < 1024)) return FALSE; dwResult = 0; for (j=1; j<MAX_PACK_TABLES; j++) { memcpy(Compress...
0
16,688
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void WebGraphicsContext3DCommandBufferImpl::shaderSource( WebGLId shader, const WGC3Dchar* string) { GLint length = strlen(string); gl_->ShaderSource(shader, 1, &string, &length); } Commit Message: Convert plugin and GPU process to brokered handle duplication. BUG=119250 Review URL: https://chromiumcode...
0
26,249
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: process_mux_master_hello(u_int rid, Channel *c, Buffer *m, Buffer *r) { u_int ver; struct mux_master_state *state = (struct mux_master_state *)c->mux_ctx; if (state == NULL) fatal("%s: channel %d: c->mux_ctx == NULL", __func__, c->self); if (state->hello_rcvd) { error("%s: HELLO received twice", __func__...
0
19,697
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: iasecc_logout(struct sc_card *card) { struct sc_context *ctx = card->ctx; struct sc_path path; int rv; LOG_FUNC_CALLED(ctx); if (!card->ef_atr || !card->ef_atr->aid.len) return SC_SUCCESS; memset(&path, 0, sizeof(struct sc_path)); path.type = SC_PATH_TYPE_DF_NAME; memcpy(path.value, card->ef_atr->aid....
0
13,826
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bool AutolaunchInfoBarDelegate::Cancel() { action_taken_ = true; auto_launch_trial::UpdateInfobarResponseMetric( auto_launch_trial::INFOBAR_CUT_IT_OUT); const bool auto_launch = false; auto_launch_trial::UpdateToggleAutoLaunchMetric(auto_launch); content::BrowserThread::PostTask( content::...
0
18,317
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static unsigned long source_load(int cpu, int type) { struct rq *rq = cpu_rq(cpu); unsigned long total = weighted_cpuload(cpu); if (type == 0 || !sched_feat(LB_BIAS)) return total; return min(rq->cpu_load[type-1], total); } Commit Message: Sched: fix skip_clock_update optimization idle_balance() drops/r...
0
23,153
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: file_ms_free(struct magic_set *ms) { size_t i; if (ms == NULL) return; for (i = 0; i < MAGIC_SETS; i++) mlist_free(ms->mlist[i]); free(ms->o.pbuf); free(ms->o.buf); free(ms->c.li); free(ms); } Commit Message: * Enforce limit of 8K on regex searches that have no limits * Allow the l modifier for regex ...
0
13,297
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int wc_ecc_curve_load(const ecc_set_type* dp, ecc_curve_spec** pCurve, byte load_mask) { int ret = 0, x; ecc_curve_spec* curve; byte load_items = 0; /* mask of items to load */ if (dp == NULL || pCurve == NULL) return BAD_FUNC_ARG; #ifdef ECC_CACHE_CURVE x = wc_ecc_get_cur...
0
28,184
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: CC_ESC_WARN(ScanEnv* env, UChar *c) { if (onig_warn == onig_null_warn) return ; if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_WARN_CC_OP_NOT_ESCAPED) && IS_SYNTAX_BV(env->syntax, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC)) { UChar buf[WARN_BUFSIZE]; onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc, env-...
0
1,715
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: xmlParse3986HierPart(xmlURIPtr uri, const char **str) { const char *cur; int ret; cur = *str; if ((*cur == '/') && (*(cur + 1) == '/')) { cur += 2; ret = xmlParse3986Authority(uri, &cur); if (ret != 0) return(ret); if (uri->server == NULL) uri->port = -1; ret = xmlParse3986PathAbEmpty(ur...
0
9,105
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void hns_gmac_get_info(void *mac_drv, struct mac_info *mac_info) { enum hns_gmac_duplex_mdoe duplex; enum hns_port_mode speed; u32 rx_pause; u32 tx_pause; u32 rx; u32 tx; u16 fc_tx_timer; struct hns_gmac_port_mode_cfg port_mode = { GMAC_10M_MII, 0 }; hns_gmac_port_mode_get(mac_drv, &port_mode); ...
0
10,415
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: int sock_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __user *optlen) { struct sock *sk = sock->sk; union { int val; struct linger ling; struct timeval tm; } v; int lv = sizeof(int); int len; if (get_user(len, optlen)) return -EFAULT; if (len < 0) retu...
1
3,126
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void frag_dump_sample_flags(FILE * trace, u32 flags) { fprintf(trace, " SamplePadding=\"%d\" Sync=\"%d\" DegradationPriority=\"%d\" IsLeading=\"%d\" DependsOn=\"%d\" IsDependedOn=\"%d\" HasRedundancy=\"%d\"", GF_ISOM_GET_FRAG_PAD(flags), GF_ISOM_GET_FRAG_SYNC(flags), GF_ISOM_GET_FRAG_DEG(flags), ...
0
12,034
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: const FeatureEntry* GetFeatureEntries(size_t* count) { *count = arraysize(kFeatureEntries); return kFeatureEntries; } Commit Message: [Contextual Search] Change "Now on Tap" to "Contextual Cards" BUG=644934 Review-Url: https://codereview.chromium.org/2361163003 Cr-Commit-Position: refs/heads/master@{#42089...
0
26,210
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static bool ide_is_pio_out(IDEState *s) { if (s->end_transfer_func == ide_sector_write || s->end_transfer_func == ide_atapi_cmd) { return false; } else if (s->end_transfer_func == ide_sector_read || s->end_transfer_func == ide_transfer_stop || s->end_transfer_...
0
318
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static noinline int split_node(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int level) { struct extent_buffer *c; struct extent_buffer *split; struct btrfs_disk_key disk_key; int mid; int ret; u32 c_nritems; c = path->nodes[level]; WARN_ON(btrfs_...
0
19,513
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: correlation_coefficient2(double sxx, double syy, double sxy) { double coe, tmp; tmp = (syy + sxx - 2 * sxy) * sxx; if (tmp < Tiny) tmp = Tiny; coe = (sxx - sxy) / sqrt(tmp); if (coe > 1.) return 1.; if (coe < -1.) return -1.; return coe; } Commit Message: Prevent negative indent va...
0
17,929
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int iucv_callback_connreq(struct iucv_path *path, u8 ipvmid[8], u8 ipuser[16]) { unsigned char user_data[16]; unsigned char nuser_data[16]; unsigned char src_name[8]; struct sock *sk, *nsk; struct iucv_sock *iucv, *niucv; int err; memcpy(src_name, ipuser, 8); EBCASC(src_name, 8); /* Find out...
0
4,704
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void Element::setPseudo(const AtomicString& value) { setAttribute(pseudoAttr, value); } Commit Message: Set Attr.ownerDocument in Element#setAttributeNode() Attr objects can move across documents by setAttributeNode(). So It needs to reset ownerDocument through TreeScopeAdoptr::adoptIfNeeded(). BUG=248950 ...
0
18,207
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static uint16_t avrc_send_continue_frag(uint8_t handle, uint8_t label) { tAVRC_FRAG_CB* p_fcb; BT_HDR *p_pkt_old, *p_pkt; uint8_t *p_old, *p_data; uint8_t cr = AVCT_RSP; p_fcb = &avrc_cb.fcb[handle]; p_pkt = p_fcb->p_fmsg; AVRC_TRACE_DEBUG("%s handle = %u label = %u len = %d", __func__, handle, ...
0
22,395
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: status_t OMXNodeInstance::configureVideoTunnelMode( OMX_U32 portIndex, OMX_BOOL tunneled, OMX_U32 audioHwSync, native_handle_t **sidebandHandle) { Mutex::Autolock autolock(mLock); if (mSailed) { android_errorWriteLog(0x534e4554, "29422020"); return INVALID_OPERATION; } CLOG_CONFIG(configu...
0
12,299
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: int nbd_disconnect(int fd) { ioctl(fd, NBD_CLEAR_QUE); ioctl(fd, NBD_DISCONNECT); ioctl(fd, NBD_CLEAR_SOCK); return 0; } Commit Message: CWE ID: CWE-20
0
11,653
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: OVS_REQUIRES(ofproto_mutex) { struct rule_collection *old_rules = &ofm->old_rules; struct rule_collection *new_rules = &ofm->new_rules; if (rule_collection_n(old_rules) == 0 && rule_collection_n(new_rules) == 1) { add_flow_finish(ofproto, ofm, req); } else if (rule_collection_...
0
11,424
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: mainloop_set_trigger(crm_trigger_t * source) { source->trigger = TRUE; } Commit Message: High: core: Internal tls api improvements for reuse with future LRMD tls backend. CWE ID: CWE-399
0
14,302
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: smb_ofile_set_flags( smb_ofile_t *of, uint32_t flags) { ASSERT(of); ASSERT(of->f_magic == SMB_OFILE_MAGIC); ASSERT(of->f_refcnt); mutex_enter(&of->f_mutex); of->f_flags |= flags; mutex_exit(&of->f_mutex); } Commit Message: 7483 SMB flush on pipe triggers NULL pointer dereference in module smbsrv...
0
27,384
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bool ThreadHeap::AdvanceLazySweep(double deadline_seconds) { for (int i = 0; i < BlinkGC::kNumberOfArenas; i++) { double slack = 0.001; double remaining_budget = deadline_seconds - slack - CurrentTimeTicksInSeconds(); if (remaining_budget <= 0 || !arenas_[i]->LazySweepWithDeadline(de...
0
6,111
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: TIFFReadDirectoryFindEntry(TIFF* tif, TIFFDirEntry* dir, uint16 dircount, uint16 tagid) { TIFFDirEntry* m; uint16 n; (void) tif; for (m=dir, n=0; n<dircount; m++, n++) { if (m->tdir_tag==tagid) return(m); } return(0); } Commit Message: * libtiff/tif_dirread.c: modify ChopUpSingleUncompressedStrip() t...
0
22,236
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void batchConfigureConstants(v8::Handle<v8::FunctionTemplate> functionDescriptor, v8::Handle<v8::ObjectTemplate> proto, const BatchedConstant* constants, size_t constantCount) { for (size_t i = 0; i < constantCount; ++i) { ...
0
10,953
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void calc_load_account_idle(struct rq *this_rq) { long delta; delta = calc_load_fold_active(this_rq); if (delta) atomic_long_add(delta, &calc_load_tasks_idle); } Commit Message: Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to ...
0
21,240
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bool GLES2DecoderImpl::DoIsShader(GLuint client_id) { const ShaderManager::ShaderInfo* shader = GetShaderInfo(client_id); return shader != NULL && !shader->IsDeleted(); } Commit Message: Fix SafeAdd and SafeMultiply BUG=145648,145544 Review URL: https://chromiumcodereview.appspot.com/10916165 git-svn-id:...
0
27,771
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int r_bin_dwarf_expand_debug_abbrev(RBinDwarfDebugAbbrev *da) { RBinDwarfAbbrevDecl *tmp; if (!da || da->capacity == 0 || da->capacity != da->length) { return -EINVAL; } tmp = (RBinDwarfAbbrevDecl*)realloc (da->decls, da->capacity * 2 * sizeof (RBinDwarfAbbrevDecl)); if (!tmp) { return -ENOM...
0
29,251
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void RenderProcessHostImpl::AddFilter(BrowserMessageFilter* filter) { filter->RegisterAssociatedInterfaces(channel_.get()); channel_->AddFilter(filter->GetFilter()); } Commit Message: Switching AudioOutputAuthorizationHandler from using AudioManager interface to AudioSystem one. BUG=672468 CQ_INCLUDE_TRYBOT...
0
13,071
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void tee_mmu_rem_rwmem(struct user_ta_ctx *utc, struct mobj *mobj, vaddr_t va) { struct vm_region *reg; TAILQ_FOREACH(reg, &utc->vm_info->regions, link) { if (reg->mobj == mobj && reg->va == va) { free_pgt(utc, reg->va, reg->size); umap_remove_region(utc->vm_info, reg); return; } } } Commit Mess...
0
25,331
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: int wvlan_uil(struct uilreq *urq, struct wl_private *lp) { int ioctl_ret = 0; /*------------------------------------------------------------------------*/ DBG_FUNC("wvlan_uil"); DBG_ENTER(DbgInfo); switch (urq->command) { case UIL_FUN_CONNECT: DBG_TRACE(DbgInfo, "IOCTL: WVLAN2_IOCTL_UIL -- WVLAN2_UIL_CO...
0
21,637
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static s32 brcmf_init_priv_mem(struct brcmf_cfg80211_info *cfg) { cfg->conf = kzalloc(sizeof(*cfg->conf), GFP_KERNEL); if (!cfg->conf) goto init_priv_mem_out; cfg->extra_buf = kzalloc(WL_EXTRA_BUF_MAX, GFP_KERNEL); if (!cfg->extra_buf) goto init_priv_mem_out; cfg->wowl.nd = kzalloc(sizeof(*cfg->wowl.nd) ...
0
12,262
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: parse_SET_IP_ECN(char *arg, struct ofpbuf *ofpacts, enum ofputil_protocol *usable_protocols OVS_UNUSED) { uint8_t ecn; char *error; error = str_to_u8(arg, "ECN", &ecn); if (error) { return error; } if (ecn & ~IP_ECN_MASK) { return xasprintf("%s: not a val...
0
3,828
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bool netdev_has_any_upper_dev(struct net_device *dev) { ASSERT_RTNL(); return !list_empty(&dev->adj_list.upper); } Commit Message: tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For...
0
15,134
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int get_queue_result(struct sem_queue *q) { int error; error = q->status; while (unlikely(error == IN_WAKEUP)) { cpu_relax(); error = q->status; } return error; } Commit Message: ipc,sem: fine grained locking for semtimedop Introduce finer grained locking for semtimedop, to handle the common c...
0
9,889
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: TestDidCreateFrameWebFrameClient() : m_frameCount(0), m_parent(0) { } Commit Message: Call didAccessInitialDocument when javascript: URLs are used. BUG=265221 TEST=See bug for repro. Review URL: https://chromiumcodereview.appspot.com/22572004 git-svn-id: svn://svn.chromium.org/blink/trunk@155790 b...
0
4,889
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static inline void cifs_stats_fail_inc(struct cifs_tcon *tcon, uint16_t code) { cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_failed[code]); } Commit Message: [CIFS] Possible null ptr deref in SMB2_tcon As Raphael Geissert pointed out, tcon_error_exit can dereference tcon and there is one path in which tcon ...
0
7,116
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: ResourcePtr<RawResource> ResourceFetcher::fetchMainResource(FetchRequest& request, const SubstituteData& substituteData) { if (substituteData.isValid()) preCacheSubstituteDataForMainResource(request, substituteData); return toRawResource(requestResource(Resource::MainResource, request)); } Commit...
0
4,934
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: P2PQuicTransportImpl::P2PQuicTransportImpl( P2PQuicTransportConfig p2p_transport_config, std::unique_ptr<net::QuicChromiumConnectionHelper> helper, std::unique_ptr<quic::QuicConnection> connection, const quic::QuicConfig& quic_config, quic::QuicClock* clock) : quic::QuicSession(connection....
1
11,702
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int phar_set_compression(zval *zv, void *argument) /* {{{ */ { phar_entry_info *entry = (phar_entry_info *)Z_PTR_P(zv); php_uint32 compress = *(php_uint32 *)argument; if (entry->is_deleted) { return ZEND_HASH_APPLY_KEEP; } entry->old_flags = entry->flags; entry->flags &= ~PHAR_ENT_COMPRESSION_MAS...
0
1,365
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void Splash::arbitraryTransformMask(SplashImageMaskSource src, void *srcData, int srcWidth, int srcHeight, SplashCoord *mat, GBool glyphMode) { SplashBitmap *scaledMask; SplashClipResult clipRes, clipRes2; SplashPipe pipe; int scaledWidth, scaledHeight, t0, t1; SplashCoord r00, r01, r10,...
1
7,369
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void flush_data_end_io(struct request *rq, int error) { struct request_queue *q = rq->q; struct blk_flush_queue *fq = blk_get_flush_queue(q, NULL); /* * After populating an empty queue, kick it to avoid stall. Read * the comment in flush_end_io(). */ if (blk_flush_complete_seq(rq, fq, REQ_FSEQ_...
0
16,876
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void SetDevToolsAttachedOnIO( base::WeakPtr<ServiceWorkerContextCore> context_weak, int64_t version_id, bool attached) { if (ServiceWorkerContextCore* context = context_weak.get()) { if (ServiceWorkerVersion* version = context->GetLiveVersion(version_id)) version->SetDevToolsAttached(attac...
0
18,405
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int StreamTcpPacketIsFinShutdownAck(TcpSession *ssn, Packet *p) { TcpStream *stream = NULL, *ostream = NULL; uint32_t seq; uint32_t ack; if (p->flags & PKT_PSEUDO_STREAM_END) return 0; if (!(ssn->state == TCP_TIME_WAIT || ssn->state == TCP_CLOSE_WAIT || ssn->state == TCP_LAST_A...
0
19,499
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void RendererSchedulerImpl::OnBeginNestedRunLoop() { seqlock_queueing_time_estimator_.seqlock.WriteBegin(); seqlock_queueing_time_estimator_.data.OnBeginNestedRunLoop(); seqlock_queueing_time_estimator_.seqlock.WriteEnd(); main_thread_only().nested_runloop = true; ApplyVirtualTimePolicy(); } Commit Me...
0
27,474
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void snd_timer_notify(struct snd_timer *timer, int event, struct timespec *tstamp) { unsigned long flags; unsigned long resolution = 0; struct snd_timer_instance *ti, *ts; if (timer->card && timer->card->shutdown) return; if (! (timer->hw.flags & SNDRV_TIMER_HW_SLAVE)) return; if (snd_BUG_ON(event < SN...
0
12,086
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void WebGraphicsContext3DCommandBufferImpl::postSubBufferCHROMIUM( int x, int y, int width, int height) { if (ShouldUseSwapClient()) swap_client_->OnViewContextSwapBuffersPosted(); gl_->PostSubBufferCHROMIUM(x, y, width, height); context_->Echo(base::Bind( &WebGraphicsContext3DCommandBufferImp...
0
519
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: String8::String8(const char* o) : mString(allocFromUTF8(o, strlen(o))) { if (mString == NULL) { mString = getEmptyString(); } } Commit Message: libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 Inconsistent behaviour between utf16_to_utf8 and utf16_to_utf8_length is caus...
0
28,614
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static MediaContainerName LookupContainerByFirst4(const uint8_t* buffer, int buffer_size) { if (buffer_size < kMinimumContainerSize) return CONTAINER_UNKNOWN; uint32_t first4 = Read32(buffer); switch (first4) { case 0x1a45dfa3: if (CheckWebm(b...
0
9,589
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: call_reserve(struct rpc_task *task) { dprint_status(task); task->tk_status = 0; task->tk_action = call_reserveresult; xprt_reserve(task); } Commit Message: NLM: Don't hang forever on NLM unlock requests If the NLM daemon is killed on the NFS server, we can currently end up hanging forever on an 'unlock' ...
0
25,462
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: sync_api::UserShare* SyncBackendHost::GetUserShare() const { DCHECK(syncapi_initialized_); return core_->syncapi()->GetUserShare(); } Commit Message: Enable HistoryModelWorker by default, now that bug 69561 is fixed. BUG=69561 TEST=Run sync manually and run integration tests, sync should not crash. Review ...
0
24,910
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: cmsBool WriteCountAndSting(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsMLU* mlu, const char* Section) { cmsUInt32Number TextSize; char* Text; TextSize = cmsMLUgetASCII(mlu, "PS", Section, NULL, 0); Text = (char*) _cmsMalloc(self ->ContextID, TextSize); if (!_cmsWriteUInt32Numbe...
0
17,747
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bool Extension::LoadBackgroundPersistent( const APIPermissionSet& api_permissions, string16* error) { if (is_platform_app()) { background_page_is_persistent_ = false; return true; } Value* background_persistent = NULL; if (!manifest_->Get(keys::kBackgroundPersistent, &background_persisten...
0
15,690
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: MagickExport MagickBooleanType PerceptibleImageChannel(Image *image, const ChannelType channel,const double epsilon) { #define PerceptibleImageTag "Perceptible/Image" CacheView *image_view; ExceptionInfo *exception; MagickBooleanType status; MagickOffsetType progress; ssize_t ...
0
26,637
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: long Block::Parse(const Cluster* pCluster) { if (pCluster == NULL) return -1; if (pCluster->m_pSegment == NULL) return -1; assert(m_start >= 0); assert(m_size >= 0); assert(m_track <= 0); assert(m_frames == NULL); assert(m_frame_count <= 0); long long pos = m_start; const long long stop = m_sta...
0
21,552
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void ContinueCheckingForFileExistence( content::CheckForFileExistenceCallback callback) { std::move(callback).Run(false); } Commit Message: Downloads : Fixed an issue of opening incorrect download file When one download overwrites another completed download, calling download.open in the old download cause...
0
7,341