cwe stringclasses 9
values | id stringlengths 40 40 | source stringlengths 14 66.9k | label bool 2
classes |
|---|---|---|---|
CWE-264 | f63a8daa5812afef4f06c962351687e1ff9ccb2b | void __perf_event_task_sched_in(struct task_struct *prev,
struct task_struct *task)
{
struct perf_event_context *ctx;
int ctxn;
for_each_task_context_nr(ctxn) {
ctx = task->perf_event_ctxp[ctxn];
if (likely(!ctx))
continue;
perf_event_context_sched_in(ctx, task);
}
/*
* if cgroup events exist on t... | false |
CWE-399 | f85a87ec670ad0fce9d98d90c9a705b72a288154 | static void voidCallbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate()));
imp->setVoidCallbackFunct... | false |
CWE-119 | c7e50b5ef454efd6ab9527d795442c213eeb6afa | bool PopupContainer::handleMouseReleaseEvent(const PlatformMouseEvent& event)
{
RefPtr<PopupContainer> protect(this);
UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
return m_listBox->handleMouseReleaseEvent(
constructRelativeMouseEvent(event, this, m_listBox.get()));
}
| false |
CWE-200 | 7b07f8eb75aa3097cdfd4f6eac3da49db787381d | static void ccid3_hc_rx_exit(struct sock *sk)
{
struct ccid3_hc_rx_sock *hc = ccid3_hc_rx_sk(sk);
tfrc_rx_hist_purge(&hc->rx_hist);
tfrc_lh_cleanup(&hc->rx_li_hist);
}
| false |
CWE-119 | faaa2fd0a05f1622d9a8806da118d4f3b602e707 | void HTMLMediaElement::changeNetworkStateFromLoadingToIdle() {
m_progressEventTimer.stop();
if (webMediaPlayer() && webMediaPlayer()->didLoadingProgress())
scheduleEvent(EventTypeNames::progress);
scheduleEvent(EventTypeNames::suspend);
setNetworkState(kNetworkIdle);
}
| false |
CWE-284 | 472271b153c5dc53c28beac55480a8d8434b2d5c | static inline unsigned int flags2pevents(int flags)
{
unsigned int pevents = 0;
if(flags & SOCK_THREAD_FD_WR)
pevents |= POLLOUT;
if(flags & SOCK_THREAD_FD_RD)
pevents |= POLLIN;
pevents |= POLL_EXCEPTION_EVENTS;
return pevents;
}
| false |
CWE-264 | 5d26a105b5a73e5635eae0629b42fa0a90e07b7b | static int xts_fallback_decrypt(struct blkcipher_desc *desc,
struct scatterlist *dst, struct scatterlist *src,
unsigned int nbytes)
{
struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
struct crypto_blkcipher *tfm;
unsigned int ret;
tfm = desc->tfm;
desc->tfm = xts_ctx->fallback;
ret = crypto_b... | false |
CWE-189 | d3bd7413e0ca40b60cf60d4003246d067cafdeda | static bool type_is_refcounted(enum bpf_reg_type type)
{
return type == PTR_TO_SOCKET;
}
| false |
CWE-362 | 0048b4837affd153897ed1222283492070027aa9 | static unsigned int __blk_mq_get_tag(struct blk_mq_alloc_data *data)
{
int tag;
tag = bt_get(data, &data->hctx->tags->bitmap_tags, data->hctx,
&data->ctx->last_tag, data->hctx->tags);
if (tag >= 0)
return tag + data->hctx->tags->nr_reserved_tags;
return BLK_MQ_TAG_FAIL;
}
| false |
CWE-20 | 36ae3c0a36b7456432fedce38ae2f7bd3e01a563 | ioeventfd_check_collision(struct kvm *kvm, struct _ioeventfd *p)
{
struct _ioeventfd *_p;
list_for_each_entry(_p, &kvm->ioeventfds, list)
if (_p->bus_idx == p->bus_idx &&
_p->addr == p->addr &&
(!_p->length || !p->length ||
(_p->length == p->length &&
(_p->wildcard || p->wildcard ||
... | false |
CWE-264 | 5d26a105b5a73e5635eae0629b42fa0a90e07b7b | static int ahash_sha1_init(struct ahash_request *req)
{
struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
struct hash_ctx *ctx = crypto_ahash_ctx(tfm);
ctx->config.data_format = HASH_DATA_8_BITS;
ctx->config.algorithm = HASH_ALGO_SHA1;
ctx->config.oper_mode = HASH_OPER_MODE_HASH;
ctx->digestsize = SHA1_DIGEST... | false |
CWE-399 | a6f7726de20450074a01493e4e85409ce3f2595a | static Editor::Command command(Document* document, const String& commandName, bool userInterface = false)
{
Frame* frame = document->frame();
if (!frame || frame->document() != document)
return Editor::Command();
document->updateStyleIfNeeded();
return frame->editor()->command(commandName,
... | false |
CWE-399 | dd3b6fe574edad231c01c78e4647a74c38dc4178 | bool GDataDirectory::FromProto(const GDataDirectoryProto& proto) {
DCHECK(proto.gdata_entry().file_info().is_directory());
DCHECK(!proto.gdata_entry().has_file_specific_info());
for (int i = 0; i < proto.child_files_size(); ++i) {
scoped_ptr<GDataFile> file(new GDataFile(NULL, directory_service_));
i... | true |
CWE-416 | 69b4b9ef7455753b12c3efe4eec71647e6fb1da1 | DataReductionProxyIOData::GetEffectiveConnectionType() const {
DCHECK(io_task_runner_->BelongsToCurrentThread());
return effective_connection_type_;
}
| false |
CWE-189 | 0837e3242c73566fc1c0196b4ec61779c25ffc93 | static int power_check_constraints(struct cpu_hw_events *cpuhw,
u64 event_id[], unsigned int cflags[],
int n_ev)
{
unsigned long mask, value, nv;
unsigned long smasks[MAX_HWEVENTS], svalues[MAX_HWEVENTS];
int n_alt[MAX_HWEVENTS], choice[MAX_HWEVENTS];
int i, j;
unsigned long addf = ppmu->add_fields;
... | false |
CWE-362 | d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978 | ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg)
{
struct ip_tunnel_prl_entry *p;
int err = 0;
if (a->addr == htonl(INADDR_ANY))
return -EINVAL;
spin_lock(&ipip6_prl_lock);
for (p = t->prl; p; p = p->next) {
if (p->addr == a->addr) {
if (chg) {
p->flags = a->flags;
goto... | false |
CWE-264 | 03a53d1c7765eeb3af0bc34c3dff02ada1953fbf | void InputDispatcher::dispatchEventLocked(nsecs_t currentTime,
EventEntry* eventEntry, const Vector<InputTarget>& inputTargets) {
#if DEBUG_DISPATCH_CYCLE
ALOGD("dispatchEventToCurrentInputTargets");
#endif
ALOG_ASSERT(eventEntry->dispatchInProgress); // should already have been set to true
pokeUserActiv... | false |
CWE-416 | 1b53cf9815bb4744958d41f3795d5d5a1d365e2d | static int digest_encode(const char *src, int len, char *dst)
{
int i = 0, bits = 0, ac = 0;
char *cp = dst;
while (i < len) {
ac += (((unsigned char) src[i]) << bits);
bits += 8;
do {
*cp++ = lookup_table[ac & 0x3f];
ac >>= 6;
bits -= 6;
} while (bits >= 6);
i++;
}
if (bits)
*cp++ = lookup_t... | false |
CWE-20 | 108147dfd1ea159fd3632ef92ccc4ab8952980c7 | void ContentSecurityPolicy::LogToConsole(const String& message,
MessageLevel level) {
LogToConsole(ConsoleMessage::Create(kSecurityMessageSource, level, message));
}
| false |
CWE-284 | 472271b153c5dc53c28beac55480a8d8434b2d5c | static int uipc_close_ch_locked(tUIPC_CH_ID ch_id)
{
int wakeup = 0;
BTIF_TRACE_EVENT("CLOSE CHANNEL %d", ch_id);
if (ch_id >= UIPC_CH_NUM)
return -1;
if (uipc_main.ch[ch_id].srvfd != UIPC_DISCONNECTED)
{
BTIF_TRACE_EVENT("CLOSE SERVER (FD %d)", uipc_main.ch[ch_id].srvfd);
close(uipc_main.ch... | false |
CWE-119 | 412b65d15a7f8a93794653968308fc100f2aa87c | static int hns_gmac_get_sset_count(int stringset)
{
if (stringset == ETH_SS_STATS)
return ARRAY_SIZE(g_gmac_stats_string);
return 0;
}
| true |
CWE-399 | 3b0d77670a0613f409110817455d2137576b485a | bool Plugin::NexeIsContentHandler() const {
return
!mime_type().empty() &&
mime_type() != kNaClMIMEType;
}
| false |
CWE-20 | 29734f46c6dc9362783091180c2ee279ad53637f | void V4L2JpegEncodeAccelerator::EncodedInstance::DestroyOutputBuffers() {
DCHECK(parent_->encoder_task_runner_->BelongsToCurrentThread());
free_output_buffers_.clear();
if (output_buffer_map_.empty())
return;
if (output_streamon_) {
__u32 type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
IOCTL_OR_ERROR_R... | false |
CWE-200 | d5e0d0f607a7a029c6563a0470d88255c89a8d11 | static int vsock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
{
int err;
err = sock_queue_rcv_skb(sk, skb);
if (err)
kfree_skb(skb);
return err;
}
| false |
CWE-399 | dd3b6fe574edad231c01c78e4647a74c38dc4178 | void GDataFileSystem::OnGetDocumentEntry(const FilePath& cache_file_path,
const GetFileFromCacheParams& params,
GDataErrorCode status,
scoped_ptr<base::Value> data) {
DCHECK(BrowserThread::Curren... | true |
CWE-20 | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | static void **alloc_pg_vec(struct netlink_sock *nlk,
struct nl_mmap_req *req, unsigned int order)
{
unsigned int block_nr = req->nm_block_nr;
unsigned int i;
void **pg_vec;
pg_vec = kcalloc(block_nr, sizeof(void *), GFP_KERNEL);
if (pg_vec == NULL)
return NULL;
for (i = 0; i < block_nr; i++) {
pg_vec[... | false |
CWE-399 | 5b6698b0e4a37053de35cc24ee695b98a7eb712b | bool batadv_frag_skb_buffer(struct sk_buff **skb,
struct batadv_orig_node *orig_node_src)
{
struct sk_buff *skb_out = NULL;
struct hlist_head head = HLIST_HEAD_INIT;
bool ret = false;
/* Add packet to buffer and table entry if merge is possible. */
if (!batadv_frag_insert_packet(orig_node_src, *skb, &head)... | false |
CWE-20 | 0720b02e4f303ea6b114d4ae9453e3a7ff55f8dc | bool WebContentsImpl::IsFocusedElementEditable() {
RenderFrameHostImpl* frame = GetFocusedFrame();
return frame && frame->has_focused_editable_element();
}
| false |
CWE-119 | b71fc042e1124cda2ab51dfdacc2362da62779a6 | bool QueryManager::HavePendingTransferQueries() {
return !pending_transfer_queries_.empty();
}
| false |
CWE-20 | 86acdca1b63e6890540fa19495cfc708beff3d8b | static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
{
int error = 0;
struct inode *target;
/*
* If we are going to change the parent - check write permissions,
* we'll need to flip '..'.
*/
if (new_dir != old_dir) {
error = inod... | false |
CWE-119 | 7926aff5c57b577ab0f43364ff0c59d968f6a414 | static void fill_skb_pool(rtl8150_t *dev)
{
struct sk_buff *skb;
int i;
for (i = 0; i < RX_SKB_POOL_SIZE; i++) {
if (dev->rx_skb_pool[i])
continue;
skb = dev_alloc_skb(RTL8150_MTU + 2);
if (!skb) {
return;
}
skb_reserve(skb, 2);
dev->rx_skb_pool[i] = skb;
}
}
| false |
CWE-264 | 04915c26ea193247b8a29aa24bfa34578ef5d39e | bool GraphicsContext3D::makeContextCurrent()
{
if (!m_private || m_renderStyle == RenderToCurrentGLContext)
return false;
return m_private->makeCurrentIfNeeded();
}
| false |
CWE-20 | 5cd363bc34f508c63b66e653bc41bd1783a4b711 | void RenderFrameHostManager::DidChangeOpener(
int opener_routing_id,
SiteInstance* source_site_instance) {
FrameTreeNode* opener = nullptr;
if (opener_routing_id != MSG_ROUTING_NONE) {
RenderFrameHostImpl* opener_rfhi = RenderFrameHostImpl::FromID(
source_site_instance->GetProcess()->GetID(), op... | false |
CWE-416 | 12ca6ad2e3a896256f086497a7c7406a547ee373 | static void perf_event_for_each_child(struct perf_event *event,
void (*func)(struct perf_event *))
{
struct perf_event *child;
WARN_ON_ONCE(event->ctx->parent_ctx);
mutex_lock(&event->child_mutex);
func(event);
list_for_each_entry(child, &event->child_list, child_list)
func(child);
mutex_unlock(&event->c... | false |
CWE-119 | 62154472bd2c43e1790dd1bd8a527c1db9118d88 | void WebBluetoothServiceImpl::RemoteDescriptorWriteValue(
const std::string& descriptor_instance_id,
const std::vector<uint8_t>& value,
RemoteDescriptorWriteValueCallback callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (value.size() > 512) {
CrashRendererAndClosePipe(bad_message::BDH_INVALID... | false |
CWE-20 | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | static int ipxitf_add_local_route(struct ipx_interface *intrfc)
{
return ipxrtr_add_route(intrfc->if_netnum, intrfc, NULL);
}
| false |
CWE-119 | acc192347665943ca674acf117e4f74a88436922 | FLAC__StreamDecoderLengthStatus FLACParser::length_callback(
const FLAC__StreamDecoder * /* decoder */,
FLAC__uint64 *stream_length, void *client_data)
{
return ((FLACParser *) client_data)->lengthCallback(stream_length);
}
| false |
CWE-264 | e21bdfb9c758ac411012ad84f83d26d3f7dd69fb | ExtensionInfoMap* ExtensionSystemImpl::info_map() {
return shared_->info_map();
}
| false |
CWE-20 | 5fd35e5359c6345b8709695cd71fba307318e6aa | RenderBox::~RenderBox()
{
}
| false |
CWE-416 | f03ea5a5c2ff26e239dfd23e263b15da2d9cee93 | RenderFrameImpl::UniqueNameFrameAdapter::CollectAncestorNames(
BeginPoint begin_point,
bool (*should_stop)(base::StringPiece)) const {
std::vector<base::StringPiece> result;
for (blink::WebFrame* frame = begin_point == BeginPoint::kParentFrame
? GetWebFrame()->Parent()
... | false |
CWE-119 | f5364c150aa645b3d7daa21b5c0b9feaa1c9cd6d | static inline int normal_prio(struct task_struct *p)
{
int prio;
if (task_has_dl_policy(p))
prio = MAX_DL_PRIO-1;
else if (task_has_rt_policy(p))
prio = MAX_RT_PRIO-1 - p->rt_priority;
else
prio = __normal_prio(p);
return prio;
}
| false |
CWE-189 | 971548cdca2d4c0a6fedd3db0c94372c2a27eac3 | void MediaStreamManager::Opened(MediaStreamType stream_type,
int capture_session_id) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
DVLOG(1) << "Opened({stream_type = " << stream_type << "} "
<< "{capture_session_id = " << capture_session_id << "})";
for (const LabeledDevice... | false |
CWE-119 | 13bf9fbff0e5e099e2b6f003a0ab8ae145436309 | nfssvc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
struct nfsd_readdirargs *args)
{
p = decode_fh(p, &args->fh);
if (!p)
return 0;
args->cookie = ntohl(*p++);
args->count = ntohl(*p++);
args->count = min_t(u32, args->count, PAGE_SIZE);
args->buffer = page_address(*(rqstp->rq_next_page++));
re... | false |
CWE-119 | f6ac1dba5e36f338a490752a2cbef3339096d9fe | bool WebGLRenderingContextBase::ValidateTexFuncDimensions(
const char* function_name,
TexImageFunctionType function_type,
GLenum target,
GLint level,
GLsizei width,
GLsizei height,
GLsizei depth) {
if (width < 0 || height < 0 || depth < 0) {
SynthesizeGLError(GL_INVALID_VALUE, function... | false |
CWE-399 | a8b0ca17b80e92faab46ee7179ba9e99ccb61233 | static void x86_pmu_enable_event(struct perf_event *event)
{
if (__this_cpu_read(cpu_hw_events.enabled))
__x86_pmu_enable_event(&event->hw,
ARCH_PERFMON_EVENTSEL_ENABLE);
}
| false |
CWE-362 | 30a61ddf8117c26ac5b295e1233eaa9629a94ca3 | int truncate_inode_blocks(struct inode *inode, pgoff_t from)
{
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
int err = 0, cont = 1;
int level, offset[4], noffset[4];
unsigned int nofs = 0;
struct f2fs_inode *ri;
struct dnode_of_data dn;
struct page *page;
trace_f2fs_truncate_inode_blocks_enter(inode, from);
l... | false |
CWE-399 | f85a87ec670ad0fce9d98d90c9a705b72a288154 | static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
V8TRYCATCH_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), js... | false |
CWE-20 | 282f53ffdc3b1902da86f6a0791af736837efbf8 | void PeopleHandler::OnDidClosePage(const base::ListValue* args) {
if (!args->GetList()[0].GetBool() && !IsProfileAuthNeededOrHasErrors()) {
MarkFirstSetupComplete();
}
CloseSyncSetup();
}
| false |
CWE-399 | 3b0d77670a0613f409110817455d2137576b485a | PP_Var GetDocumentURL(PP_Instance instance, PP_URLComponents_Dev* components) {
PluginInstance* plugin_instance = host_globals->GetInstance(instance);
if (!plugin_instance)
return PP_MakeUndefined();
return plugin_instance->GetDocumentURL(instance, components);
}
| false |
CWE-200 | eea3300239f0b53e172a320eb8de59d0bea65f27 | void DevToolsUIBindings::FileSystemAdded(
const DevToolsFileHelper::FileSystem& file_system) {
std::unique_ptr<base::DictionaryValue> file_system_value(
CreateFileSystemValue(file_system));
CallClientFunction("DevToolsAPI.fileSystemAdded",
file_system_value.get(), NULL, NULL);
}
| false |
CWE-362 | 5c17c861a357e9458001f021a7afa7aab9937439 | static struct pid *session_of_pgrp(struct pid *pgrp)
{
struct task_struct *p;
struct pid *sid = NULL;
p = pid_task(pgrp, PIDTYPE_PGID);
if (p == NULL)
p = pid_task(pgrp, PIDTYPE_PID);
if (p != NULL)
sid = task_session(p);
return sid;
}
| false |
CWE-119 | 5925dff83699508b5e2735afb0297dfb310e159d | void Browser::OpenPrivacyDashboardTabAndActivate() {
OpenURL(GURL(kPrivacyDashboardUrl), GURL(),
NEW_FOREGROUND_TAB, PageTransition::LINK);
window_->Activate();
}
| false |
CWE-200 | bceaa90240b6019ed73b49965eac7d167610be69 | static int rawv6_ioctl(struct sock *sk, int cmd, unsigned long arg)
{
switch (cmd) {
case SIOCOUTQ: {
int amount = sk_wmem_alloc_get(sk);
return put_user(amount, (int __user *)arg);
}
case SIOCINQ: {
struct sk_buff *skb;
int amount = 0;
spin_lock_bh(&sk->sk_receive_queue.lock);
skb = skb_peek(&sk->sk_... | false |
CWE-200 | fea16c8b60ff3d0756d5eb392394963b647bc41a | void ContentSecurityPolicy::addPolicyFromHeaderValue(
const String& header,
ContentSecurityPolicyHeaderType type,
ContentSecurityPolicyHeaderSource source) {
if (source == ContentSecurityPolicyHeaderSourceMeta &&
type == ContentSecurityPolicyHeaderTypeReport) {
reportReportOnlyInMeta(header);
... | false |
CWE-20 | dbcfe72cb16222c9f7e7907fcc5f35b27cc25331 | void NetworkActionPredictor::ClearTransitionalMatches() {
transitional_matches_.clear();
}
| false |
CWE-20 | 36fd3c9a6ba9fce9dd80c442c3ba5decd8e4c065 | void set_os_state(shell_integration::DefaultWebClientState value) {
os_state_ = value;
}
| false |
CWE-416 | 4a3482693491ac6bb3dd27d591efa3de1d1f1fcf | static void CreateLoaderAndStart(
RenderFrameHost* frame,
network::mojom::URLLoaderRequest request,
int route_id,
int request_id,
const network::ResourceRequest& resource_request,
network::mojom::URLLoaderClientPtrInfo client) {
network::mojom::URLLoaderFactoryPtr factory;
... | false |
CWE-119 | 33827275411b33371e7bb750cce20f11de85002d | void SelectionEditor::UpdateCachedVisibleSelectionIfNeeded() const {
DCHECK_GE(GetDocument().Lifecycle().GetState(),
DocumentLifecycle::kAfterPerformLayout);
AssertSelectionValid();
if (!NeedsUpdateVisibleSelection())
return;
style_version_for_dom_tree_ = GetDocument().StyleVersion();
cached_v... | false |
CWE-416 | a4150b688a754d3d10d2ca385155b1c95d77d6ae | error::Error GLES2DecoderPassthroughImpl::DoCopyTextureCHROMIUM(
GLuint source_id,
GLint source_level,
GLenum dest_target,
GLuint dest_id,
GLint dest_level,
GLint internalformat,
GLenum dest_type,
GLboolean unpack_flip_y,
GLboolean unpack_premultiply_alpha,
GLboolean unpack_unmul... | false |
CWE-264 | f7ae1f7a918f1973dca241a7a23169906eaf4fe3 | void BrowserEventRouter::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
NavigationController* source_controller =
content:... | false |
CWE-264 | bfdc0b497faa82a0ba2f9dddcf109231dd519fcc | int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
void __user *buffer,
size_t *lenp, loff_t *ppos)
{
return do_proc_doulongvec_minmax(table, write, buffer,
lenp, ppos, HZ, 1000l);
}
| false |
CWE-119 | 9fd9d629fcf836bb0d6210015d33a299cf6bca34 | Browser* InProcessBrowserTest::CreateBrowser(Profile* profile) {
Browser* browser = new Browser(
Browser::CreateParams(profile, chrome::GetActiveDesktop()));
AddBlankTabAndShow(browser);
return browser;
}
| false |
CWE-264 | f9ed2fe6d61259e779a37d4c2d7edb33a1c1f8ba | status_t OMX::enableGraphicBuffers(
node_id node, OMX_U32 port_index, OMX_BOOL enable) {
return findInstance(node)->enableGraphicBuffers(port_index, enable);
}
| false |
CWE-399 | e40607cbe270a9e8360907cb1e62ddf0736e4864 | struct sctp_chunk *sctp_make_cwr(const struct sctp_association *asoc,
const __u32 lowest_tsn,
const struct sctp_chunk *chunk)
{
struct sctp_chunk *retval;
sctp_cwrhdr_t cwr;
cwr.lowest_tsn = htonl(lowest_tsn);
retval = sctp_make_control(asoc, SCTP_CID_ECN_CWR, 0,
sizeof(sctp_cwrhdr_t));
if (... | false |
CWE-119 | c995d4fe5e96f4d6d4a88b7867279b08e72d2579 | void ChromeContentBrowserClient::GetQuotaSettings(
content::BrowserContext* context,
content::StoragePartition* partition,
storage::OptionalQuotaSettingsCallback callback) {
if (g_default_quota_settings) {
std::move(callback).Run(*g_default_quota_settings);
return;
}
storage::GetNominalDynamic... | false |
CWE-399 | 6160968cee8b90a5dd95318d716e31d7775c4ef3 | gid_t from_kgid_munged(struct user_namespace *targ, kgid_t kgid)
{
gid_t gid;
gid = from_kgid(targ, kgid);
if (gid == (gid_t) -1)
gid = overflowgid;
return gid;
}
| false |
CWE-189 | f8bd2258e2d520dff28c855658bd24bdafb5102d | unsigned long msecs_to_jiffies(const unsigned int m)
{
/*
* Negative value, means infinite timeout:
*/
if ((int)m < 0)
return MAX_JIFFY_OFFSET;
#if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ)
/*
* HZ is equal to or smaller than 1000, and 1000 is a nice
* round multiple of HZ, divide with the factor between... | false |
CWE-200 | 04aaacb936a08d70862d6d9d7e8354721ae46be8 | void AddHost(AppCacheHost* host) {
hosts_to_notify_.insert(host->frontend());
}
| false |
CWE-416 | c3957448cfc6e299165196a33cd954b790875fdb | void Document::DidMergeTextNodes(const Text& merged_node,
const Text& node_to_be_removed,
unsigned old_length) {
NodeWithIndex node_to_be_removed_with_index(
const_cast<Text&>(node_to_be_removed));
if (!ranges_.IsEmpty()) {
for (Range* rang... | false |
CWE-416 | 45f6fad84cc305103b28d73482b344d7f5b76f39 | static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
{
if (skb->protocol == htons(ETH_P_IP))
return tcp_v4_conn_request(sk, skb);
if (!ipv6_unicast_destination(skb))
goto drop;
return tcp_conn_request(&tcp6_request_sock_ops,
&tcp_request_sock_ipv6_ops, sk, skb);
drop:
NET_INC_STATS_BH(soc... | false |
CWE-20 | 8262245d384be025f13e2a5b3a03b7e5c98374ce | void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, bool success) {
content::GetContentClient()->browser()->GetMHTMLGenerationManager()->
MHTMLGenerated(job_id, success);
}
| false |
CWE-264 | 0c3b93c8c2027e74af642967eee5c142c8fd185d | bool MediaPlayerService::Client::shouldDropMetadata(media::Metadata::Type code) const
{
Mutex::Autolock lock(mLock);
if (findMetadata(mMetadataDrop, code)) {
return true;
}
if (mMetadataAllow.isEmpty() || findMetadata(mMetadataAllow, code)) {
return false;
} else {
return true;
}
}
| false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.