cwe
stringclasses
9 values
id
stringlengths
40
40
source
stringlengths
14
66.9k
label
bool
2 classes
CWE-399
a6f7726de20450074a01493e4e85409ce3f2595a
void Document::webkitExitFullscreen() { Document* currentDoc = this; if (m_fullScreenElementStack.isEmpty()) return; Deque<RefPtr<Document> > descendants; for (Frame* descendant = frame() ? frame()->tree()->traverseNext() : 0; descendant; descendant = descendant->tree()->traverseNext(...
false
CWE-119
7f0126ff011142c8619b10a6e64d04d1745c503a
void kickNoResults() { kick(-1, -1, WebTextDecorationTypeSpelling); }
false
CWE-399
0b760113a3a155269a3fba93a409c640031dd68f
static void rpcproc_encode_null(void *rqstp, struct xdr_stream *xdr, void *obj) { }
false
CWE-119
33827275411b33371e7bb750cce20f11de85002d
static RefPtr<Image> ImageFromNode(const Node& node) { DCHECK(!node.GetDocument().NeedsLayoutTreeUpdate()); DocumentLifecycle::DisallowTransitionScope disallow_transition( node.GetDocument().Lifecycle()); LayoutObject* layout_object = node.GetLayoutObject(); if (!layout_object) return nullptr; if ...
false
CWE-20
e89cfcb9090e8c98129ae9160c513f504db74599
void Browser::DidEndColorChooser() { color_chooser_.reset(); }
false
CWE-399
a430c9166312e1aa3d80bce32374233bdbfeba32
static int read_emulated(struct x86_emulate_ctxt *ctxt, unsigned long addr, void *dest, unsigned size) { int rc; struct read_cache *mc = &ctxt->mem_read; if (mc->pos < mc->end) goto read_cached; WARN_ON((mc->end + size) >= sizeof(mc->data)); rc = ctxt->ops->read_emulated(ctxt, addr, mc->data + mc->end, si...
false
CWE-20
8262245d384be025f13e2a5b3a03b7e5c98374ce
void RenderView::OnScriptEvalRequest(const string16& frame_xpath, const string16& jscript, int id, bool notify_result) { EvaluateScript(frame_xpath, jscript, id, notify_result); }
false
CWE-200
eea3300239f0b53e172a320eb8de59d0bea65f27
void DevToolsDataSource::OnURLFetchComplete(const net::URLFetcher* source) { DCHECK(source); PendingRequestsMap::iterator it = pending_.find(source); DCHECK(it != pending_.end()); std::string response; source->GetResponseAsString(&response); delete source; it->second.Run(base::RefCountedString::TakeString...
false
CWE-20
77c1090f94d1b0b5186fb13a1b71b47b1343f87f
static inline int connection_based(struct sock *sk) { return sk->sk_type == SOCK_SEQPACKET || sk->sk_type == SOCK_STREAM; }
false
CWE-119
33827275411b33371e7bb750cce20f11de85002d
std::pair<int, int> FrameSelection::LayoutSelectionStartEnd() { return layout_selection_->SelectionStartEnd(); }
false
CWE-264
e9841fbdaf41b4a2baaa413f94d5c0197f9261f4
bool RemoveUberHost(GURL* url) { if (url->host() != chrome::kChromeUIUberHost) return false; if (url->path().empty() || url->path() == "/") return false; const std::string old_path = url->path(); const std::string::size_type separator = old_path.find('/', 1); std::string new_host; std::string new...
false
CWE-119
7d3e91a89b7adbc2831334def9e494dd9892f9af
static void nfs4_proc_unlink_setup(struct rpc_message *msg, struct inode *dir) { struct nfs_server *server = NFS_SERVER(dir); struct nfs_removeargs *args = msg->rpc_argp; struct nfs_removeres *res = msg->rpc_resp; res->server = server; msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_REMOVE]; nfs41_init_sequence(&...
false
CWE-119
0c319d3a144d4b8f1ea2047fd614d2149b68f889
nvmet_fc_tgt_a_put(struct nvmet_fc_tgt_assoc *assoc) { kref_put(&assoc->ref, nvmet_fc_target_assoc_free); }
false
CWE-416
a4150b688a754d3d10d2ca385155b1c95d77d6ae
error::Error GLES2DecoderPassthroughImpl::DoReleaseTexImage2DCHROMIUM( GLenum target, GLint imageId) { if (target != GL_TEXTURE_2D) { InsertError(GL_INVALID_ENUM, "Invalid target"); return error::kNoError; } const BoundTexture& bound_texture = bound_textures_[static_cast<size_t>(TextureTarg...
false
CWE-20
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
static int pppoe_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) { struct pppoe_hdr *ph; struct pppox_sock *po; struct pppoe_net *pn; int len; skb = skb_share_check(skb, GFP_ATOMIC); if (!skb) goto out; if (!pskb_may_pull(skb, sizeof(struct pppoe_h...
false
CWE-20
bfd0a56b90005f8c8a004baf407ad90045c2b11e
int kvm_mmu_reset_context(struct kvm_vcpu *vcpu) { destroy_kvm_mmu(vcpu); return init_kvm_mmu(vcpu); }
false
CWE-264
4943ba16bbc2db05115707b3ff7b4874e9e3c560
static void cryptd_hash_digest(struct crypto_async_request *req_async, int err) { struct cryptd_hash_ctx *ctx = crypto_tfm_ctx(req_async->tfm); struct crypto_shash *child = ctx->child; struct ahash_request *req = ahash_request_cast(req_async); struct cryptd_hash_request_ctx *rctx = ahash_request_ctx(req); struct s...
false
CWE-399
0e9a9a1ad619e7e987815d20262d36a2f95717ca
int ext4_orphan_add(handle_t *handle, struct inode *inode) { struct super_block *sb = inode->i_sb; struct ext4_iloc iloc; int err = 0, rc; if (!EXT4_SB(sb)->s_journal) return 0; mutex_lock(&EXT4_SB(sb)->s_orphan_lock); if (!list_empty(&EXT4_I(inode)->i_orphan)) goto out_unlock; /* * Orphan handling is o...
false
CWE-119
295c883fe3105b19bcd0f9e07d54c6b589fc5bff
void SimpleSoftOMXComponent::onPortEnable(OMX_U32 portIndex, bool enable) { CHECK_LT(portIndex, mPorts.size()); PortInfo *port = &mPorts.editItemAt(portIndex); CHECK_EQ((int)port->mTransition, (int)PortInfo::NONE); CHECK(port->mDef.bEnabled == !enable); if (!enable) { port->mDef.bEnabled = OMX_F...
false
CWE-264
0a57375ad73780e61e1770a9d88b0529b0dbd33b
void RenderViewImpl::SyncSelectionIfRequired() { WebFrame* frame = webview()->focusedFrame(); if (!frame) return; string16 text; size_t offset; ui::Range range; if (pepper_helper_->IsPluginFocused()) { pepper_helper_->GetSurroundingText(&text, &range); offset = 0; // Pepper API does not suppor...
false
CWE-416
1b53cf9815bb4744958d41f3795d5d5a1d365e2d
static int determine_cipher_type(struct fscrypt_info *ci, struct inode *inode, const char **cipher_str_ret, int *keysize_ret) { if (S_ISREG(inode->i_mode)) { if (ci->ci_data_mode == FS_ENCRYPTION_MODE_AES_256_XTS) { *cipher_str_ret = "xts(aes)"; *keysize_ret = FS_AES_256_XTS_KEY_SIZE; return 0; } p...
false
CWE-20
ab5e55ff333def909d025ac45da9ffa0d88a63f2
void RTCPeerConnectionHandlerDummy::stop() { }
false
CWE-119
f81038006b4c59a5a148dcad887371206033c28f
void NuPlayer::GenericSource::resetDataSource() { mHTTPService.clear(); mHttpSource.clear(); mUri.clear(); mUriHeaders.clear(); if (mFd >= 0) { close(mFd); mFd = -1; } mOffset = 0; mLength = 0; setDrmPlaybackStatusIfNeeded(Playback::STOP, 0); mDecryptHandle = NULL; ...
false
CWE-20
9eb1fd426a04adac0906c81ed88f1089969702ba
bool BeginInstallWithManifestFunction::RunImpl() { if (!IsWebStoreURL(profile_, source_url())) { SetResult(PERMISSION_DENIED); return false; } if (!user_gesture() && !ignore_user_gesture_for_tests) { SetResult(NO_GESTURE); error_ = kUserGestureRequiredError; return false; } EXTENSION_FUN...
false
CWE-189
58936737b65052775b67b1409b87edbbbc09f72b
void BlobURLRequestJob::CreateFileStreamReader(size_t index, int64 additional_offset) { DCHECK_LT(index, blob_data_->items().size()); const BlobData::Item& item = blob_data_->items().at(index); DCHECK(IsFileType(item.type())); DCHECK_EQ(0U, index_to_reader_.count(i...
false
CWE-119
f6ac1dba5e36f338a490752a2cbef3339096d9fe
void WebGLRenderingContextBase::DrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, long long offset, ...
false
CWE-399
84d73cd3fb142bf1298a8c13fd4ca50fd2432372
int __rtnl_af_register(struct rtnl_af_ops *ops) { list_add_tail(&ops->list, &rtnl_af_ops); return 0; }
false
CWE-189
971548cdca2d4c0a6fedd3db0c94372c2a27eac3
void RenderFrameHostImpl::FrameSizeChanged(const gfx::Size& frame_size) { frame_size_ = frame_size; }
false
CWE-264
0c3b93c8c2027e74af642967eee5c142c8fd185d
status_t MediaPlayerService::Client::setVideoSurfaceTexture( const sp<IGraphicBufferProducer>& bufferProducer) { ALOGV("[%d] setVideoSurfaceTexture(%p)", mConnId, bufferProducer.get()); sp<MediaPlayerBase> p = getPlayer(); if (p == 0) return UNKNOWN_ERROR; sp<IBinder> binder(IInterface::asBinder(bufferPr...
false
CWE-119
f0fe970df3838c202ef6c07a4c2b36838ef0a88b
static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb, struct iov_iter *to) { ssize_t rc; struct path *path; struct file *file = iocb->ki_filp; rc = generic_file_read_iter(iocb, to); if (rc >= 0) { path = ecryptfs_dentry_to_lower_path(file->f_path.dentry); touch_atime(path); } return rc; }
false
CWE-416
f03ea5a5c2ff26e239dfd23e263b15da2d9cee93
void OnRunJavaScriptDialog(const base::string16& message, const base::string16&, JavaScriptDialogType, bool*, base::string16*) { callback_.Run(message); }
false
CWE-20
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
static void mISDN_sock_unlink(struct mISDN_sock_list *l, struct sock *sk) { write_lock_bh(&l->lock); sk_del_node_init(sk); write_unlock_bh(&l->lock); }
false
CWE-362
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
static struct dquot **ext4_get_dquots(struct inode *inode) { return EXT4_I(inode)->i_dquot; }
false
CWE-200
b66c5984017533316fd1951770302649baf1aa33
static char *scanarg(char *s, char del) { char c; while ((c = *s++) != del) { if (c == '\\' && *s == 'x') { s++; if (!isxdigit(*s++)) return NULL; if (!isxdigit(*s++)) return NULL; } } return s; }
false
CWE-20
77751427a1ff25b27d47a4c36b12c3c8667855ac
static int addrconf_ifid_eui48(u8 *eui, struct net_device *dev) { if (dev->addr_len != ETH_ALEN) return -1; memcpy(eui, dev->dev_addr, 3); memcpy(eui + 5, dev->dev_addr + 3, 3); /* * The zSeries OSA network cards can be shared among various * OS instances, but the OSA cards have only one MAC address. * Thi...
false
CWE-200
c6f0d22d508a551a40fc8bd7418941b77435aac3
bool OmniboxViewViews::OnMouseDragged(const ui::MouseEvent& event) { if (filter_drag_events_for_unelision_ && !ExceededDragThreshold(event.root_location() - GetLastClickRootLocation())) { return true; } if (HasTextBeingDragged()) CloseOmniboxPopup(); bool handled = v...
false
CWE-399
c50ac050811d6485616a193eb0f37bfbd191cc89
static int hugetlb_acct_memory(struct hstate *h, long delta) { int ret = -ENOMEM; spin_lock(&hugetlb_lock); /* * When cpuset is configured, it breaks the strict hugetlb page * reservation as the accounting is done on a global variable. Such * reservation is completely rubbish in the presence of cpuset because...
false
CWE-362
21f8aaee0c62708654988ce092838aa7df4d25d8
static void ath_tx_set_retry(struct ath_softc *sc, struct ath_txq *txq, struct sk_buff *skb, int count) { struct ath_frame_info *fi = get_frame_info(skb); struct ath_buf *bf = fi->bf; struct ieee80211_hdr *hdr; int prev = fi->retries; TX_STAT_INC(txq->axq_qnum, a_retries); fi->retries += count; if (pre...
false
CWE-20
df5b1e1f88e013bc96107cc52c4a4f33a8238444
void BackendImpl::FlushForTesting() { g_internal_cache_thread.Get().FlushForTesting(); }
false
CWE-399
c4f40933f2cd7f975af63e56ea4cdcdc6c636f73
void TaskManagerTableModel::GetGroupRangeForItem(int item, views::GroupRange* range) { TaskManagerModel::GroupRange range_pair = model_->GetGroupRangeForResource(item); range->start = range_pair.first; range->length = range_pair.second; }
false
CWE-119
94d9e646454f6246bf823b6897bd6aea5f08eda3
bool ACodec::IdleToExecutingState::onMessageReceived(const sp<AMessage> &msg) { switch (msg->what()) { case kWhatSetParameters: case kWhatShutdown: { mCodec->deferMessage(msg); return true; } case kWhatResume: { return true; } case kWhatFlush: { sp<AMessage> notify = mCodec->mNotif...
false
CWE-416
45f6fad84cc305103b28d73482b344d7f5b76f39
static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, u8 type, u8 code, int offset, __be32 info) { const struct ipv6hdr *hdr = (const struct ipv6hdr *)skb->data; const struct dccp_hdr *dh = (struct dccp_hdr *)(skb->data + offset); struct dccp_sock *dp; struct ipv6_pinfo *np; struct sock *sk; ...
false
CWE-362
04f5866e41fb70690e28397487d8bd8eea7d712a
int mm_take_all_locks(struct mm_struct *mm) { struct vm_area_struct *vma; struct anon_vma_chain *avc; BUG_ON(down_read_trylock(&mm->mmap_sem)); mutex_lock(&mm_all_locks_mutex); for (vma = mm->mmap; vma; vma = vma->vm_next) { if (signal_pending(current)) goto out_unlock; if (vma->vm_file && vma->vm_file->...
false
CWE-20
e89cfcb9090e8c98129ae9160c513f504db74599
void TabStripModel::AppendTabContents(TabContents* contents, bool foreground) { int index = order_controller_->DetermineInsertionIndexForAppending(); InsertTabContentsAt(index, contents, foreground ? (ADD_INHERIT_GROUP | ADD_ACTIVE) : ...
false
CWE-362
de9f869616dd95e95c00bdd6b0fcd3421e8a4323
static int resolve_seg_reg(struct insn *insn, struct pt_regs *regs, int regoff) { int idx; /* * In the unlikely event of having to resolve the segment register * index for rIP, do it first. Segment override prefixes should not * be used. Hence, it is not necessary to inspect the instruction, * which may be i...
false
CWE-20
cc274e2abe8b2a6698a5c47d8aa4bb45f1f9538d
long long Chapters::Atom::GetStartTime(const Chapters* pChapters) const { return GetTime(pChapters, m_start_timecode); }
false
CWE-200
7558d03e6498e970b761aa44fff6b2c659202d95
static OMX_ERRORTYPE unsubscribe_to_events(int fd) { OMX_ERRORTYPE eRet = OMX_ErrorNone; struct v4l2_event_subscription sub; int array_sz = sizeof(event_type)/sizeof(int); int i,rc; if (fd < 0) { DEBUG_PRINT_ERROR("Invalid input: %d", fd); return OMX_ErrorBadParameter; } for (i = 0; i < array_sz; ++...
false
CWE-284
c0569cc04741cccf6548c2169fcc1609d958523f
WebstoreBindings::WebstoreBindings(ScriptContext* context) : ObjectBackedNativeHandler(context) { RouteFunction("Install", base::Bind(&WebstoreBindings::Install, base::Unretained(this))); }
true
CWE-119
98095c718d7580b5d6715e5bfd8698234ecb4470
void WebGL2RenderingContextBase::DestroyContext() { WebGLRenderingContextBase::DestroyContext(); }
false
CWE-20
5fd35e5359c6345b8709695cd71fba307318e6aa
void RenderBox::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) { rects.append(LayoutRect(accumulatedOffset, size())); }
false
CWE-399
d974baa398f34393db76be45f7d4d04fbdbb4a0a
static void fix_pmode_seg(struct kvm_vcpu *vcpu, int seg, struct kvm_segment *save) { if (!emulate_invalid_guest_state) { /* * CS and SS RPL should be equal during guest entry according * to VMX spec, but in reality it is not always so. Since vcpu * is in the middle of the transition from real mode to ...
false
CWE-264
4943ba16bbc2db05115707b3ff7b4874e9e3c560
struct cryptd_aead *cryptd_alloc_aead(const char *alg_name, u32 type, u32 mask) { char cryptd_alg_name[CRYPTO_MAX_ALG_NAME]; struct crypto_aead *tfm; if (snprintf(cryptd_alg_name, CRYPTO_MAX_ALG_NAME, "cryptd(%s)", alg_name) >= CRYPTO_MAX_ALG_NAME) return ERR_PTR(-EINVAL); tfm = crypto_alloc_aead(...
false
CWE-399
87a082c5137a63dedb3fe5b1f48f75dcd1fd780c
void Layer::SetBounds(const gfx::Size& size) { DCHECK(IsPropertyChangeAllowed()); if (bounds() == size) return; bounds_ = size; SetNeedsCommit(); }
false
CWE-399
4d77eed905ce1d00361282e8822a2a3be61d25c0
Node::InsertionNotificationRequest HTMLFormElement::insertedInto(ContainerNode* insertionPoint) { HTMLElement::insertedInto(insertionPoint); if (insertionPoint->inDocument()) this->document().didAssociateFormControl(this); return InsertionDone; }
false
CWE-399
dd3b6fe574edad231c01c78e4647a74c38dc4178
GDataFileSystem::GetFileFromCacheParams::GetFileFromCacheParams( const FilePath& virtual_file_path, const FilePath& local_tmp_path, const GURL& content_url, const std::string& resource_id, const std::string& md5, const std::string& mime_type, const GetFileCallback& get_file_callback, con...
false
CWE-119
51217e69697fba92a06e07e16f55c9a52d8e8945
static void logi_dj_recv_forward_report(struct dj_receiver_dev *djrcv_dev, struct dj_report *dj_report) { /* We are called from atomic context (tasklet && djrcv->lock held) */ struct dj_device *dj_device; dj_device = djrcv_dev->paired_dj_devices[dj_report->device_index]; if (dj_device == NULL) { dbg_hid("d...
false
CWE-20
adca986a53b31b6da4cb22f8e755f6856daea89a
void RenderFrameHostManager::CommitPendingFramePolicy() { if (!frame_tree_node_->CommitPendingFramePolicy()) return; CHECK(frame_tree_node_->parent()); SiteInstance* parent_site_instance = frame_tree_node_->parent()->current_frame_host()->GetSiteInstance(); for (const auto& pair : proxy_hosts_) { ...
false
CWE-264
5d26a105b5a73e5635eae0629b42fa0a90e07b7b
static struct crypto_alg *crypto_larval_add(const char *name, u32 type, u32 mask) { struct crypto_alg *alg; struct crypto_larval *larval; larval = crypto_larval_alloc(name, type, mask); if (IS_ERR(larval)) return ERR_CAST(larval); atomic_set(&larval->alg.cra_refcnt, 2); down_write(&crypto_alg_sem); ...
false
CWE-264
a4a5ed2835e8ea042868b7401dced3f517cafa76
static int __init parse_reservelow(char *p) { unsigned long long size; if (!p) return -EINVAL; size = memparse(p, &p); if (size < 4096) size = 4096; if (size > 640*1024) size = 640*1024; reserve_low = size; return 0; }
false
CWE-264
4a1d704194a441bf83c636004a479e01360ec850
struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg, struct zone *zone) { int nid = zone_to_nid(zone); int zid = zone_idx(zone); struct mem_cgroup_per_zone *mz = mem_cgroup_zoneinfo(memcg, nid, zid); return &mz->reclaim_stat; }
false
CWE-119
0b694217046d6b2bfa5814676e8615c18e6a45ff
bool SystemClipboard::IsHTMLAvailable() { if (!IsValidBufferType(buffer_)) return false; bool result = false; clipboard_->IsFormatAvailable(mojom::ClipboardFormat::kHtml, buffer_, &result); return result; }
false
CWE-119
412b65d15a7f8a93794653968308fc100f2aa87c
void hns_ppe_get_strings(struct hns_ppe_cb *ppe_cb, int stringset, u8 *data) { char *buff = (char *)data; int index = ppe_cb->index; snprintf(buff, ETH_GSTRING_LEN, "ppe%d_rx_sw_pkt", index); buff = buff + ETH_GSTRING_LEN; snprintf(buff, ETH_GSTRING_LEN, "ppe%d_rx_pkt_ok", index); buff = buff + ETH_GSTRING_LEN; ...
false
CWE-362
de9f869616dd95e95c00bdd6b0fcd3421e8a4323
static bool is_string_insn(struct insn *insn) { insn_get_opcode(insn); /* All string instructions have a 1-byte opcode. */ if (insn->opcode.nbytes != 1) return false; switch (insn->opcode.bytes[0]) { case 0x6c ... 0x6f: /* INS, OUTS */ case 0xa4 ... 0xa7: /* MOVS, CMPS */ case 0xaa ... 0xaf: /* STOS, LODS, S...
false
CWE-119
1f4b49e64adf4623eefda503bca61e253597b9bf
status_t Parcel::writeCharVector(const std::unique_ptr<std::vector<char16_t>>& val) { return writeNullableTypedVector(val, &Parcel::writeChar); }
false
CWE-20
282f53ffdc3b1902da86f6a0791af736837efbf8
std::string GetSyncErrorAction(sync_ui_util::ActionType action_type) { switch (action_type) { case sync_ui_util::REAUTHENTICATE: return "reauthenticate"; case sync_ui_util::SIGNOUT_AND_SIGNIN: return "signOutAndSignIn"; case sync_ui_util::UPGRADE_CLIENT: return "upgradeClient"; case ...
false
CWE-20
eb178619f930fa2ba2348de332a1ff1c66a31424
xfs_buf_rele( xfs_buf_t *bp) { struct xfs_perag *pag = bp->b_pag; trace_xfs_buf_rele(bp, _RET_IP_); if (!pag) { ASSERT(list_empty(&bp->b_lru)); ASSERT(RB_EMPTY_NODE(&bp->b_rbnode)); if (atomic_dec_and_test(&bp->b_hold)) xfs_buf_free(bp); return; } ASSERT(!RB_EMPTY_NODE(&bp->b_rbnode)); ASSERT(ato...
false
CWE-200
5d2be1422e02ccd697ccfcd45c85b4a26e6178e2
static int tipc_nl_compat_media_set(struct sk_buff *skb, struct tipc_nl_compat_msg *msg) { struct nlattr *prop; struct nlattr *media; struct tipc_link_config *lc; lc = (struct tipc_link_config *)TLV_DATA(msg->req); media = nla_nest_start(skb, TIPC_NLA_MEDIA); if (!media) return -EMSGSIZE; if (nla_pu...
false
CWE-264
f63a8daa5812afef4f06c962351687e1ff9ccb2b
static void perf_mmap_open(struct vm_area_struct *vma) { struct perf_event *event = vma->vm_file->private_data; atomic_inc(&event->mmap_count); atomic_inc(&event->rb->mmap_count); }
false
CWE-20
e89cfcb9090e8c98129ae9160c513f504db74599
InsertTabAnimation(TabStripGtk* tabstrip, int index) : TabAnimation(tabstrip, INSERT), index_(index) { int tab_count = tabstrip->GetTabCount(); int end_mini_count = tabstrip->GetMiniTabCount(); int start_mini_count = end_mini_count; if (index < end_mini_count) start_mini_count--; ...
false
CWE-264
b04aee833c5cfb6b31b8558350feb14bb1a0f353
void Camera3Device::RequestThread::requestExit() { Thread::requestExit(); mDoPauseSignal.signal(); mRequestSignal.signal(); }
false
CWE-399
54a20552e1eae07aa240fa370a0293e006b5faed
static int alloc_identity_pagetable(struct kvm *kvm) { /* Called with kvm->slots_lock held. */ int r = 0; BUG_ON(kvm->arch.ept_identity_pagetable_done); r = __x86_set_memory_region(kvm, IDENTITY_PAGETABLE_PRIVATE_MEMSLOT, kvm->arch.ept_identity_map_addr, PAGE_SIZE); return r; }
false
CWE-399
54a20552e1eae07aa240fa370a0293e006b5faed
static __init int hardware_setup(void) { int r = -ENOMEM, i, msr; rdmsrl_safe(MSR_EFER, &host_efer); for (i = 0; i < ARRAY_SIZE(vmx_msr_index); ++i) kvm_define_shared_msr(i, vmx_msr_index[i]); vmx_io_bitmap_a = (unsigned long *)__get_free_page(GFP_KERNEL); if (!vmx_io_bitmap_a) return r; vmx_io_bitmap_b =...
false
CWE-362
d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978
static int __init ip6_tunnel_init(void) { int err; if (xfrm6_tunnel_register(&ip4ip6_handler, AF_INET)) { printk(KERN_ERR "ip6_tunnel init: can't register ip4ip6\n"); err = -EAGAIN; goto out; } if (xfrm6_tunnel_register(&ip6ip6_handler, AF_INET6)) { printk(KERN_ERR "ip6_tunnel init: can't register...
true
CWE-200
04aaacb936a08d70862d6d9d7e8354721ae46be8
std::string SerializeOrigin(const url::Origin& origin) { return origin.GetURL().spec(); }
false
CWE-20
b944f670bb7a8a919daac497a4ea0536c954c201
bool JSFloat64ArrayConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticValueSlot<JSFloat64ArrayConstructor, JSDOMWrapper>(exec, &JSFloat64ArrayConstructorTable, jsCast<JSFloat64ArrayConstructor*>(cell), propertyName, slot); }
false
CWE-416
a4150b688a754d3d10d2ca385155b1c95d77d6ae
error::Error GLES2DecoderPassthroughImpl::DoPopGroupMarkerEXT() { api()->glPopGroupMarkerEXTFn(); return error::kNoError; }
false
CWE-119
1c40f9042ae2d6ee7483d72998aabb5e73b2ff60
void ResourceLoader::Run() { StartWith(resource_->GetResourceRequest()); }
false
CWE-399
3a2cf7d1376ae33054b878232fb38b8fbed29e31
PepperMediaDeviceManager* PepperPlatformAudioInput::GetMediaDeviceManager() { DCHECK(main_message_loop_proxy_->BelongsToCurrentThread()); RenderFrameImpl* const render_frame = RenderFrameImpl::FromRoutingID(render_frame_id_); return render_frame ? PepperMediaDeviceManager::GetForRenderFrame(render...
true
CWE-119
7f3d85b096f66870a15b37c2f40b219b2e292693
png_get_y_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) #ifdef PNG_pHYs_SUPPORTED if (info_ptr->valid & PNG_INFO_pHYs) { png_debug1(1, "in %s retrieval function", "png_get_y_pixels_per_meter"); if (info_ptr->phys_unit_type != PNG_RESOLUTION_ME...
false
CWE-416
073c516ff73557a8f7315066856c04b50383ac34
int open_related_ns(struct ns_common *ns, struct ns_common *(*get_ns)(struct ns_common *ns)) { struct path path = {}; struct file *f; void *err; int fd; fd = get_unused_fd_flags(O_CLOEXEC); if (fd < 0) return fd; while (1) { struct ns_common *relative; relative = get_ns(ns); if (IS_ERR(relative))...
false
CWE-362
321027c1fe77f892f4ea07846aeae08cefbbb290
static void __perf_addr_filters_adjust(struct perf_event *event, void *data) { struct perf_addr_filters_head *ifh = perf_event_addr_filters(event); struct vm_area_struct *vma = data; unsigned long off = vma->vm_pgoff << PAGE_SHIFT, flags; struct file *file = vma->vm_file; struct perf_addr_filter *filter; unsigned...
false
CWE-119
c4baad50297d84bde1a7ad45e50c73adae4a2192
static void remove_port_data(struct port *port) { struct port_buffer *buf; spin_lock_irq(&port->inbuf_lock); /* Remove unused data this port might have received. */ discard_port_data(port); spin_unlock_irq(&port->inbuf_lock); /* Remove buffers we queued up for the Host to send us data in. */ do { spin_lock_i...
false
CWE-264
c0da7c1c6e9ffe5006e146b6426f987238d4bf2e
void DevToolsWindow::ScheduleAction(const DevToolsToggleAction& action) { action_on_load_ = action; if (is_loaded_) DoAction(); }
false
CWE-119
7cea5cb64b83d690fe02bc210bbdf08f5a87636f
int SoftGSM::DecodeGSM(gsm handle, int16_t *out, uint8_t *in, size_t inSize) { int ret = 0; while (inSize > 0) { gsm_decode(handle, in, out); in += 33; inSize -= 33; out += 160; ret += 160; gsm_decode(handle, in, out); in += 32; inSize -= 32; o...
false
CWE-20
e89cfcb9090e8c98129ae9160c513f504db74599
BrowserWindowGtk::~BrowserWindowGtk() { ui::ActiveWindowWatcherX::RemoveObserver(this); browser_->tab_strip_model()->RemoveObserver(this); }
false
CWE-200
7558d03e6498e970b761aa44fff6b2c659202d95
bool omx_venc::dev_get_vui_timing_info(OMX_U32 *enabled) { #ifdef _MSM8974_ return handle->venc_get_vui_timing_info(enabled); #else DEBUG_PRINT_ERROR("Get vui timing information is not supported"); return false; #endif }
false
CWE-264
744c2a2d90c3c9a33c818e1ea4b7ccb5010663a0
void ExtensionDevToolsClientHost::InfoBarDestroyed() { infobar_delegate_ = NULL; SendDetachedEvent(); Close(); }
false
CWE-20
e89cfcb9090e8c98129ae9160c513f504db74599
bool TabStripModel::IsTabDiscarded(int index) const { return contents_data_[index]->discarded; }
false
CWE-416
370bd9b522d2ccd4a3113d6c93d30cdf8ca502ef
net::RequestPriority ConvertWebKitPriorityToNetPriority( const WebURLRequest::Priority& priority) { switch (priority) { case WebURLRequest::PriorityVeryHigh: return net::HIGHEST; case WebURLRequest::PriorityHigh: return net::MEDIUM; case WebURLRequest::PriorityMedium: return net::L...
false
CWE-119
4ab25786c87eb20857bbb715c3ae34ec8fd6a214
static int lg_dinovo_mapping(struct hid_input *hi, struct hid_usage *usage, unsigned long **bit, int *max) { if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) return 0; switch (usage->hid & HID_USAGE) { case 0x00d: lg_map_key_clear(KEY_MEDIA); break; default: return 0; } return 1; }
false
CWE-189
20e0fa98b751facf9a1101edaefbc19c82616a68
static void nfs4_proc_write_rpc_prepare(struct rpc_task *task, struct nfs_write_data *data) { if (nfs4_setup_sequence(NFS_SERVER(data->inode), &data->args.seq_args, &data->res.seq_res, task)) return; rpc_call_start(task); }
false
CWE-399
d0de4dc584ec6aa3b26fffea320a8457827768fc
static int inotify_update_watch(struct fsnotify_group *group, struct inode *inode, u32 arg) { int ret = 0; retry: /* try to update and existing watch with the new arg */ ret = inotify_update_existing_watch(group, inode, arg); /* no mark present, try to add a new one */ if (ret == -ENOENT) ret = inotify_new_watc...
false
CWE-20
401d30ef93030afbf7e81e53a11b68fc36194502
void Document::dispose() { ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun); m_docType = 0; m_focusedElement = 0; m_hoverNode = 0; m_activeElement = 0; m_titleElement = 0; m_documentElement = 0; m_contextFeatures = ContextFeatures::defaultSwitch(); m_userActionElements.documentD...
false
CWE-399
80742f2ffeb9e90cd85cbee27acb9f924ffebd16
void AutofillManager::GetCreditCardSuggestions(FormStructure* form, const FormField& field, AutofillFieldType type, std::vector<string16>* values, ...
false
CWE-20
8e438e153f661e9df8db0ac41d587e940352df06
android::SoftOMXComponent *createSoftOMXComponent( const char *name, const OMX_CALLBACKTYPE *callbacks, OMX_PTR appData, OMX_COMPONENTTYPE **component) { return new android::SoftAAC2(name, callbacks, appData, component); }
false
CWE-200
5fe74f831fddb92afa5ddfe46490bb49f083132b
void WebLocalFrameImpl::StartNavigation(const WebURLRequest& request) { DCHECK(GetFrame()); DCHECK(!request.IsNull()); DCHECK(!request.Url().ProtocolIs("javascript")); if (GetTextFinder()) GetTextFinder()->ClearActiveFindMatch(); GetFrame()->Loader().StartNavigation( FrameLoadRequest( nul...
false
CWE-119
f81038006b4c59a5a148dcad887371206033c28f
status_t NuPlayer::GenericSource::doSelectTrack(size_t trackIndex, bool select, int64_t timeUs) { if (trackIndex >= mSources.size()) { return BAD_INDEX; } if (!select) { Track* track = NULL; if (mSubtitleTrack.mSource != NULL && trackIndex == mSubtitleTrack.mIndex) { track = &mSubtitleTrack; ...
false
CWE-119
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
static int qeth_issue_next_read(struct qeth_card *card) { int rc; struct qeth_cmd_buffer *iob; QETH_CARD_TEXT(card, 5, "issnxrd"); if (card->read.state != CH_STATE_UP) return -EIO; iob = qeth_get_buffer(&card->read); if (!iob) { dev_warn(&card->gdev->dev, "The qeth device driver " "failed to recover an er...
false
CWE-416
a4150b688a754d3d10d2ca385155b1c95d77d6ae
error::Error GLES2DecoderPassthroughImpl::DoGenQueriesEXT( GLsizei n, volatile GLuint* queries) { return GenHelper(n, queries, &query_id_map_, [this](GLsizei n, GLuint* queries) { api()->glGenQueriesFn(n, queries); }); }
false
CWE-119
905ad269c55fc62bee3da29f7b1d1efeba8aa1e1
static int proc_set_super(struct super_block *sb, void *data) { int err = set_anon_super(sb, NULL); if (!err) { struct pid_namespace *ns = (struct pid_namespace *)data; sb->s_fs_info = get_pid_ns(ns); } return err; }
false