Dataset Viewer
Auto-converted to Parquet Duplicate
cwe
stringclasses
9 values
id
stringlengths
40
40
source
stringlengths
14
66.9k
label
bool
2 classes
CWE-362
a2b9e6c1a35afcc0973acb72e591c714e78885ff
int x86_emulate_instruction(struct kvm_vcpu *vcpu, unsigned long cr2, int emulation_type, void *insn, int insn_len) { int r; struct x86_emulate_ctxt *ctxt = &vcpu->arch.emulate_ctxt; bool writeback = true; bool write_fault_to_spt = vcpu->arch.write_fault_to_shadow_pgtable; /* * Clear...
false
CWE-119
51e0cb2e5ec18eaf6fb331bc573ff27b743898f4
xmlSaveUriRealloc(xmlChar *ret, int *max) { xmlChar *temp; int tmp; if (*max > MAX_URI_LENGTH) { xmlURIErrMemory("reaching arbitrary MAX_URI_LENGTH limit\n"); return(NULL); } tmp = *max * 2; temp = (xmlChar *) xmlRealloc(ret, (tmp + 1)); if (temp == NULL) { xmlURIErrMemory("saving URI\...
false
CWE-119
96dbafe288dbe2f0cc45fa3c39daf6d0c37acbab
xsltAttributeInternal(xsltTransformContextPtr ctxt, xmlNodePtr contextNode, xmlNodePtr inst, xsltStylePreCompPtr castedComp, int fromAttributeSet) { #ifdef XSLT_REFACTORED xsltStyleItemAttributePtr comp = (xsltStyleItemAttributePtr) castedComp; #else ...
false
CWE-200
d5e0d0f607a7a029c6563a0470d88255c89a8d11
static bool vsock_is_accept_queue_empty(struct sock *sk) { struct vsock_sock *vsk = vsock_sk(sk); return list_empty(&vsk->accept_queue); }
false
CWE-119
1f4b49e64adf4623eefda503bca61e253597b9bf
status_t Parcel::write(const FlattenableHelperInterface& val) { status_t err; const size_t len = val.getFlattenedSize(); const size_t fd_count = val.getFdCount(); if ((len > INT32_MAX) || (fd_count >= gMaxFds)) { return BAD_VALUE; } err = this->writeInt32(len); if (err) return err; err = this->writeI...
false
CWE-416
54648cf1ec2d7f4b6a71767799c45676a138ca24
void blk_cleanup_queue(struct request_queue *q) { spinlock_t *lock = q->queue_lock; /* mark @q DYING, no new request or merges will be allowed afterwards */ mutex_lock(&q->sysfs_lock); blk_set_queue_dying(q); spin_lock_irq(lock); /* * A dying queue is permanently in bypass mode till released. Note * that, ...
false
CWE-362
5d78b84d39bd34bc9fce9d01c0dcd5a22a330d34
void LayerTreeHost::SetNextCommitForcesRedraw() { next_commit_forces_redraw_ = true; proxy_->SetNeedsUpdateLayers(); }
false
CWE-264
0bfc96cb77224736dfa35c3c555d37b3646ef35e
static int sg_get_version(int __user *p) { static const int sg_version_num = 30527; return put_user(sg_version_num, p); }
false
CWE-119
c13e1da62b5f5f0e6fe8c1f769a5a28415415244
void GLES2DecoderImpl::DoCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei image_size, const void * data) { TextureManager::TextureInfo* info = GetTextureInfoForTarget(target); if (!info) { SetGLError(GL_INV...
false
CWE-189
a5cd335165e31db9dbab636fd29895d41da55dd2
int drm_mode_mmap_dumb_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_mode_map_dumb *args = data; /* call driver ioctl to get mmap offset */ if (!dev->driver->dumb_map_offset) return -ENOSYS; return dev->driver->dumb_map_offset(file_priv, dev, args->handle, &args->off...
false
CWE-399
84d73cd3fb142bf1298a8c13fd4ca50fd2432372
int __rtnl_link_register(struct rtnl_link_ops *ops) { if (rtnl_link_ops_get(ops->kind)) return -EEXIST; if (!ops->dellink) ops->dellink = unregister_netdevice_queue; list_add_tail(&ops->list, &link_ops); return 0; }
false
CWE-399
318530d771586b39056c0da7b8bdad03469a0dc4
VirtualKeyboardController::~VirtualKeyboardController() { Shell::GetInstance()->RemoveShellObserver(this); ui::DeviceDataManager::GetInstance()->RemoveObserver(this); }
false
CWE-362
fd506b0ac6c7846ae45b5034044fe85c28ee68ac
static WebURLRequest::RequestContext DetermineRequestContextFromNavigationType( const NavigationType navigation_type) { switch (navigation_type) { case kNavigationTypeLinkClicked: return WebURLRequest::kRequestContextHyperlink; case kNavigationTypeOther: return WebURLRequest::kRequestContextL...
false
CWE-119
ee7579229ff7e9e5ae28bf53aea069251499d7da
void Framebuffer::OnDidRenderTo() const { for (AttachmentMap::const_iterator it = attachments_.begin(); it != attachments_.end(); ++it) { it->second->OnDidRenderTo(); } }
false
CWE-399
8ea3a5c06218fa42d25c3aa0a4ab57153e178523
PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(Frame& frame, PopupMenuClient* client) const { if (WebViewImpl::useExternalPopupMenus()) return adoptRef(new ExternalPopupMenu(frame, client, *m_webView)); return adoptRef(new PopupMenuChromium(frame, client)); }
false
CWE-399
d0772b70faaf8e9f2013b6c4273d94d5eac8047a
static inline unsigned xfrm6_tunnel_spi_hash_byaddr(xfrm_address_t *addr) { unsigned h; h = (__force u32)(addr->a6[0] ^ addr->a6[1] ^ addr->a6[2] ^ addr->a6[3]); h ^= h >> 16; h ^= h >> 8; h &= XFRM6_TUNNEL_SPI_BYADDR_HSIZE - 1; return h; }
false
CWE-200
4efbc454ba68def5ef285b26ebfcfdb605b52755
void hrtick_start(struct rq *rq, u64 delay) { __hrtimer_start_range_ns(&rq->hrtick_timer, ns_to_ktime(delay), 0, HRTIMER_MODE_REL_PINNED, 0); }
false
CWE-119
96dbafe288dbe2f0cc45fa3c39daf6d0c37acbab
xsltValueOf(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr castedComp) { #ifdef XSLT_REFACTORED xsltStyleItemValueOfPtr comp = (xsltStyleItemValueOfPtr) castedComp; #else xsltStylePreCompPtr comp = castedComp; #endif xmlXPathObjectPtr res = NULL; xmlCh...
true
CWE-119
7d3e91a89b7adbc2831334def9e494dd9892f9af
static int nfs4_map_errors(int err) { if (err >= -1000) return err; switch (err) { case -NFS4ERR_RESOURCE: return -EREMOTEIO; case -NFS4ERR_WRONGSEC: return -EPERM; case -NFS4ERR_BADOWNER: case -NFS4ERR_BADNAME: return -EINVAL; case -NFS4ERR_SHARE_DENIED: return -EACCES; case -NFS4ERR_MINOR_VERS_MISMA...
false
CWE-399
4c19b042ea31bd393d2265656f94339d1c3d82ff
bool FileUtilProxy::EnsureFileExists( scoped_refptr<MessageLoopProxy> message_loop_proxy, const FilePath& file_path, EnsureFileExistsCallback* callback) { return Start(FROM_HERE, message_loop_proxy, new RelayEnsureFileExists( message_loop_proxy, file_path, callback)); }
false
CWE-399
415e3d3e90ce9e18727e8843ae343eda5a58fad6
static void inc_inflight(struct unix_sock *usk) { atomic_long_inc(&usk->inflight); }
false
CWE-119
6d104af38b570d37aa32a5803b04c354f8ed513d
static void k90_backlight_work(struct work_struct *work) { int ret; struct k90_led *led = container_of(work, struct k90_led, work); struct device *dev; struct usb_interface *usbif; struct usb_device *usbdev; if (led->removed) return; dev = led->cdev.dev->parent; usbif = to_usb_interface(dev->parent); usbde...
false
CWE-399
2aa406a8b4577103e7b933c75ec0e372830f20fe
WebviewHandler::~WebviewHandler() { }
false
CWE-20
761c75d2d607638ff53c764b4925bcca9be601d8
AutoplayPolicy::Type BaseAudioContext::GetAutoplayPolicy() const { if (RuntimeEnabledFeatures::AutoplayIgnoresWebAudioEnabled()) { #if defined(OS_ANDROID) return AutoplayPolicy::Type::kUserGestureRequired; #else return AutoplayPolicy::Type::kNoUserGestureRequired; #endif } Document* document = GetDocumen...
false
CWE-264
6a60f01228557982e6508c5919cc21fcfddf110b
bool WebRunnerBrowserContext::IsOffTheRecord() const { return data_dir_path_.empty(); }
false
CWE-20
282f53ffdc3b1902da86f6a0791af736837efbf8
void SupervisedUserService::AddObserver( SupervisedUserServiceObserver* observer) { observer_list_.AddObserver(observer); }
false
CWE-362
de9f869616dd95e95c00bdd6b0fcd3421e8a4323
static int get_seg_reg_override_idx(struct insn *insn) { int idx = INAT_SEG_REG_DEFAULT; int num_overrides = 0, i; insn_get_prefixes(insn); /* Look for any segment override prefixes. */ for (i = 0; i < insn->prefixes.nbytes; i++) { insn_attr_t attr; attr = inat_get_opcode_attribute(insn->prefixes.bytes[i]);...
false
CWE-264
1ee0a224bc9aad1de496c795f96bc6ba2c394811
static void edge_set_termios(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios *old_termios) { struct edgeport_port *edge_port = usb_get_serial_port_data(port); unsigned int cflag; cflag = tty->termios.c_cflag; dev_dbg(&port->dev, "%s - clfag %08x iflag %08x\n", __func__, tty->termios.c_cf...
false
CWE-399
8ea3a5c06218fa42d25c3aa0a4ab57153e178523
void ChromeClientImpl::show(NavigationPolicy navigationPolicy) { if (!m_webView->client()) return; WebNavigationPolicy policy = static_cast<WebNavigationPolicy>(navigationPolicy); if (policy == WebNavigationPolicyIgnore) policy = getNavigationPolicy(); m_webView->client()->show(policy);...
false
CWE-119
073a80800f341325932c66818ce4302b312909a4
int effect_get_descriptor(effect_handle_t self, effect_descriptor_t *descriptor) { effect_context_t *context = (effect_context_t *)self; if (!effect_exists(context) || (descriptor == NULL)) return -EINVAL; *descriptor = *context->desc; return 0; }
false
CWE-399
a430c9166312e1aa3d80bce32374233bdbfeba32
static int check_rdpmc(struct x86_emulate_ctxt *ctxt) { u64 cr4 = ctxt->ops->get_cr(ctxt, 4); u64 rcx = reg_read(ctxt, VCPU_REGS_RCX); if ((!(cr4 & X86_CR4_PCE) && ctxt->ops->cpl(ctxt)) || ctxt->ops->check_pmc(ctxt, rcx)) return emulate_gp(ctxt, 0); return X86EMUL_CONTINUE; }
false
CWE-200
a209ff12ba9617c10550678ff93d01fb72a33399
static jboolean android_net_wifi_trackSignificantWifiChange( JNIEnv *env, jclass cls, jint iface, jint id, jobject settings) { JNIHelper helper(env); wifi_interface_handle handle = getIfaceHandle(helper, cls, iface); ALOGD("tracking significant wifi change on interface[%d] = %p", iface, handle); wifi_si...
false
CWE-264
550fd08c2cebad61c548def135f67aba284c6162
static int tun_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t total_len) { struct tun_struct *tun = container_of(sock, struct tun_struct, socket); return tun_get_user(tun, m->msg_iov, total_len, m->msg_flags & MSG_DONTWAIT); }
false
CWE-200
5fe74f831fddb92afa5ddfe46490bb49f083132b
void WebLocalFrameImpl::SetCommittedFirstRealLoad() { DCHECK(GetFrame()); GetFrame()->Loader().StateMachine()->AdvanceTo( FrameLoaderStateMachine::kCommittedMultipleRealLoads); GetFrame()->DidSendResourceTimingInfoToParent(); }
true
CWE-20
56a84aa67bb071a33a48ac1481b555c48e0a9a59
void NavigationControllerImpl::NotifyEntryChanged( const NavigationEntry* entry) { EntryChangedDetails det; det.changed_entry = entry; det.index = GetIndexOfEntry( NavigationEntryImpl::FromNavigationEntry(entry)); delegate_->NotifyNavigationEntryChanged(det); }
false
CWE-264
550fd08c2cebad61c548def135f67aba284c6162
static void tun_poll_controller(struct net_device *dev) { /* * Tun only receives frames when: * 1) the char device endpoint gets data from user space * 2) the tun socket gets a sendmsg call from user space * Since both of those are syncronous operations, we are guaranteed * never to have pending data when we...
false
CWE-200
b6878d9e03043695dbf3fa1caa6dfc09db225b16
void md_reload_sb(struct mddev *mddev) { struct md_rdev *rdev, *tmp; rdev_for_each_safe(rdev, tmp, mddev) { rdev->sb_loaded = 0; ClearPageUptodate(rdev->sb_page); } mddev->raid_disks = 0; analyze_sbs(mddev); rdev_for_each_safe(rdev, tmp, mddev) { struct mdp_superblock_1 *sb = page_address(rdev->sb_page); ...
false
CWE-416
fd6a5115103b3e6a52ce15858c5ad4956df29300
bool AudioNode::DisconnectFromOutputIfConnected( unsigned output_index, AudioNode& destination, unsigned input_index_of_destination) { AudioNodeOutput& output = Handler().Output(output_index); AudioNodeInput& input = destination.Handler().Input(input_index_of_destination); if (!output.IsConnecte...
false
CWE-416
a4150b688a754d3d10d2ca385155b1c95d77d6ae
error::Error GLES2DecoderPassthroughImpl::DoGetProgramResourceiv( GLuint program, GLenum program_interface, GLuint index, GLsizei prop_count, const GLenum* props, GLsizei bufsize, GLsizei* length, GLint* params) { api()->glGetProgramResourceivFn(GetProgramServiceID(program, resources_)...
false
CWE-416
11601c08e92732d2883af2057c41c17cba890844
DatabaseImpl::IDBThreadHelper::IDBThreadHelper( std::unique_ptr<IndexedDBConnection> connection, const url::Origin& origin, scoped_refptr<IndexedDBContextImpl> indexed_db_context) : indexed_db_context_(indexed_db_context), connection_(std::move(connection)), origin_(origin), weak_facto...
false
CWE-416
a4150b688a754d3d10d2ca385155b1c95d77d6ae
bool GLES2Implementation::GetSyncivHelper(GLsync sync, GLenum pname, GLsizei bufsize, GLsizei* length, GLint* values) { GLint value = 0; switch (pna...
false
CWE-200
5800dc5c19f34e6e03b5adab1282535cb102fafd
static void native_flush_tlb_global(void) { __native_flush_tlb_global(); }
false
CWE-264
bfdc0b497faa82a0ba2f9dddcf109231dd519fcc
static int _proc_do_string(void* data, int maxlen, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { size_t len; char __user *p; char c; if (!data || !maxlen || !*lenp) { *lenp = 0; return 0; } if (write) { len = 0; p = buffer; while (len < *lenp) { if (get_user(c, p++)) ...
false
CWE-264
4943ba16bbc2db05115707b3ff7b4874e9e3c560
int crypto_attr_u32(struct rtattr *rta, u32 *num) { struct crypto_attr_u32 *nu32; if (!rta) return -ENOENT; if (RTA_PAYLOAD(rta) < sizeof(*nu32)) return -EINVAL; if (rta->rta_type != CRYPTOA_U32) return -EINVAL; nu32 = RTA_DATA(rta); *num = nu32->num; return 0; }
false
CWE-119
715230a44310a8cf66fbfb5a46f9a62a9b2de424
static bool tg3_enable_msix(struct tg3 *tp) { int i, rc; struct msix_entry msix_ent[TG3_IRQ_MAX_VECS]; tp->txq_cnt = tp->txq_req; tp->rxq_cnt = tp->rxq_req; if (!tp->rxq_cnt) tp->rxq_cnt = netif_get_num_default_rss_queues(); if (tp->rxq_cnt > tp->rxq_max) tp->rxq_cnt = tp->rxq_max; /* Disable multiple TX r...
false
CWE-416
9e417dae2833230a651989bb4e56b835355dda39
void WaitForState(State state) { while (state_ != state) MessageLoop::current()->RunAllPending(); }
false
CWE-189
b769f49463711205d57286e64cf535ed4daf59e9
int sequencer_open(int dev, struct file *file) { int retval, mode, i; int level, tmp; if (!sequencer_ok) sequencer_init(); level = ((dev & 0x0f) == SND_DEV_SEQ2) ? 2 : 1; dev = dev >> 4; mode = translate_mode(file); DEB(printk("sequencer_open(dev=%d)\n", dev)); if (!sequencer_ok) { /* printk("Sound car...
false
CWE-189
bf118a342f10dafe44b14451a1392c3254629a1f
static int nfs4_xdr_dec_setclientid_confirm(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs_fsinfo *fsinfo) { struct compound_hdr hdr; int status; status = decode_compound_hdr(xdr, &hdr); if (!status) status = decode_setclientid_confirm(xdr); if (!status) status = decode_putrootfh(x...
false
CWE-20
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
static inline struct hlist_head *nl_portid_hashfn(struct nl_portid_hash *hash, u32 portid) { return &hash->table[jhash_1word(portid, hash->rnd) & hash->mask]; }
false
CWE-200
d128139d53e9268e87921e82d89b3f2053cb83fd
bool GLManager::CanWaitUnverifiedSyncToken(const gpu::SyncToken& sync_token) { return false; }
false
CWE-399
f084d7007f67809ef116ee6b11f251bf3c9ed895
void ContainerNode::insertBeforeCommon(Node* nextChild, Node* newChild) { NoEventDispatchAssertion assertNoEventDispatch; ASSERT(newChild); ASSERT(!newChild->parentNode()); // Use insertBefore if you need to handle reparenting (and want DOM mutation events). ASSERT(!newChild->nextSibling()); ASSERT...
false
CWE-119
faaa2fd0a05f1622d9a8806da118d4f3b602e707
void HTMLMediaElement::scheduleNotifyPlaying() { scheduleEvent(EventTypeNames::playing); scheduleResolvePlayPromises(); }
false
CWE-119
715230a44310a8cf66fbfb5a46f9a62a9b2de424
static void tg3_ape_lock_init(struct tg3 *tp) { int i; u32 regbase, bit; if (tg3_asic_rev(tp) == ASIC_REV_5761) regbase = TG3_APE_LOCK_GRANT; else regbase = TG3_APE_PER_LOCK_GRANT; /* Make sure the driver hasn't any stale locks. */ for (i = TG3_APE_LOCK_PHY0; i <= TG3_APE_LOCK_GPIO; i++) { switch (i) { ...
false
CWE-20
8262245d384be025f13e2a5b3a03b7e5c98374ce
void RenderView::OnDragTargetDragEnter(const WebDropData& drop_data, const gfx::Point& client_point, const gfx::Point& screen_point, WebDragOperationsMask ops) { WebDragOperation operation = webview()-...
false
CWE-119
b2b21468c1f7f08b30a7c1755316f6026c50eb2a
LayoutUnit RenderFlexibleBox::mainAxisExtent() const { return isHorizontalFlow() ? width() : height(); }
false
CWE-119
16dcd30c215801941d9890859fd79a234128fc3e
bool ChromeDownloadManagerDelegate::ShouldOpenDownload(DownloadItem* item) { if (download_crx_util::IsExtensionDownload(*item)) { scoped_refptr<CrxInstaller> crx_installer = download_crx_util::OpenChromeExtension(profile_, *item); registrar_.Add(this, chrome::NOTIFICATION_CRX_INSTA...
false
CWE-362
b9a41d21dceadf8104812626ef85dc56ee8a60ed
static int open_table_device(struct table_device *td, dev_t dev, struct mapped_device *md) { static char *_claim_ptr = "I belong to device-mapper"; struct block_device *bdev; int r; BUG_ON(td->dm_dev.bdev); bdev = blkdev_get_by_dev(dev, td->dm_dev.mode | FMODE_EXCL, _claim_ptr); if (IS_ERR(bdev)) ret...
false
CWE-416
a4150b688a754d3d10d2ca385155b1c95d77d6ae
WebGLRenderingContextBase::CreateWebGraphicsContext3DProvider( CanvasRenderingContextHost* host, const CanvasContextCreationAttributesCore& attributes, Platform::ContextType context_type, bool* using_gpu_compositing) { if (host->IsWebGLBlocked()) { host->SetContextCreationWasBlocked(); host->H...
false
CWE-20
b2853fd6c2d0f383dbdf7427e263eb576a633867
static void cma_set_loopback(struct sockaddr *addr) { switch (addr->sa_family) { case AF_INET: ((struct sockaddr_in *) addr)->sin_addr.s_addr = htonl(INADDR_LOOPBACK); break; case AF_INET6: ipv6_addr_set(&((struct sockaddr_in6 *) addr)->sin6_addr, 0, 0, 0, htonl(1)); break; default: ib_addr_set(&...
false
CWE-200
9b3e617f3df53822345a8573b6d358f6b9e5ed87
static int __init atm_init(void) { int error; error = proto_register(&vcc_proto, 0); if (error < 0) goto out; error = atmpvc_init(); if (error < 0) { pr_err("atmpvc_init() failed with %d\n", error); goto out_unregister_vcc_proto; } error = atmsvc_init(); if (error < 0) { pr_err("atmsvc_init() failed wi...
false
CWE-20
e89cfcb9090e8c98129ae9160c513f504db74599
InitialLoadObserver::~InitialLoadObserver() { }
false
CWE-416
f2d26633cbd50735ac2af30436888b71ac0abad3
views::View* AutofillPopupItemView::CreateSubtextLabel() { return nullptr; }
false
CWE-200
52f6eb4221430b6248fd5a59bec53bfef9fdd9a7
base::string16 GetHelpUrlWithBoard(const std::string& original_url) { return base::ASCIIToUTF16(original_url + "&b=" + base::SysInfo::GetLsbReleaseBoard()); }
false
CWE-20
5788690fb1395dc672ff9b3385dbfb1180ed710a
void DelegatedFrameHost::OnLostResources() { EvictDelegatedFrame(); idle_frame_subscriber_textures_.clear(); yuv_readback_pipeline_.reset(); }
false
CWE-20
a8d6ae61d266d8bc44c3dd2d08bda32db701e359
std::string GetMimeType(const base::FilePath& path) { std::string mime_type; net::GetMimeTypeFromFile(path, &mime_type); return mime_type; }
false
CWE-189
fc9bbca8f650e5f738af8806317c0a041a48ae4a
static int do_unregister_framebuffer(struct fb_info *fb_info) { struct fb_event event; int i, ret = 0; i = fb_info->node; if (i < 0 || i >= FB_MAX || registered_fb[i] != fb_info) return -EINVAL; if (!lock_fb_info(fb_info)) return -ENODEV; console_lock(); event.info = fb_info; ret = fb_notifier_call_chain(...
false
CWE-20
fae4d7b7d7e5c8a04a8b7a3258c0fc8362afa24c
LRUCanvasResourceProviderCache(int capacity) : resource_providers_( std::make_unique<std::unique_ptr<CanvasResourceProvider>[]>( capacity)), capacity_(capacity) {}
false
CWE-20
ba3b1b344017bbf36283464b51014fad15c2f3f4
void WebContentsImpl::OnDialogClosed(int render_process_id, int render_frame_id, IPC::Message* reply_msg, bool dialog_was_suppressed, bool success, ...
false
CWE-264
096fe9eaea40a17e125569f9e657e34cdb6d73bd
static long encrypted_read(const struct key *key, char __user *buffer, size_t buflen) { struct encrypted_key_payload *epayload; struct key *mkey; const u8 *master_key; size_t master_keylen; char derived_key[HASH_SIZE]; char *ascii_buf; size_t asciiblob_len; int ret; epayload = rcu_dereference_key(key); ...
false
CWE-416
a4150b688a754d3d10d2ca385155b1c95d77d6ae
error::Error GLES2DecoderPassthroughImpl::DoCompileShader(GLuint shader) { api()->glCompileShaderFn(GetShaderServiceID(shader, resources_)); return error::kNoError; }
false
CWE-264
5d26a105b5a73e5635eae0629b42fa0a90e07b7b
static int krng_reset(struct crypto_rng *tfm, u8 *seed, unsigned int slen) { return 0; }
false
CWE-20
338c7dbadd2671189cec7faf64c84d01071b3f96
int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align, struct module *module) { int r; int cpu; r = kvm_arch_init(opaque); if (r) goto out_fail; /* * kvm_arch_init makes sure there's at most one caller * for architectures that support multiple implementations, * like intel and amd on x86...
false
CWE-399
9c895160d25a76c21b65bad141b08e8d4f99afef
int kvm_emulate_halt(struct kvm_vcpu *vcpu) { ++vcpu->stat.halt_exits; if (irqchip_in_kernel(vcpu->kvm)) { vcpu->arch.mp_state = KVM_MP_STATE_HALTED; return 1; } else { vcpu->run->exit_reason = KVM_EXIT_HLT; return 0; } }
false
CWE-399
4ac8bc08e3306f38a5ab3e551aef6ad43753579c
RegionOversetState Element::regionOversetState() const { return hasRareData() ? elementRareData()->regionOversetState() : RegionUndefined; }
false
CWE-399
fdf5af0daf8019cec2396cdef8fb042d80fe71fa
static void tcp_update_cwnd_in_recovery(struct sock *sk, int newly_acked_sacked, int fast_rexmit, int flag) { struct tcp_sock *tp = tcp_sk(sk); int sndcnt = 0; int delta = tp->snd_ssthresh - tcp_packets_in_flight(tp); if (tcp_packets_in_flight(tp) > tp->snd_ssthresh) { u64 dividend = (u64)tp->snd_ssthresh *...
false
CWE-189
1777aa6484af15014b8691082a8c3075418786f5
bool LayerTreeHostQt::layerTreeTileUpdatesAllowed() const { return !m_isSuspended && !m_waitingForUIProcess; }
false
CWE-119
385508dc888ef15d272cdd2705b17996abc519d6
void BackTexture::Create() { DCHECK_EQ(id(), 0u); ScopedGLErrorSuppressor suppressor("BackTexture::Create", decoder_->state_.GetErrorState()); GLuint id; api()->glGenTexturesFn(1, &id); GLenum target = Target(); ScopedTextureBinder binder(&decoder_->state_, id, target);...
false
CWE-200
c894aa36be535886a8e5ff02cdbcd07dd24618f6
void AudioFlinger::EffectChain::setDevice_l(audio_devices_t device) { size_t size = mEffects.size(); for (size_t i = 0; i < size; i++) { mEffects[i]->setDevice(device); } }
false
CWE-399
9c895160d25a76c21b65bad141b08e8d4f99afef
static void kvm_del_async_pf_gfn(struct kvm_vcpu *vcpu, gfn_t gfn) { u32 i, j, k; i = j = kvm_async_pf_gfn_slot(vcpu, gfn); while (true) { vcpu->arch.apf.gfns[i] = ~0; do { j = kvm_async_pf_next_probe(j); if (vcpu->arch.apf.gfns[j] == ~0) return; k = kvm_async_pf_hash_fn(vcpu->arch.apf.gfns[j]); ...
false
CWE-200
bceaa90240b6019ed73b49965eac7d167610be69
int udp_push_pending_frames(struct sock *sk) { struct udp_sock *up = udp_sk(sk); struct inet_sock *inet = inet_sk(sk); struct flowi4 *fl4 = &inet->cork.fl.u.ip4; struct sk_buff *skb; int err = 0; skb = ip_finish_skb(sk, fl4); if (!skb) goto out; err = udp_send_skb(skb, fl4); out: up->len = 0; up->pendin...
false
CWE-200
f43bfaeddc79effbf3d0fcb53ca477cca66f3db8
static int atl2_close(struct net_device *netdev) { struct atl2_adapter *adapter = netdev_priv(netdev); WARN_ON(test_bit(__ATL2_RESETTING, &adapter->flags)); atl2_down(adapter); atl2_free_irq(adapter); atl2_free_ring_resources(adapter); return 0; }
false
CWE-416
a4150b688a754d3d10d2ca385155b1c95d77d6ae
error::Error GLES2DecoderPassthroughImpl::DoDeleteTransformFeedbacks( GLsizei n, const volatile GLuint* ids) { if (n < 0) { InsertError(GL_INVALID_VALUE, "n cannot be negative."); return error::kNoError; } return DeleteHelper(n, ids, &transform_feedback_id_map_, [this](GLsize...
false
CWE-189
20e0fa98b751facf9a1101edaefbc19c82616a68
int nfs4_open_delegation_recall(struct nfs_open_context *ctx, struct nfs4_state *state, const nfs4_stateid *stateid) { struct nfs4_exception exception = { }; struct nfs_server *server = NFS_SERVER(state->inode); int err; do { err = _nfs4_open_delegation_recall(ctx, state, stateid); switch (err) { case 0: ...
false
CWE-264
09ca8e1173bcb12e2a449698c9ae3b86a8a10195
static int hardware_enable_all(void) { int r = 0; raw_spin_lock(&kvm_lock); kvm_usage_count++; if (kvm_usage_count == 1) { atomic_set(&hardware_enable_failed, 0); on_each_cpu(hardware_enable_nolock, NULL, 1); if (atomic_read(&hardware_enable_failed)) { hardware_disable_all_nolock(); r = -EBUSY; } ...
false
CWE-362
49d31c2f389acfe83417083e1208422b4091cd9e
int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry, struct inode **delegated_inode) { struct inode *inode = old_dentry->d_inode; unsigned max_links = dir->i_sb->s_max_links; int error; if (!inode) return -ENOENT; error = may_create(dir, new_dentry); if (error) return error;...
false
CWE-416
a4150b688a754d3d10d2ca385155b1c95d77d6ae
ScriptValue WebGLRenderingContextBase::getProgramParameter( ScriptState* script_state, WebGLProgram* program, GLenum pname) { if (!ValidateWebGLProgramOrShader("getProgramParamter", program)) { return ScriptValue::CreateNull(script_state); } GLint value = 0; switch (pname) { case GL_DELETE_...
true
CWE-399
6ec82562ffc6f297d0de36d65776cff8e5704867
static int __init dev_proc_init(void) { return register_pernet_subsys(&dev_proc_ops); }
false
CWE-119
35eb28748d45b87695a69eceffaff73a0be476af
content::PageType BackgroundLoaderOffliner::GetPageType( content::WebContents* web_contents) { DCHECK(web_contents->GetController().GetVisibleEntry()) << "An entry must have committed at this WebContents"; return web_contents->GetController().GetVisibleEntry()->GetPageType(); }
false
CWE-119
b98b0bc8c431e3ceb4b26b0dfc8db509518fb290
int __sock_cmsg_send(struct sock *sk, struct msghdr *msg, struct cmsghdr *cmsg, struct sockcm_cookie *sockc) { u32 tsflags; switch (cmsg->cmsg_type) { case SO_MARK: if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) return -EPERM; if (cmsg->cmsg_len != CMSG_LEN(sizeof(u32))) return -EINVAL; s...
false
CWE-416
a4150b688a754d3d10d2ca385155b1c95d77d6ae
error::Error GLES2DecoderImpl::HandleGetShaderPrecisionFormat( uint32_t immediate_data_size, const volatile void* cmd_data) { const volatile gles2::cmds::GetShaderPrecisionFormat& c = *static_cast<const volatile gles2::cmds::GetShaderPrecisionFormat*>( cmd_data); GLenum shader_type = static_...
false
CWE-362
d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978
static int ipip_rcv(struct sk_buff *skb) { struct ip_tunnel *tunnel; const struct iphdr *iph = ip_hdr(skb); rcu_read_lock(); if ((tunnel = ipip_tunnel_lookup(dev_net(skb->dev), iph->saddr, iph->daddr)) != NULL) { if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { rcu_read_unlock(); kfree_skb(skb); ...
false
CWE-189
4cf106cdb83dd6b35d3b26d06cc67d1d2d99041e
png_do_read_interlace(png_structp png_ptr) { png_row_infop row_info = &(png_ptr->row_info); png_bytep row = png_ptr->row_buf + 1; int pass = png_ptr->pass; png_uint_32 transformations = png_ptr->transformations; /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ /* Offset to next ...
false
CWE-119
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
int qeth_init_qdio_queues(struct qeth_card *card) { int i, j; int rc; QETH_DBF_TEXT(SETUP, 2, "initqdqs"); /* inbound queue */ memset(card->qdio.in_q->qdio_bufs, 0, QDIO_MAX_BUFFERS_PER_Q * sizeof(struct qdio_buffer)); qeth_initialize_working_pool_list(card); /*give only as many buffers to hardware as ...
false
CWE-20
e89cfcb9090e8c98129ae9160c513f504db74599
TabStripGtk::DropInfo::DropInfo(int drop_index, bool drop_before, bool point_down) : drop_index(drop_index), drop_before(drop_before), point_down(point_down) { CreateContainer(); drop_arrow = GetDropArrowImage(point_down); }
false
CWE-362
04f5866e41fb70690e28397487d8bd8eea7d712a
SYSCALL_DEFINE1(old_mmap, struct mmap_arg_struct __user *, arg) { struct mmap_arg_struct a; if (copy_from_user(&a, arg, sizeof(a))) return -EFAULT; if (offset_in_page(a.offset)) return -EINVAL; return ksys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT); }
false
CWE-20
fff450abc4e2fb330ba700547a8e6a7b0fb90a6e
bool OutOfProcessInstance::Confirm(const std::string& message) { pp::Var result = ModalDialog(this, "confirm", message, std::string()); return result.is_bool() ? result.AsBool() : false; }
false
CWE-20
8355de453bb4014b74b2db5d7ca38c5664d65d83
void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) { if (frame_tree_node_->IsMainFrame()) { TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP0( "navigation", "Navigation timeToNetworkStack", navigation_handle_.get(), timestamp); } frame_tree_node_->navigator()->LogResourceRequestTime(time...
false
CWE-264
d123966ec156cd2f92fdada36be39694641b479e
void FileAPIMessageFilter::DidFinish(int request_id, base::PlatformFileError result) { if (result == base::PLATFORM_FILE_OK) Send(new FileSystemMsg_DidSucceed(request_id)); else Send(new FileSystemMsg_DidFail(request_id, result)); UnregisterOperation(request_id); }
false
CWE-416
df80cd9b28b9ebaa284a41df611dbf3a2d05ca74
static struct sctp_transport *sctp_addr_id2transport(struct sock *sk, struct sockaddr_storage *addr, sctp_assoc_t id) { struct sctp_association *addr_asoc = NULL, *id_asoc = NULL; struct sctp_af *af = sctp_get_af_specific(addr->ss_family); union sctp_addr *laddr = (union sctp_addr *)addr; stru...
false
CWE-416
11a4cc4a6d6e665d9a118fada4b7c658d6f70d95
void FrameView::paintScrollbar(GraphicsContext* context, Scrollbar* bar, const IntRect& rect) { bool needsBackgorund = bar->isCustomScrollbar() && m_frame->isMainFrame(); if (needsBackgorund) { IntRect toFill = bar->frameRect(); toFill.intersect(rect); context->fillRect(toFill, baseBackg...
false
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
68