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: static inline IndexPacket PushColormapIndex(Image *image, const size_t index,MagickBooleanType *range_exception) { if (index < image->colors) return((IndexPacket) index); *range_exception=MagickTrue; return((IndexPacket) 0); } Commit Message: Fixed incorrect call to DestroyImage reported in #491. CWE...
0
25,081
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 ModulateLCHuv(const double percent_luma, const double percent_chroma,const double percent_hue,double *red, double *green,double *blue) { double hue, luma, chroma; /* Increase or decrease color luma, chroma, or hue. */ ConvertRGBToLCHuv(*red,*green,*blue,&luma,&chrom...
0
22,018
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 CURLcode imap_select(struct connectdata *conn) { CURLcode result = CURLE_OK; struct imap_conn *imapc = &conn->proto.imapc; const char *str; str = getcmdid(conn); result = imapsendf(conn, str, "%s SELECT %s", str, imapc->mailbox?imapc->mailbox:""); if(result) return re...
0
25,743
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 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; } Commit Message: quote imap strings more carefully Co-authored-by: JerikoOne <jeriko.one@gmx.us> CWE ID: CWE-7...
0
20,067
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: Editor* Editor::Create(LocalFrame& frame) { return new Editor(frame); } Commit Message: Move SelectionTemplate::is_handle_visible_ to FrameSelection This patch moves |is_handle_visible_| to |FrameSelection| from |SelectionTemplate| since handle visibility is used only for setting |FrameSelection|, hence it is...
0
12,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: void udp_lib_rehash(struct sock *sk, u16 newhash) { if (sk_hashed(sk)) { struct udp_table *udptable = sk->sk_prot->h.udp_table; struct udp_hslot *hslot, *hslot2, *nhslot2; hslot2 = udp_hashslot2(udptable, udp_sk(sk)->udp_portaddr_hash); nhslot2 = udp_hashslot2(udptable, newhash); udp_sk(sk)->udp_porta...
0
10,419
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: SafeSock::SafeSock(const SafeSock & orig) : Sock(orig) { init(); char *buf = NULL; buf = orig.serialize(); // get state from orig sock ASSERT(buf); serialize(buf); // put the state into the new sock delete [] buf; } Commit Message: CWE ID: CWE-134
0
25,092
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 WallpaperManagerBase::MoveLoggedInUserCustomWallpaper() { DCHECK(thread_checker_.CalledOnValidThread()); const user_manager::User* logged_in_user = user_manager::UserManager::Get()->GetActiveUser(); if (logged_in_user) { task_runner_->PostTask( FROM_HERE, base::Bind(&Wallpaper...
0
16,171
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: BaseShadow::emailHoldEvent( const char* reason ) { Email mailer; mailer.sendHold( jobAd, reason ); } Commit Message: CWE ID: CWE-134
0
6,655
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: IMPEG2D_ERROR_CODES_T impeg2d_pre_pic_dec_proc(dec_state_t *ps_dec) { WORD32 u4_get_disp; pic_buf_t *ps_disp_pic; IMPEG2D_ERROR_CODES_T e_error = (IMPEG2D_ERROR_CODES_T)IVD_ERROR_NONE; u4_get_disp = 0; ps_disp_pic = NULL; /* Field Picture */ if(ps_dec->u2_picture_structure != FRAME_PICTURE) ...
0
20,598
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 inet_rcu_free_ifa(struct rcu_head *head) { struct in_ifaddr *ifa = container_of(head, struct in_ifaddr, rcu_head); if (ifa->ifa_dev) in_dev_put(ifa->ifa_dev); kfree(ifa); } Commit Message: ipv4: Don't do expensive useless work during inetdev destroy. When an inetdev is destroyed, every address ...
0
26,711
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 rom_write(struct pci_dev *dev, int offset, u32 value, void *data) { struct pci_bar_info *bar = data; if (unlikely(!bar)) { pr_warn(DRV_NAME ": driver data not found for %s\n", pci_name(dev)); return XEN_PCI_ERR_op_failed; } /* A write to obtain the length must happen as a 32-bit writ...
0
8,380
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 ndisc_netdev_event(struct notifier_block *this, unsigned long event, void *ptr) { struct net_device *dev = netdev_notifier_info_to_dev(ptr); struct net *net = dev_net(dev); struct inet6_dev *idev; switch (event) { case NETDEV_CHANGEADDR: neigh_changeaddr(&nd_tbl, dev); fib6_run_gc(0, net, fal...
0
3,478
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 cfg_driver_info(struct uilreq *urq, struct wl_private *lp) { int result = 0; /*------------------------------------------------------------------------*/ DBG_FUNC("cfg_driver_info"); DBG_ENTER(DbgInfo); /* Make sure that user buffer can handle the driver information buffer */ if (urq->len < sizeof(l...
0
12,110
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 PaymentHandlerWebFlowViewController::LoadProgressChanged( content::WebContents* source, double progress) { DCHECK(source == web_contents()); progress_bar_->SetValue(progress); if (progress == 1.0 && show_progress_bar_) { show_progress_bar_ = false; UpdateHeaderContentSeparatorView(); ...
0
20,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: bool WebPagePrivate::handleMouseEvent(PlatformMouseEvent& mouseEvent) { EventHandler* eventHandler = m_mainFrame->eventHandler(); if (mouseEvent.type() == WebCore::PlatformEvent::MouseMoved) return eventHandler->mouseMoved(mouseEvent); if (mouseEvent.type() == WebCore::PlatformEvent::MouseSc...
0
21,476
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: GLenum WebGLImageConversion::ComputeImageSizeInBytes( GLenum format, GLenum type, GLsizei width, GLsizei height, GLsizei depth, const PixelStoreParams& params, unsigned* image_size_in_bytes, unsigned* padding_in_bytes, unsigned* skip_size_in_bytes) { DCHECK(image_size_in_byte...
0
29,735
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 handle_message(int sd) { struct ifsock *ifs; LIST_FOREACH(ifs, &il, link) { if (ifs->in != sd) continue; if (ifs->cb) ifs->cb(sd); } } Commit Message: Fix #1: Ensure recv buf is always NUL terminated Signed-off-by: Joachim Nilsson <troglobit@gmail.com> CWE ID: CWE-119
0
4,084
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: destroy_address_fifo( address_fifo * pfifo ) { address_node * addr_node; if (pfifo != NULL) { do { UNLINK_FIFO(addr_node, *pfifo, link); if (addr_node != NULL) destroy_address_node(addr_node); } while (addr_node != NULL); free(pfifo); } } Commit Message: [Bug 1773] openssl not detected duri...
0
23,287
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: gluster_compare_hosts(gluster_hostdef *src_server, gluster_hostdef *dst_server) { if (src_server->type != dst_server->type) return false; switch (src_server->type) { case GLUSTER_TRANSPORT_UNIX: if (!strcmp(src_server->u.uds.socket, dst_server->u.uds.socket)) return true; break; case GLUSTER_TR...
0
15,596
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 ShellSurface::SetTitle(const base::string16& title) { TRACE_EVENT1("exo", "ShellSurface::SetTitle", "title", base::UTF16ToUTF8(title)); title_ = title; if (widget_) widget_->UpdateWindowTitle(); } Commit Message: exo: Reduce side-effects of dynamic activation code. This code exist...
0
15,809
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: VP8XChunk::VP8XChunk(Container* parent) : Chunk(parent, kChunk_VP8X) { this->needsRewrite = true; this->size = 10; this->data.resize(this->size); this->data.assign(this->size, 0); XMP_Uns8* bitstream = (XMP_Uns8*)parent->chunks[WEBP_CHUNK_IMAGE][0]->data.data(); XMP_Uns32 widt...
1
16,217
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 kvm_gen_update_masterclock(struct kvm *kvm) { #ifdef CONFIG_X86_64 int i; struct kvm_vcpu *vcpu; struct kvm_arch *ka = &kvm->arch; spin_lock(&ka->pvclock_gtod_sync_lock); kvm_make_mclock_inprogress_request(kvm); /* no guest entries from this point */ pvclock_update_vm_gtod_copy(kvm); kvm_for...
0
24,714
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: krb5_gss_authorize_localname(OM_uint32 *minor, const gss_name_t pname, gss_const_buffer_t local_user, gss_const_OID name_type) { krb5_context context; krb5_error_code code; krb5_gss_name_t kname; char *user; ...
0
5,469
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: horizontalDifferenceF(float *ip, int n, int stride, uint16 *wp, uint16 *FromLT2) { int32 r1, g1, b1, a1, r2, g2, b2, a2, mask; float fltsize = Fltsize; #define CLAMP(v) ( (v<(float)0.) ? 0 \ : (v<(float)2.) ? FromLT2[(int)(v*fltsize)] \ : (v>(float)24.2) ? 2047 \ : LogK1*log(v*LogK2...
1
27,657
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 sctp_af *sctp_sockaddr_af(struct sctp_sock *opt, union sctp_addr *addr, int len) { struct sctp_af *af; /* Check minimum size. */ if (len < sizeof (struct sockaddr)) return NULL; /* Does this PF support this AF? */ if (!opt->pf->af_supported(addr->sa.sa_family, opt)) return NULL; /...
0
7,175
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 spl_dllist_it_dtor(zend_object_iterator *iter) /* {{{ */ { spl_dllist_it *iterator = (spl_dllist_it *)iter; SPL_LLIST_CHECK_DELREF(iterator->traverse_pointer); zend_user_it_invalidate_current(iter); zval_ptr_dtor(&iterator->intern.it.data); } /* }}} */ Commit Message: Fix bug #71735: Double-fre...
0
18,010
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: IW_IMPL(void) iw_set_random_seed(struct iw_context *ctx, int randomize, int rand_seed) { ctx->randomize = randomize; ctx->random_seed = rand_seed; } Commit Message: Double-check that the input image's density is valid Fixes a bug that could result in division by zero, at least for a JPEG source image. Fixes i...
0
3,931
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 cdrom_is_mrw(struct cdrom_device_info *cdi, int *write) { struct packet_command cgc; struct mrw_feature_desc *mfd; unsigned char buffer[16]; int ret; *write = 0; init_cdrom_command(&cgc, buffer, sizeof(buffer), CGC_DATA_READ); cgc.cmd[0] = GPCMD_GET_CONFIGURATION; cgc.cmd[3] = CDF_MRW; cgc....
0
26,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: GF_Err minf_dump(GF_Box *a, FILE * trace) { GF_MediaInformationBox *p; p = (GF_MediaInformationBox *)a; gf_isom_box_dump_start(a, "MediaInformationBox", trace); fprintf(trace, ">\n"); if (p->size) gf_isom_box_dump_ex(p->InfoHeader, trace, GF_ISOM_BOX_TYPE_NMHD); if (p->size) gf_isom_box_dump_ex(p->dat...
0
14,090
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 rdp_recv_callback(rdpTransport* transport, STREAM* s, void* extra) { int status = 0; rdpRdp* rdp = (rdpRdp*) extra; switch (rdp->state) { case CONNECTION_STATE_NEGO: if (!rdp_client_connect_mcs_connect_response(rdp, s)) status = -1; break; case CONNECTION_STATE_MCS_ATTACH_USER: i...
0
7,192
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: pvscsi_on_cmd_setup_rings(PVSCSIState *s) { PVSCSICmdDescSetupRings *rc = (PVSCSICmdDescSetupRings *) s->curr_cmd_data; trace_pvscsi_on_cmd_arrived("PVSCSI_CMD_SETUP_RINGS"); if (!rc->reqRingNumPages || rc->reqRingNumPages > PVSCSI_SETUP_RINGS_MAX_NUM_PAGES || !rc->cmpRingNum...
0
17,072
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 RecordDangerousDownloadDiscard(DownloadDiscardReason reason, DownloadDangerType danger_type, const base::FilePath& file_path) { switch (reason) { case DOWNLOAD_DISCARD_DUE_TO_USER_ACTION: UMA_HISTOGRAM_ENUMERATION("Download.U...
0
7,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: static int tcm_loop_shutdown_session(struct se_session *se_sess) { return 0; } Commit Message: loopback: off by one in tcm_loop_make_naa_tpg() This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result in memory corruption. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: N...
0
18,063
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: NetworkLibrary* CrosLibrary::GetNetworkLibrary() { return network_lib_.GetDefaultImpl(use_stub_impl_); } Commit Message: chromeos: Replace copy-and-pasted code with macros. This replaces a bunch of duplicated-per-library cros function definitions and comments. BUG=none TEST=built it Review URL: http://coder...
1
14,468
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 WebGLRenderingContextBase::LoseContextImpl( WebGLRenderingContextBase::LostContextMode mode, AutoRecoveryMethod auto_recovery_method) { if (isContextLost()) return; context_lost_mode_ = mode; DCHECK_NE(context_lost_mode_, kNotLostContext); auto_recovery_method_ = auto_recovery_method; ...
0
7,031
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 qeth_init_input_buffer(struct qeth_card *card, struct qeth_qdio_buffer *buf) { struct qeth_buffer_pool_entry *pool_entry; int i; if ((card->options.cq == QETH_CQ_ENABLED) && (!buf->rx_skb)) { buf->rx_skb = dev_alloc_skb(QETH_RX_PULL_LEN + ETH_HLEN); if (!buf->rx_skb) return 1; } pool_en...
0
10,244
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 SafeBrowsingPrivateEventRouter::OnSecurityInterstitialShown( const GURL& url, const std::string& reason, int net_error_code) { api::safe_browsing_private::InterstitialInfo params; params.url = url.spec(); params.reason = reason; if (net_error_code < 0) { params.net_error_code = ...
0
8,141
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: peek_user(struct task_struct *child, addr_t addr, addr_t data) { addr_t tmp, mask; /* * Stupid gdb peeks/pokes the access registers in 64 bit with * an alignment of 4. Programmers from hell... */ mask = __ADDR_MASK; #ifdef CONFIG_64BIT if (addr >= (addr_t) &((struct user *) NULL)->regs.acrs && add...
0
846
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 size_t snd_compr_get_avail(struct snd_compr_stream *stream) { struct snd_compr_avail avail; return snd_compr_calc_avail(stream, &avail); } Commit Message: ALSA: compress: fix an integer overflow check I previously added an integer overflow check here but looking at it now, it's still buggy. Th...
0
3,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: void sctp_unhash_established(struct sctp_association *asoc) { if (asoc->temp) return; sctp_local_bh_disable(); __sctp_unhash_established(asoc); sctp_local_bh_enable(); } Commit Message: sctp: Fix another socket race during accept/peeloff There is a race between sctp_rcv() and sctp_accept() where we have ...
0
20,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 inline int speed_max(struct mddev *mddev) { return mddev->sync_speed_max ? mddev->sync_speed_max : sysctl_speed_limit_max; } Commit Message: md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file ...
0
16,844
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 sit_gro_complete(struct sk_buff *skb, int nhoff) { skb->encapsulation = 1; skb_shinfo(skb)->gso_type |= SKB_GSO_SIT; return ipv6_gro_complete(skb, nhoff); } Commit Message: tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, t...
0
2,558
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 Document::ViewportDefiningElementDidChange() { HTMLBodyElement* body = FirstBodyElement(); if (!body) return; if (body->NeedsReattachLayoutTree()) return; LayoutObject* layout_object = body->GetLayoutObject(); if (layout_object && layout_object->IsLayoutBlock()) { layout_object->SetStyl...
0
23,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 void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) { TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); v8SetReturnValueFast(info, WTF::getPtr(imp->location()), imp); } Commit Message: document.location bindings fix BUG=352374 R=jochen@chromium.org Re...
0
8,750
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 http_stream_write_single( git_smart_subtransport_stream *stream, const char *buffer, size_t len) { http_stream *s = (http_stream *)stream; http_subtransport *t = OWNING_SUBTRANSPORT(s); git_buf request = GIT_BUF_INIT; assert(t->connected); if (s->sent_request) { giterr_set(GITERR_NET, "Subt...
0
16,866
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 usb_deauthorize_interface(struct usb_interface *intf) { struct device *dev = &intf->dev; device_lock(dev->parent); if (intf->authorized) { device_lock(dev); intf->authorized = 0; device_unlock(dev); usb_forced_unbind_intf(intf); } device_unlock(dev->parent); } Commit Message: USB: core: har...
0
1,761
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: slab_alloc(struct kmem_cache *cachep, gfp_t flags, unsigned long caller) { unsigned long save_flags; void *objp; flags &= gfp_allowed_mask; cachep = slab_pre_alloc_hook(cachep, flags); if (unlikely(!cachep)) return NULL; cache_alloc_debugcheck_before(cachep, flags); local_irq_save(save_flags); objp = ...
0
9,806
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<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle) { if (renderStyle == RenderDirectlyToHostWindow) return 0; RefPtr<GraphicsContext3D> context = adoptRef(new GraphicsContext3D(attrs, host...
0
8,363
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 CastConfigDelegateChromeos::CastToReceiver( const std::string& receiver_id) { ExecuteJavaScript("backgroundSetup.launchDesktopMirroring('" + receiver_id + "');"); } Commit Message: Allow the cast tray to function as expected when the installed extension is missing API methods. B...
0
8,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 int hot_remove_disk(struct mddev *mddev, dev_t dev) { char b[BDEVNAME_SIZE]; struct md_rdev *rdev; rdev = find_rdev(mddev, dev); if (!rdev) return -ENXIO; if (mddev_is_clustered(mddev)) md_cluster_ops->metadata_update_start(mddev); clear_bit(Blocked, &rdev->flags); remove_and_add_spares(mddev...
0
9,917
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: ieee802_15_4_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { u_int caplen = h->caplen; u_int hdrlen; uint16_t fc; uint8_t seq; uint16_t panid = 0; if (caplen < 3) { ND_PRINT((ndo, "[|802.15.4]")); return caplen; } hdrlen = 3; fc = EXTRACT_LE_1...
1
26,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: SpoolssSetPrinterData_r(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep _U_) { proto_item *hidden_item; hidden_item = proto_tree_add_uint( tree, hf_printerdata, tvb, offset, 0, 1); PROTO_ITEM_SET_HIDDEN(hidden_item); /* Parse packet */ offset ...
0
9,006
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: V4L2JpegEncodeAccelerator::JobRecord::~JobRecord() {} Commit Message: media: remove base::SharedMemoryHandle usage in v4l2 encoder This replaces a use of the legacy UnalignedSharedMemory ctor taking a SharedMemoryHandle with the current ctor taking a PlatformSharedMemoryRegion. Bug: 849207 Change-Id: Iea24eb...
0
29,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: xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data, const char *chunk, int size, const char *filename) { xmlParserCtxtPtr ctxt; xmlParserInputPtr inputStream; xmlParserInputBufferPtr buf; xmlCharEncoding enc = XML_CHAR_ENCODING_NONE; /* * plug some encoding conversion routines ...
0
27,313
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 data_pkt(git_pkt **out, const char *line, size_t len) { git_pkt_data *pkt; size_t alloclen; line++; len--; GITERR_CHECK_ALLOC_ADD(&alloclen, sizeof(git_pkt_progress), len); pkt = git__malloc(alloclen); GITERR_CHECK_ALLOC(pkt); pkt->type = GIT_PKT_DATA; pkt->len = (int) len; memcpy(pkt->dat...
0
3,334
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 NuPlayer::GenericSource::initFromDataSource() { sp<MediaExtractor> extractor; CHECK(mDataSource != NULL); if (mIsWidevine) { String8 mimeType; float confidence; sp<AMessage> dummy; bool success; success = SniffWVM(mDataSource, &mimeType, &confidence, &dummy); if (!success ...
0
23,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: void WebMediaPlayerImpl::OnFrameClosed() { DCHECK(main_task_runner_->BelongsToCurrentThread()); UpdatePlayState(); } Commit Message: Simplify "WouldTaintOrigin" concept in media/blink Currently WebMediaPlayer has three predicates: - DidGetOpaqueResponseFromServiceWorker - HasSingleSecurityOrigin - DidPa...
0
25,323
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 reflectStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Object> holder = info.Holder(); Element* impl = V8Element::toImpl(holder); v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectstringattributeAttr), info.GetIsolate(...
1
25,226
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: explicit ConnectionFilterController(ConnectionFilterImpl* filter) : filter_(filter) {} 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.tryserv...
0
6,516
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 kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) { int r; kvm_vcpu_mtrr_init(vcpu); r = vcpu_load(vcpu); if (r) return r; kvm_vcpu_reset(vcpu, false); kvm_mmu_setup(vcpu); vcpu_put(vcpu); return r; } Commit Message: KVM: x86: Reload pit counters for all channels when restoring state Currently if usersp...
0
27,782
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_add_entry(handle_t *handle, struct dentry *dentry, struct inode *inode) { struct inode *dir = dentry->d_parent->d_inode; struct buffer_head *bh; struct ext4_dir_entry_2 *de; struct ext4_dir_entry_tail *t; struct super_block *sb; int retval; int dx_fallback=0; unsigned blocksize; ext4...
0
28,163
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_amf_double(AVIOContext *pb, double d) { avio_w8(pb, AMF_DATA_TYPE_NUMBER); avio_wb64(pb, av_double2int(d)); } Commit Message: avformat/flvenc: Check audio packet size Fixes: Assertion failure Fixes: assert_flvenc.c:941_1.swf Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg> Signed-off-by:...
0
14,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: static void RuntimeCallStatsCounterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { TestObject* impl = V8TestObject::ToImpl(info.Holder()); impl->RuntimeCallStatsCounterMethod(); } Commit Message: bindings: Support "attribute FrozenArray<T>?" Adds a quick hack to support a case of "attribute...
0
5,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: GF_Err EncodeFileChunk(char *chunkFile, char *bifs, char *inputContext, char *outputContext, const char *tmpdir) { #if defined(GPAC_DISABLE_SMGR) || defined(GPAC_DISABLE_BIFS_ENC) || defined(GPAC_DISABLE_SCENE_ENCODER) || defined (GPAC_DISABLE_SCENE_DUMP) fprintf(stderr, "BIFS encoding is not supported in this b...
0
20,745
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 sock *dn_socket_get_next(struct seq_file *seq, struct sock *n) { struct dn_iter_state *state = seq->private; n = sk_next(n); try_again: if (n) goto out; if (++state->bucket >= DN_SK_HASH_SIZE) goto out; n = sk_head(&dn_sk_hash[state->bucket]); goto try_again; out: return n; } ...
0
720
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 syscall_metadata *syscall_nr_to_meta(int nr) { if (!syscalls_metadata || nr >= NR_syscalls || nr < 0) return NULL; return syscalls_metadata[nr]; } Commit Message: tracing/syscalls: Ignore numbers outside NR_syscalls' range ARM has some private syscalls (for example, set_tls(2)) which lie outs...
0
25,938
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: inline J_DITHER_MODE ditherMode() { return JDITHER_NONE; } Commit Message: Progressive JPEG outputScanlines() calls should handle failure outputScanlines() can fail and delete |this|, so any attempt to access members thereafter should be avoided. Copy the decoder pointer member, and use that copy to detect and ...
0
23,310
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 BinaryUploadService::Request::FinishRequest( Result result, DeepScanningClientResponse response) { std::move(callback_).Run(result, response); } Commit Message: Migrate download_protection code to new DM token class. Migrates RetrieveDMToken calls to use the new BrowserDMToken class. Bug: 102029...
0
5,037
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 lrw_init_table(struct lrw_table_ctx *ctx, const u8 *tweak) { be128 tmp = { 0 }; int i; if (ctx->table) gf128mul_free_64k(ctx->table); /* initialize multiplication table for Key2 */ ctx->table = gf128mul_init_64k_bbe((be128 *)tweak); if (!ctx->table) return -ENOMEM; /* initialize optimization tab...
0
14,278
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: RenderWidgetHost* RenderWidgetHost::FromID( int32_t process_id, int32_t routing_id) { return RenderWidgetHostImpl::FromID(process_id, routing_id); } Commit Message: Check that RWHI isn't deleted manually while owned by a scoped_ptr in RVHI BUG=590284 Review URL: https://codereview.chromium.org/174718...
0
8,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 void set_segfault(struct pt_regs *regs, unsigned long addr) { siginfo_t info; if (find_vma(current->mm, addr) == NULL) info.si_code = SEGV_MAPERR; else info.si_code = SEGV_ACCERR; info.si_signo = SIGSEGV; info.si_errno = 0; info.si_addr = (void *) instruction_pointer(regs); pr_debug("SWP{B} ...
0
28,276
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 apply_subsystem_event_filter(struct trace_subsystem_dir *dir, char *filter_string) { struct event_subsystem *system = dir->subsystem; struct trace_array *tr = dir->tr; struct event_filter *filter = NULL; int err = 0; mutex_lock(&event_mutex); /* Make sure the system still has events */ if (!dir-...
0
1,790
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::setPlaybackRate(double rate, ExceptionState& exception_state) { BLINK_MEDIA_LOG << "setPlaybackRate(" << (void*)this << ", " << rate << ")"; if (rate != 0.0 && (rate < kMinRate || rate > kMaxRate)) { UseCounter::Count(GetDocument(), ...
0
13,132
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 _regulator_can_change_status(struct regulator_dev *rdev) { if (!rdev->constraints) return 0; if (rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_STATUS) return 1; else return 0; } Commit Message: regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing After freeing...
0
1,347
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 spacePush(xmlParserCtxtPtr ctxt, int val) { if (ctxt->spaceNr >= ctxt->spaceMax) { int *tmp; ctxt->spaceMax *= 2; tmp = (int *) xmlRealloc(ctxt->spaceTab, ctxt->spaceMax * sizeof(ctxt->spaceTab[0])); if (tmp == NULL) { xmlErrMemory(ctxt, NULL); ctxt->spa...
0
27,868
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 in_set_sample_rate(struct audio_stream *stream, uint32_t rate) { struct a2dp_stream_in *in = (struct a2dp_stream_in *)stream; FNLOG(); if (in->common.cfg.rate > 0 && in->common.cfg.rate == rate) return 0; else return -1; } Commit Message: DO NOT MERGE Fix potential DoS caused by delivering ...
0
5,841
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_obj_attr_free(struct tee_obj *o) { const struct tee_cryp_obj_type_props *tp; size_t n; if (!o->attr) return; tp = tee_svc_find_type_props(o->info.objectType); if (!tp) return; for (n = 0; n < tp->num_type_attrs; n++) { const struct tee_cryp_obj_type_attrs *ta = tp->type_attrs + n; attr_o...
0
5,233
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: e1000e_write_rx_descr(E1000ECore *core, uint8_t *desc, struct NetRxPkt *pkt, const E1000E_RSSInfo *rss_info, size_t ps_hdr_len, uint16_t(*written)[MAX_PS_BUFFERS]) { if (e1000e_rx_use_legacy_descriptor(core)) { assert(ps_hdr_len == 0); e1000e_write_lgcy_rx_descr(core, desc, pkt, rss_info, ...
0
14,215
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: ~ApiParameterExtractor() {} Commit Message: Call CanCaptureVisiblePage in page capture API. Currently the pageCapture permission allows access to arbitrary local files and chrome:// pages which can be a security concern. In order to address this, the page capture API needs to be changed similar to the capture...
0
25,468
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::OnDownloadTargetDetermined( const base::FilePath& target_path, TargetDisposition disposition, DownloadDangerType danger_type, const base::FilePath& intermediate_path, DownloadInterruptReason interrupt_reason) { DCHECK_CURRENTLY_ON(BrowserThread::UI); if (state_ == CA...
0
9,226
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 WebLocalFrameImpl::SendPings(const WebURL& destination_url) { DCHECK(GetFrame()); DCHECK(context_menu_node_.Get()); Element* anchor = context_menu_node_->EnclosingLinkEventParentOrSelf(); if (isHTMLAnchorElement(anchor)) toHTMLAnchorElement(anchor)->SendPings(destination_url); } Commit Message: ...
0
19,626
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 S_AL_StartLocalSound(sfxHandle_t sfx, int channel) { srcHandle_t src; if(S_AL_CheckInput(0, sfx)) return; src = S_AL_SrcAlloc(SRCPRI_LOCAL, -1, channel); if(src == -1) return; S_AL_SrcSetup(src, sfx, SRCPRI_LOCAL, -1, channel, qtrue); srcList[src].isPlaying = qtrue; qalSourcePlay(srcList[sr...
0
10,151
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 GetImageEntropy(const Image *image, double *entropy,ExceptionInfo *exception) { MagickBooleanType status; status=GetImageChannelEntropy(image,CompositeChannels,entropy,exception); return(status); } Commit Message: https://github.com/ImageMagick/ImageMagick/issues/1615 ...
0
22,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: static int StreamTcpTest39 (void) { Flow f; ThreadVars tv; StreamTcpThread stt; uint8_t payload[4]; TCPHdr tcph; PacketQueue pq; memset (&f, 0, sizeof(Flow)); memset(&tv, 0, sizeof (ThreadVars)); memset(&stt, 0, sizeof (StreamTcpThread)); memset(&tcph, 0, sizeof (TCPHdr));...
0
28,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: XML_SetCdataSectionHandler(XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end) { if (parser == NULL) return; parser->m_startCdataSectionHandler = start; parser->m_endCdataSectionHandler = end; } Commit Message: xml...
0
9,710
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: ScriptPromise ServiceWorkerContainer::getRegistrations(ScriptState* scriptState) { ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); ScriptPromise promise = resolver->promise(); if (!m_provider) { resolver->reject(DOMException::create(InvalidStateError, "Failed to ...
0
24,391
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: ApiTestEnvironment::ApiTestEnvironment( ModuleSystemTestEnvironment* environment) { env_ = environment; InitializeEnvironment(); RegisterModules(); } Commit Message: [Extensions] Don't allow built-in extensions code to be overridden BUG=546677 Review URL: https://codereview.chromium.org/1417513003 Cr...
0
18,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: print_html_status(pe_working_set_t * data_set, const char *filename, gboolean web_cgi) { FILE *stream; GListPtr gIter = NULL; node_t *dc = NULL; static int updates = 0; char *filename_tmp = NULL; if (web_cgi) { stream = stdout; fprintf(stream, "Content-type: text/html\n\n"...
0
1,055
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 __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx) { struct request_queue *q = hctx->queue; struct request *rq; LIST_HEAD(rq_list); LIST_HEAD(driver_list); struct list_head *dptr; int queued; WARN_ON(!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask)); if (unlikely(test_bit(BLK_MQ_S_STO...
0
18,149
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::DoEnable(GLenum cap) { if (SetCapabilityState(cap, true)) { glEnable(cap); } } Commit Message: Revert "Revert 100494 - Fix bug in SimulateAttrib0.""" TEST=none BUG=95625 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7796016 git-svn-id: svn://svn.chromium.o...
0
7,391
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 ShelfLayoutManager::UpdateVisibilityState() { ShellDelegate* delegate = Shell::GetInstance()->delegate(); if (delegate && delegate->IsScreenLocked()) { SetState(VISIBLE); } else { WorkspaceManager::WindowState window_state( workspace_manager_->GetWindowState()); switch (window_state...
0
11,724
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 RenderThreadImpl::RecordUserMetrics(const std::string& action) { Send(new ViewHostMsg_UserMetricsRecordAction(action)); } Commit Message: Use a new scheme for swapping out RenderViews. BUG=118664 TEST=none Review URL: http://codereview.chromium.org/9720004 git-svn-id: svn://svn.chromium.org/chrome/...
0
10,096
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 kvm_io_bus_write_cookie(struct kvm_vcpu *vcpu, enum kvm_bus bus_idx, gpa_t addr, int len, const void *val, long cookie) { struct kvm_io_bus *bus; struct kvm_io_range range; range = (struct kvm_io_range) { .addr = addr, .len = len, }; bus = srcu_dereference(vcpu->kvm->buses[bus_idx], &vcpu->k...
0
27,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 int kvp_process_ip_address(void *addrp, int family, char *buffer, int length, int *offset) { struct sockaddr_in *addr; struct sockaddr_in6 *addr6; int addr_length; char tmp[50]; const char *str; if (family == AF_INET) { addr = (struct sockaddr_in *)addrp; str = inet_ntop(family, &addr->...
0
19,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 UnloadController::CancelWindowClose() { DCHECK(is_attempting_to_close_browser_); tabs_needing_before_unload_fired_.clear(); tabs_needing_unload_fired_.clear(); is_attempting_to_close_browser_ = false; content::NotificationService::current()->Notify( chrome::NOTIFICATION_BROWSER_CLOSE_CANCELL...
0
28,024
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: PepperDeviceEnumerationHostHelper::PepperDeviceEnumerationHostHelper( ppapi::host::ResourceHost* resource_host, Delegate* delegate, PP_DeviceType_Dev device_type, const GURL& document_url) : resource_host_(resource_host), delegate_(delegate), device_type_(device_type), d...
1
5,246
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 RenderWidgetHostViewAura::OnCompositingLockStateChanged( ui::Compositor* compositor) { if (!compositor->IsLocked() && can_lock_compositor_ == YES_DID_LOCK) { can_lock_compositor_ = NO_PENDING_RENDERER_FRAME; } } Commit Message: Implement TextureImageTransportSurface using texture mailbox This h...
0
3,346
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 AtomicString& Element::webkitRegionOverset() const { document()->updateLayoutIgnorePendingStylesheets(); DEFINE_STATIC_LOCAL(AtomicString, undefinedState, ("undefined", AtomicString::ConstructFromLiteral)); if (!RuntimeEnabledFeatures::cssRegionsEnabled() || !renderRegion()) return unde...
0
22,571
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: evdns_base_clear_nameservers_and_suspend(struct evdns_base *base) { struct nameserver *server, *started_at; int i; EVDNS_LOCK(base); server = base->server_head; started_at = base->server_head; if (!server) { EVDNS_UNLOCK(base); return 0; } while (1) { struct nameserver *next = server->next; (void...
0
15,511