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 HTMLMediaElement::UpdateControlsVisibility() { if (!isConnected()) { if (GetMediaControls()) GetMediaControls()->Hide(); return; } bool native_controls = ShouldShowControls(RecordMetricsBehavior::kDoRecord); if (!RuntimeEnabledFeatures::LazyInitializeMediaControlsEnabled() || Ru...
0
8,420
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: Element* Document::CreateRawElement(const QualifiedName& qname, CreateElementFlags flags) { Element* element = nullptr; if (qname.NamespaceURI() == HTMLNames::xhtmlNamespaceURI) { element = HTMLElementFactory::Create(qname.LocalName(), *this, flags); if (!element) {...
0
25,941
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 rose_info_open(struct inode *inode, struct file *file) { return seq_open(file, &rose_info_seqops); } Commit Message: rose: Add length checks to CALL_REQUEST parsing Define some constant offsets for CALL_REQUEST based on the description at <http://www.techfest.com/networking/wan/x25plp.htm> and the d...
0
12,412
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 tty_flush_works(struct tty_struct *tty) { flush_work(&tty->SAK_work); flush_work(&tty->hangup_work); if (tty->link) { flush_work(&tty->link->SAK_work); flush_work(&tty->link->hangup_work); } } Commit Message: tty: Fix unsafe ldisc reference via ioctl(TIOCGETD) ioctl(TIOCGETD) retrieves the l...
0
13,016
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 WebPluginProxy::DidPaint() { waiting_for_paint_ = false; if (!damaged_rect_.IsEmpty()) InvalidateRect(damaged_rect_); } Commit Message: Convert plugin and GPU process to brokered handle duplication. BUG=119250 Review URL: https://chromiumcodereview.appspot.com/9958034 git-svn-id: svn://svn.chromiu...
0
13,222
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 kvm_vcpu_ioctl_x86_set_xsave(struct kvm_vcpu *vcpu, struct kvm_xsave *guest_xsave) { u64 xstate_bv = *(u64 *)&guest_xsave->region[XSAVE_HDR_OFFSET / sizeof(u32)]; if (cpu_has_xsave) { /* * Here we allow setting states that are not present in * CPUID leaf 0xD, index 0, EDX:EAX. This i...
0
495
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 udf_fill_super(struct super_block *sb, void *options, int silent) { int i; int ret; struct inode *inode = NULL; struct udf_options uopt; struct kernel_lb_addr rootdir, fileset; struct udf_sb_info *sbi; uopt.flags = (1 << UDF_FLAG_USE_AD_IN_ICB) | (1 << UDF_FLAG_STRICT); uopt.uid = -1; uopt.gi...
0
19,053
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 DatabaseMessageFilter::OnDatabaseSizeChanged( const string16& origin_identifier, const string16& database_name, int64 database_size) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); if (database_connections_.IsOriginUsed(origin_identifier)) { Send(new DatabaseMsg_UpdateSize(orig...
0
1,527
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 xmp_datetime_compare(XmpDateTime *left, XmpDateTime *right) { if (!left && !right) { return 0; } if (!left) { return -1; } if (!right) { return 1; } XMP_DateTime _left; ASSIGN(_left, *left); XMP_DateTime _right; ASSIGN(_right, *right); return...
0
10,241
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 __net_get_random_once(void *buf, int nbytes, bool *done, struct static_key *done_key) { static DEFINE_SPINLOCK(lock); unsigned long flags; spin_lock_irqsave(&lock, flags); if (*done) { spin_unlock_irqrestore(&lock, flags); return false; } get_random_bytes(buf, nbytes); *done = true; ...
1
2,124
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 nfs4_clear_inode(struct inode *inode) { /* If we are holding a delegation, return it! */ nfs_inode_return_delegation_noreclaim(inode); /* First call standard NFS clear_inode() code */ nfs_clear_inode(inode); } Commit Message: NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Mykle...
0
24,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: static int mpol_new_bind(struct mempolicy *pol, const nodemask_t *nodes) { if (nodes_empty(*nodes)) return -EINVAL; pol->v.nodes = *nodes; return 0; } Commit Message: mm/mempolicy.c: fix error handling in set_mempolicy and mbind. In the case that compat_get_bitmap fails we do not want to copy the bitmap to...
0
13,949
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 is_handler(const struct dirent *dirent) { if (strncmp(dirent->d_name, "handler_", 8)) return 0; return 1; } Commit Message: fixed local DoS when UnregisterHandler was called for a not existing handler Any user with DBUS access could cause a SEGFAULT in tcmu-runner by running something like this:...
0
20,800
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: OnFulfilled(ScriptState* script_state, ReadableStreamBytesConsumer* consumer) : ScriptFunction(script_state), consumer_(consumer) {} Commit Message: ReadableStreamBytesConsumer should check read results ReadableStreamBytesConsumer expected that the results from ReadableStreamReaderDefaultRead should be ...
0
27,100
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 GLES2DecoderImpl::DoLinkProgram(GLuint program) { TRACE_EVENT0("gpu", "GLES2DecoderImpl::DoLinkProgram"); ProgramManager::ProgramInfo* info = GetProgramInfoNotShader( program, "glLinkProgram"); if (!info) { return; } ShaderTranslator* vertex_translator = NULL; ShaderTranslator* fragmen...
0
5,576
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: clock_t jiffies_to_clock_t(long x) { #if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0 # if HZ < USER_HZ return x * (USER_HZ / HZ); # else return x / (HZ / USER_HZ); # endif #else return div_u64((u64)x * TICK_NSEC, NSEC_PER_SEC / USER_HZ); #endif } Commit Message: remove div_long_long_rem x86 is the only arch ...
0
3,481
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 run_event_gtk_alert(const char *msg, void *args) { GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(g_wnd_assistant), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE, "%s", msg); char *tagged_msg = t...
0
18,078
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: ~BlinkTestEnvironmentScope() { content::TearDownBlinkTestEnvironment(); } Commit Message: Add assertions that the empty Platform::cryptographicallyRandomValues() overrides are not being used. These implementations are not safe and look scary if not accompanied by an assertion. Also one of th...
0
23,173
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: xfs_handle_acceptable( void *context, struct dentry *dentry) { return 1; } Commit Message: fs,userns: Change inode_capable to capable_wrt_inode_uidgid The kernel has no concept of capabilities with respect to inodes; inodes exist independently of namespaces. For example, inode_capable(inode, CAP_LINUX_IM...
0
21,832
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 BackingStoreGtk::XShowRect(const gfx::Point &origin, const gfx::Rect& rect, XID target) { XCopyArea(display_, pixmap_, target, static_cast<GC>(pixmap_gc_), rect.x(), rect.y(), rect.width(), rect.height(), rect.x() + origin.x(), rect.y() + origin.y());...
0
3,396
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: AutofillDriver* AutofillExternalDelegate::GetAutofillDriver() { return driver_; } Commit Message: [Autofill] Remove AutofillPopupViewViews and associated feature. Bug: 906135,831603 Change-Id: I3c982f8b3ffb4928c7c878e74e10113999106499 Reviewed-on: https://chromium-review.googlesource.com/c/1387124 Reviewed-by...
0
27,816
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: rend_services_add_filenames_to_lists(smartlist_t *open_lst, smartlist_t *stat_lst) { if (!rend_service_list) return; SMARTLIST_FOREACH_BEGIN(rend_service_list, rend_service_t *, s) { if (!rend_service_is_ephemeral(s)) { rend_service_add_filenames_to_list(open...
0
27,583
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: VaapiVideoDecodeAccelerator::VaapiH264Accelerator::CreateH264Picture() { scoped_refptr<VaapiDecodeSurface> va_surface = vaapi_dec_->CreateSurface(); if (!va_surface) return nullptr; return new VaapiH264Picture(std::move(va_surface)); } Commit Message: vaapi vda: Delete owned objects on worker thre...
1
16,799
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 deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) { TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::StaticAttrib...
0
28,341
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 entersafe_read_binary(sc_card_t *card, unsigned int idx, u8 *buf, size_t count, unsigned long flags) { sc_apdu_t apdu; u8 recvbuf[SC_MAX_APDU_BUFFER_SIZE]; int r; SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); assert(count <= card->max_recv_size); sc_format_apdu(card, &apdu,...
0
20,475
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: Event* Document::createEvent(ScriptState* script_state, const String& event_type, ExceptionState& exception_state) { Event* event = nullptr; ExecutionContext* execution_context = ExecutionContext::From(script_state); for (const auto& factory : EventF...
0
22,770
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 ipip6_tunnel_init(struct net_device *dev) { struct ip_tunnel *tunnel = netdev_priv(dev); int err; tunnel->dev = dev; tunnel->net = dev_net(dev); strcpy(tunnel->parms.name, dev->name); ipip6_tunnel_bind_dev(dev); dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats); if (!dev->tstats)...
0
7,357
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 OmniboxViewViews::OnCompositingLockStateChanged( ui::Compositor* compositor) {} Commit Message: Strip JavaScript schemas on Linux text drop When dropping text onto the Omnibox, any leading JavaScript schemes should be stripped to avoid a "self-XSS" attack. This stripping already occurs in all cases exc...
0
7,818
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: unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *buf, unsigned char *limit) { int extdatalen = 0; unsigned char *orig = buf; unsigned char *ret = buf; /* don't add extensions for SSLv3 unless doing secure renegotiation */ if (s->client...
0
23,751
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 ssize_t o2nm_cluster_keepalive_delay_ms_store( struct config_item *item, const char *page, size_t count) { struct o2nm_cluster *cluster = to_o2nm_cluster(item); ssize_t ret; unsigned int val; ret = o2nm_cluster_attr_write(page, count, &val); if (ret > 0) { if (cluster->cl_keepalive_delay_ms != v...
0
5,604
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 XButtonMap* GetInstance() { return Singleton<XButtonMap>::get(); } Commit Message: Make shared memory segments writable only by their rightful owners. BUG=143859 TEST=Chrome's UI still works on Linux and Chrome OS Review URL: https://chromiumcodereview.appspot.com/10854242 git-svn-id: svn://svn....
0
6,616
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 int __sock_recvmsg_nosec(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t size, int flags) { struct sock_iocb *si = kiocb_to_siocb(iocb); si->sock = sock; si->scm = NULL; si->msg = msg; si->size = size; si->flags = flags; return sock->ops->recvmsg(iocb, sock, m...
0
4,457
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: cisco_autorp_print(netdissect_options *ndo, register const u_char *bp, register u_int len) { int type; int numrps; int hold; ND_TCHECK(bp[0]); ND_PRINT((ndo, " auto-rp ")); type = bp[0]; switch (type) { case 0x11: ND_PRINT((ndo, "candidate-advert")); break; case 0x12: ND_PRINT((...
0
16,314
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 init_buffer_callbacks(vpx_codec_alg_priv_t *ctx) { int i; for (i = 0; i < ctx->num_frame_workers; ++i) { VPxWorker *const worker = &ctx->frame_workers[i]; FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1; VP9_COMMON *const cm = &frame_worker_data->pbi->common; Buff...
0
5,763
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 skipBytes(long numBytes) { decoder_source_mgr* src = (decoder_source_mgr*)m_info.src; long bytesToSkip = std::min(numBytes, (long)src->pub.bytes_in_buffer); src->pub.bytes_in_buffer -= (size_t)bytesToSkip; src->pub.next_input_byte += bytesToSkip; m_bytesToSkip...
0
24,052
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 snd_pcm_lib_write_transfer(struct snd_pcm_substream *substream, unsigned int hwoff, unsigned long data, unsigned int off, snd_pcm_uframes_t frames) { struct snd_pcm_runtime *runtime = substream->runtime; int err; char __user *buf = (char __user *) data + frames_to_bytes...
0
5,321
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 btm_sec_init (UINT8 sec_mode) { #if 0 /* cleared in btm_init; put back in if calling from anywhere else! */ int i; memset (btm_cb.sec_serv_rec, 0, sizeof (btm_cb.sec_serv_rec)); memset (btm_cb.sec_dev_rec, 0, sizeof (btm_cb.sec_dev_rec)); memset (&btm_cb.pairing_tle, 0, sizeof(TIMER_LIST_ENT))...
0
5,945
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 GetAccessibilitySelectionFiredCount() { return accessibility_selection_fired_count_; } Commit Message: MacViews: Enable secure text input for password Textfields. In Cocoa the NSTextInputContext automatically enables secure text input when activated and it's in the secure text entry mode. RenderWid...
0
19,157
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 NavigationControllerImpl::LoadEntry(NavigationEntryImpl* entry) { SetPendingEntry(entry); NavigateToPendingEntry(NO_RELOAD); } Commit Message: Delete unneeded pending entries in DidFailProvisionalLoad to prevent a spoof. BUG=280512 BUG=278899 TEST=See bug for repro steps. Review URL: https://chromiumc...
0
12,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: static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, struct sctp_association *assoc, sctp_socket_type_t type) { struct sctp_sock *oldsp = sctp_sk(oldsk); struct sctp_sock *newsp = sctp_sk(newsk); struct sctp_bind_bucket *pp; /* hash list port iterator */ struct sctp_endpoint...
0
12,049
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 parity_protection_init(void) { switch (current_cpu_type()) { case CPU_24K: case CPU_34K: case CPU_74K: case CPU_1004K: { #define ERRCTL_PE 0x80000000 #define ERRCTL_L2P 0x00800000 unsigned long errctl; unsigned int l1parity_present, l2parity_present; errctl = read_c0_ecc(); ...
0
3,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: static void Ins_SCFS( INS_ARG ) { Long K; Int L; L = (Int)args[0]; if ( BOUNDS( args[0], CUR.zp2.n_points ) ) { CUR.error = TT_Err_Invalid_Reference; return; } K = CUR_Func_project( CUR.zp2.cur_x[L], CUR.zp2.cur_y[L] ); CUR_Func_mov...
0
20,178
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_fs_path(struct task_struct *task, struct path *path, bool root) { struct fs_struct *fs; int result = -ENOENT; task_lock(task); fs = task->fs; if (fs) { read_lock(&fs->lock); *path = root ? fs->root : fs->pwd; path_get(path); read_unlock(&fs->lock); result = 0; } task_unlock(task);...
0
21,647
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 S_AL_BufferUnload(sfxHandle_t sfx) { if(knownSfx[sfx].filename[0] == '\0') return; if(!knownSfx[sfx].inMemory) return; S_AL_ClearError( qfalse ); qalDeleteBuffers(1, &knownSfx[sfx].buffer); if(qalGetError() != AL_NO_ERROR) Com_Printf( S_COLOR_RED "ERROR: Can't delete sound buffer for %s\n...
0
17,894
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 RenderBlockFlow::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) { RenderBlock::styleDidChange(diff, oldStyle); bool canPropagateFloatIntoSibling = !isFloatingOrOutOfFlowPositioned() && !avoidsFloats(); if (diff == StyleDifferenceLayout && s_canPropagateFloatIntoSibling && !ca...
1
6,548
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 rfc_send_fcon(tRFC_MCB* p_mcb, bool is_command) { uint8_t* p_data; BT_HDR* p_buf = (BT_HDR*)osi_malloc(RFCOMM_CMD_BUF_SIZE); p_buf->offset = L2CAP_MIN_OFFSET + RFCOMM_CTRL_FRAME_LEN; p_data = (uint8_t*)(p_buf + 1) + p_buf->offset; *p_data++ = RFCOMM_EA | RFCOMM_I_CR(is_command) | RFCOMM_MX_FCON; *...
0
11,751
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 DispatchCompositionEndEvent(LocalFrame& frame, const String& text) { Element* target = frame.GetDocument()->FocusedElement(); if (!target) return; CompositionEvent* event = CompositionEvent::Create( EventTypeNames::compositionend, frame.DomWindow(), text); target->DispatchEvent(event); } ...
0
7,274
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 ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len) { struct inode *inode = file_inode(file); loff_t new_size = 0; unsigned int max_blocks; int ret = 0; int flags; ext4_lblk_t lblk; unsigned int blkbits = inode->i_blkbits; /* * Encrypted inodes can't handle collapse range or ins...
0
28,800
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 PaintController::BeginFrame(const void* frame) { frame_first_paints_.push_back(FrameFirstPaint(frame)); } Commit Message: Reland "[CI] Make paint property nodes non-ref-counted" This reverts commit 887383b30842d9d9006e11bb6932660a3cb5b1b7. Reason for revert: Retry in M69. Original change's description:...
0
17,177
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: RenderProcessHost* RenderProcessHostImpl::FindReusableProcessHostForSite( BrowserContext* browser_context, const GURL& site_url) { if (!ShouldFindReusableProcessHostForSite(browser_context, site_url)) return nullptr; std::set<RenderProcessHost*> eligible_foreground_hosts; std::set<RenderProcess...
0
26,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: static bool cmd_cfa_req_ext_error_code(IDEState *s, uint8_t cmd) { s->error = 0x09; /* miscellaneous error */ s->status = READY_STAT | SEEK_STAT; ide_set_irq(s->bus); return false; } Commit Message: CWE ID: CWE-399
0
6,960
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 DomOperationObserver::Observe( int type, const content::NotificationSource& source, const content::NotificationDetails& details) { if (type == content::NOTIFICATION_DOM_OPERATION_RESPONSE) { content::Details<DomOperationNotificationDetails> dom_op_details(details); if (dom_op_details->autom...
0
19,582
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 AppCacheUpdateJob::ScheduleUpdateRetry(int delay_ms) { } Commit Message: AppCache: fix a browser crashing bug that can happen during updates. BUG=558589 Review URL: https://codereview.chromium.org/1463463003 Cr-Commit-Position: refs/heads/master@{#360967} CWE ID:
0
3,327
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 jpc_cox_getcompparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in, int prtflag, jpc_coxcp_t *compparms) { uint_fast8_t tmp; int i; /* Eliminate compiler warning about unused variables. */ ms = 0; cstate = 0; if (jpc_getuint8(in, &compparms->numdlvls) || jpc_getuint8(in, &compparms-...
0
24,785
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 __debugfs_remove(struct dentry *dentry, struct dentry *parent) { int ret = 0; if (simple_positive(dentry)) { dget(dentry); if (d_is_dir(dentry)) ret = simple_rmdir(d_inode(parent), dentry); else simple_unlink(d_inode(parent), dentry); if (!ret) d_delete(dentry); dput(dentry); } ...
0
29,189
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 TEE_Result get_prop_ta_app_id(struct tee_ta_session *sess, void *buf, size_t *blen) { if (*blen < sizeof(TEE_UUID)) { *blen = sizeof(TEE_UUID); return TEE_ERROR_SHORT_BUFFER; } *blen = sizeof(TEE_UUID); return tee_svc_copy_to_user(buf, &sess->ctx->uuid, sizeof(TEE_UUID)); } Commit Message...
0
18,613
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 tg3_get_strings(struct net_device *dev, u32 stringset, u8 *buf) { switch (stringset) { case ETH_SS_STATS: memcpy(buf, &ethtool_stats_keys, sizeof(ethtool_stats_keys)); break; case ETH_SS_TEST: memcpy(buf, &ethtool_test_keys, sizeof(ethtool_test_keys)); break; default: WARN_ON(1); /* we n...
0
12,798
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 prepare_lock_switch(struct rq *rq, struct task_struct *next) { #ifdef CONFIG_SMP /* * We can optimise this out completely for !SMP, because the * SMP rebalancing from interrupt is the only thing that cares * here. */ next->on_cpu = 1; #endif } Commit Message: perf: Remove the nmi par...
0
29,570
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 IsValidStateForWindowsCreateFunction( const windows::Create::Params::CreateData* create_data) { if (!create_data) return true; bool has_bound = create_data->left || create_data->top || create_data->width || create_data->height; switch (create_data->state) { case windows...
0
15,728
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 kernel_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) { mm_segment_t oldfs = get_fs(); char __user *uoptval; int err; uoptval = (char __user __force *) optval; set_fs(KERNEL_DS); if (level == SOL_SOCKET) err = sock_setsockopt(sock, level, optname, uoptv...
0
18,421
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 test_exp(BIO *bp, BN_CTX *ctx) { BIGNUM *a,*b,*d,*e,*one; int i; a=BN_new(); b=BN_new(); d=BN_new(); e=BN_new(); one=BN_new(); BN_one(one); for (i=0; i<num2; i++) { BN_bntest_rand(a,20+i*5,0,0); /**/ BN_bntest_rand(b,2+i,0,0); /**/ if (BN_exp(d,a,b,ctx) <= 0) return(0); if (bp != NU...
0
23,785
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 uint32_t read_dword(LSIState *s, uint32_t addr) { uint32_t buf; pci_dma_read(PCI_DEVICE(s), addr, &buf, 4); return cpu_to_le32(buf); } Commit Message: CWE ID: CWE-835
0
16,188
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 DesktopWindowTreeHostX11::EndMoveLoop() { x11_window_move_client_->EndMoveLoop(); } Commit Message: Fix PIP window being blank after minimize/show DesktopWindowTreeHostX11::SetVisible only made the call into OnNativeWidgetVisibilityChanged when transitioning from shown to minimized and not vice versa. T...
0
19,073
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: nfsd4_secinfo(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_secinfo *secinfo) { struct svc_export *exp; struct dentry *dentry; __be32 err; err = fh_verify(rqstp, &cstate->current_fh, S_IFDIR, NFSD_MAY_EXEC); if (err) return err; err = nfsd_lookup_dentry(rqstp, &cstate->...
0
13,851
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 TitleWatcher::TitleWasSet(NavigationEntry* entry) { TestTitle(); } Commit Message: Apply ExtensionNavigationThrottle filesystem/blob checks to all frames. BUG=836858 Change-Id: I34333a72501129fd40b5a9aa6378c9f35f1e7fc2 Reviewed-on: https://chromium-review.googlesource.com/1028511 Reviewed-by: Devlin <rd...
0
15,930
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: RenderThreadImpl::GetFileThreadMessageLoopProxy() { DCHECK(message_loop() == base::MessageLoop::current()); if (!file_thread_) { file_thread_.reset(new base::Thread("Renderer::FILE")); file_thread_->Start(); } return file_thread_->message_loop_proxy(); } Commit Message: Suspend shared timers whil...
0
17,732
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: nfssvc_encode_readdirres(struct svc_rqst *rqstp, __be32 *p, struct nfsd_readdirres *resp) { xdr_ressize_check(rqstp, p); p = resp->buffer; *p++ = 0; /* no more entries */ *p++ = htonl((resp->common.err == nfserr_eof)); rqstp->rq_res.page_len = (((unsigned long)p-1) & ~PAGE_MASK)+1; return 1; } Comm...
0
5,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: static int comedi_open(struct inode *inode, struct file *file) { const unsigned minor = iminor(inode); struct comedi_device_file_info *dev_file_info = comedi_get_device_file_info(minor); struct comedi_device *dev = dev_file_info ? dev_file_info->device : NULL; if (dev == NULL) { DPRINTK("invalid ...
0
29,634
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: DataReductionProxyIOData::CreateCustomProxyConfig( bool is_warmup_url, const std::vector<DataReductionProxyServer>& proxies_for_http) const { auto config = network::mojom::CustomProxyConfig::New(); if (params::IsIncludedInHoldbackFieldTrial()) { config->rules = configurator_ ->...
0
28,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: void FrameView::scrollbarExistenceDidChange() { if (!frame().view()) return; bool useOverlayScrollbars = ScrollbarTheme::theme()->usesOverlayScrollbars(); if (!useOverlayScrollbars && needsLayout()) layout(); if (renderView() && renderView()->usesCompositing()) { renderV...
0
28,959
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 V8TestObject::CachedStringOrNoneAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_cachedStringOrNoneAttribute_Getter"); test_object_v8_internal::CachedStringOrNoneAttributeAttributeGetter(...
0
12,274
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: nfsd4_readdir(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_readdir *readdir) { u64 cookie = readdir->rd_cookie; static const nfs4_verifier zeroverf; /* no need to check permission - this will be done in nfsd_readdir() */ if (readdir->rd_bmval[1] & NFSD_WRITEONLY_ATTRS_WOR...
0
18,401
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: rdpsnd_send_waveconfirm(uint16 tick, uint8 packet_index) { STREAM s; s = rdpsnd_init_packet(SNDC_WAVECONFIRM, 4); out_uint16_le(s, tick); out_uint8(s, packet_index); out_uint8(s, 0); s_mark_end(s); rdpsnd_send(s); logger(Sound, Debug, "rdpsnd_send_waveconfirm(), tick=%u, index=%u", (unsigned) ti...
0
25,050
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 br_mdb_del(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) { struct net_device *dev; struct br_mdb_entry *entry; struct net_bridge *br; int err; err = br_mdb_parse(skb, nlh, &dev, &entry); if (err < 0) return err; br = netdev_priv(dev); err = __br_mdb_del(br, entry); if (!err) __b...
0
20,492
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 _pmcraid_io_done(struct pmcraid_cmd *cmd, int reslen, int ioasc) { struct scsi_cmnd *scsi_cmd = cmd->scsi_cmd; int rc = 0; scsi_set_resid(scsi_cmd, reslen); pmcraid_info("response(%d) CDB[0] = %x ioasc:result: %x:%x\n", le32_to_cpu(cmd->ioa_cb->ioarcb.response_handle) >> 2, cmd->ioa_cb->ioarc...
0
24,140
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 TestingAutomationProvider::LockScreen(DictionaryValue* args, IPC::Message* reply_message) { new ScreenLockUnlockObserver(this, reply_message, true); DBusThreadManager::Get()->GetPowerManagerClient()-> NotifyScreenLockRequested(); } Commit Message: chromeo...
0
19,978
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 DownloadItemImpl::OnContentCheckCompleted(DownloadDangerType danger_type, DownloadInterruptReason reason) { DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(AllDataSaved()); DCHECK_EQ(state_, IN_PROGRESS_INTERNAL); DVLOG(20) << __func__ << "() danger_type...
0
1,886
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: MediaStreamVideoRenderer::RepaintCB GetRepaintCallback() { return base::Bind(&FrameDeliverer::OnVideoFrame, weak_factory_.GetWeakPtr()); } Commit Message: Simplify "WouldTaintOrigin" concept in media/blink Currently WebMediaPlayer has three predicates: - DidGetOpaqueResponseFromSe...
0
1,441
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_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, int flags) { struct kiocb iocb; struct sock_iocb siocb; int ret; init_sync_kiocb(&iocb, NULL); iocb.private = &siocb; ret = __sock_recvmsg(&iocb, sock, msg, size, flags); if (-EIOCBQUEUED == ret) ret = wait_on_sync_kiocb(&iocb); ...
0
2,734
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 ext4_ext_rm_idx(handle_t *handle, struct inode *inode, struct ext4_ext_path *path, int depth) { int err; ext4_fsblk_t leaf; /* free index block */ depth--; path = path + depth; leaf = ext4_idx_pblock(path->p_idx); if (unlikely(path->p_hdr->eh_entries == 0)) { EXT4_ERROR_INODE(inode, "path-...
0
11,635
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: connection_ap_handshake_socks_reply(entry_connection_t *conn, char *reply, size_t replylen, int endreason) { char buf[256]; socks5_reply_status_t status = stream_end_reason_to_socks5_response(endreason); tor_assert(conn->socks_request); /* make sure it's an AP stream...
0
13,057
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 int sas_ata_qc_issue(struct ata_queued_cmd *qc) { unsigned long flags; struct sas_task *task; struct scatterlist *sg; int ret = AC_ERR_SYSTEM; unsigned int si, xfer = 0; struct ata_port *ap = qc->ap; struct domain_device *dev = ap->private_data; struct sas_ha_struct *sas_ha = dev->port->ha...
0
9,851
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 char *FLTGetBBOX(FilterEncodingNode *psFilterNode, rectObj *psRect) { const char *pszReturn = NULL; if (!psFilterNode || !psRect) return NULL; if (psFilterNode->pszValue && strcasecmp(psFilterNode->pszValue, "BBOX") == 0) { if (psFilterNode->psRightNode && psFilterNode->psRightNode->pOther) ...
0
29,155
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 kvm_fetch_guest_virt(gva_t addr, void *val, unsigned int bytes, struct kvm_vcpu *vcpu, struct x86_exception *exception) { u32 access = (kvm_x86_ops->get_cpl(vcpu) == 3) ? PFERR_USER_MASK : 0; return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access | PFERR_FETCH_MASK, ex...
0
20,458
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: PassRefPtr<Event> DeviceOrientationController::getLastEvent() { return DeviceOrientationEvent::create(EventTypeNames::deviceorientation, DeviceOrientationDispatcher::instance().latestDeviceOrientationData()); } Commit Message: DevTools: remove references to modules/device_orientation from core BUG=3...
0
1,842
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 SplitString(const string16& str, char16 c, std::vector<string16>* r) { DCHECK(CBU16_IS_SINGLE(c)); SplitStringT(str, c, true, r); } Commit Message: wstring: remove wstring version of SplitString Retry of r84336. BUG=23581 Review URL: http://codereview.chromium....
0
23,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: de_dotdot( char* file ) { char* cp; char* cp2; int l; /* Collapse any multiple / sequences. */ while ( ( cp = strstr( file, "//") ) != (char*) 0 ) { for ( cp2 = cp + 2; *cp2 == '/'; ++cp2 ) continue; (void) strcpy( cp + 1, cp2 ); } /* Remove leading ./ and any /./ sequences....
1
4,754
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: svcauth_gss_get_principal(SVCAUTH *auth) { struct svc_rpc_gss_data *gd; char *pname; gd = SVCAUTH_PRIVATE(auth); if (gd->cname.length == 0 || gd->cname.length >= SIZE_MAX) return (NULL); if ((pname = malloc(gd->cname.length + 1)) == NULL) return (NULL); memcpy(pname, gd->cname.value, gd->cname.lengt...
0
10,662
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: XFixesExtensionInit(void) { ExtensionEntry *extEntry; if (!dixRegisterPrivateKey (&XFixesClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(XFixesClientRec))) return; if (XFixesSelectionInit() && XFixesCursorInit() && XFixesRegionInit() && (extEntry = AddExtension(XFIXES_NAME, XFixe...
0
5,979
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: jas_image_t *ras_decode(jas_stream_t *in, char *optstr) { ras_hdr_t hdr; ras_cmap_t cmap; jas_image_t *image; jas_image_cmptparm_t cmptparms[3]; jas_image_cmptparm_t *cmptparm; int clrspc; int numcmpts; int i; if (optstr) { jas_eprintf("warning: ignoring RAS decoder options\n"); } /* Read the heade...
0
24,621
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: xsltCopyAttrListNoOverwrite(xsltTransformContextPtr ctxt, xmlNodePtr invocNode, xmlNodePtr target, xmlAttrPtr attr) { xmlAttrPtr copy; xmlNsPtr origNs = NULL, copyNs = NULL; xmlChar *value; /* * Don't use xmlCopyProp() here, since it will try to * reconciliate namespaces. ...
0
4,489
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 WaitForAccessibilityTreeToContainNodeWithName(WebContents* web_contents, const std::string& name) { WebContentsImpl* web_contents_impl = static_cast<WebContentsImpl*>( web_contents); RenderFrameHostImpl* main_frame = static_cast<RenderFrameHostImpl...
0
20,358
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 php_pgsql_add_quotes(zval *src, zend_bool should_free) { smart_str str = {0}; assert(Z_TYPE_P(src) == IS_STRING); assert(should_free == 1 || should_free == 0); smart_str_appendc(&str, 'E'); smart_str_appendc(&str, '\''); smart_str_appendl(&str, Z_STRVAL_P(src), Z_STRLEN_P(src)); smart_str_app...
0
23,281
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 long Cluster::GetLastTime() const { const BlockEntry* pEntry; const long status = GetLast(pEntry); if (status < 0) // error return status; if (pEntry == NULL) // empty cluster return GetTime(); const Block* const pBlock = pEntry->GetBlock(); assert(pBlock); return pBlock->GetTime(this); } Com...
0
18,106
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: unsigned long change_prot_numa(struct vm_area_struct *vma, unsigned long addr, unsigned long end) { int nr_updated; nr_updated = change_protection(vma, addr, end, PAGE_NONE, 0, 1); if (nr_updated) count_vm_numa_events(NUMA_PTE_UPDATES, nr_updated); return nr_updated; } Commit Message: mm/mempolicy.c: ...
0
22,205
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 int64_t add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags) { AVIndexEntry *entries, *ie; int64_t index = -1; const size_t min_size_needed = (st->nb_index_entries + 1) * sizeof(AVIndexEntry); const size_t requested...
0
10,040
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: offline_pages::RequestStats* GetRequestStats() { return offliner_->GetRequestStatsForTest(); } Commit Message: Remove unused histograms from the background loader offliner. Bug: 975512 Change-Id: I87b0a91bed60e3a9e8a1fd9ae9b18cac27a0859f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/s...
0
1,748
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: ChromeBrowserMainPartsChromeos::~ChromeBrowserMainPartsChromeos() { chromeos::disks::DiskMountManager::Shutdown(); chromeos::DBusThreadManager::Shutdown(); if (!parameters().ui_task && chromeos::CrosLibrary::Get()) chromeos::CrosLibrary::Shutdown(); chromeos::BootTimesLoader::Get()->AddLogoutTimeMa...
0
5,138
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 LayerTreeHost::RegisterLayer(Layer* layer) { DCHECK(!LayerById(layer->id())); DCHECK(!in_paint_layer_contents_); layer_id_map_[layer->id()] = layer; if (layer->element_id()) { mutator_host_->RegisterElement(layer->element_id(), ElementListType::ACTIVE); } }...
0
1,082
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 DatabaseImpl::IDBThreadHelper::RenameIndex( int64_t transaction_id, int64_t object_store_id, int64_t index_id, const base::string16& new_name) { DCHECK(idb_thread_checker_.CalledOnValidThread()); if (!connection_->IsConnected()) return; IndexedDBTransaction* transaction = con...
0
5,701