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 bool TokenExitsMath(const CompactHTMLToken& token) {
const String& tag_name = token.Data();
return ThreadSafeMatch(tag_name, MathMLNames::miTag) ||
ThreadSafeMatch(tag_name, MathMLNames::moTag) ||
ThreadSafeMatch(tag_name, MathMLNames::mnTag) ||
ThreadSafeMatch(tag_name, Mat... | 0 | 17,560 |
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: SYSCALL_DEFINE4(send, int, fd, void __user *, buff, size_t, len,
unsigned int, flags)
{
return sys_sendto(fd, buff, len, flags, NULL, 0);
}
Commit Message: Fix order of arguments to compat_put_time[spec|val]
Commit 644595f89620 ("compat: Handle COMPAT_USE_64BIT_TIME in
net/socket.c") introduced a bug where t... | 0 | 27,789 |
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: RenderViewImpl* RenderViewImpl::FromRoutingID(int32_t routing_id) {
RoutingIDViewMap* views = g_routing_id_view_map.Pointer();
RoutingIDViewMap::iterator it = views->find(routing_id);
return it == views->end() ? NULL : it->second;
}
Commit Message: Prevent renderer initiated back navigation to cancel a bro... | 0 | 9,083 |
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 setkey_unaligned(struct crypto_tfm *tfm, const u8 *key,
unsigned int keylen)
{
struct blkcipher_alg *cipher = &tfm->__crt_alg->cra_blkcipher;
unsigned long alignmask = crypto_tfm_alg_alignmask(tfm);
int ret;
u8 *buffer, *alignbuffer;
unsigned long absize;
absize = keylen + alignmask;
buf... | 0 | 23,482 |
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 readCryptoKey(v8::Handle<v8::Value>* value)
{
uint32_t rawKeyType;
if (!doReadUint32(&rawKeyType))
return false;
blink::WebCryptoKeyAlgorithm algorithm;
blink::WebCryptoKeyType type = blink::WebCryptoKeyTypeSecret;
switch (static_cast<CryptoKeySub... | 0 | 29,127 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int __kvm_io_bus_write(struct kvm_vcpu *vcpu, struct kvm_io_bus *bus,
struct kvm_io_range *range, const void *val)
{
int idx;
idx = kvm_io_bus_get_first_dev(bus, range->addr, range->len);
if (idx < 0)
return -EOPNOTSUPP;
while (idx < bus->dev_count &&
kvm_io_bus_cmp(range, &bus->range[id... | 0 | 20,062 |
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 GLES2DecoderImpl::BoundFramebufferHasStencilAttachment() {
Framebuffer* framebuffer =
GetFramebufferInfoForTarget(GL_DRAW_FRAMEBUFFER_EXT);
if (framebuffer) {
return framebuffer->HasStencilAttachment();
}
if (offscreen_target_frame_buffer_.get()) {
return offscreen_target_stencil_format... | 0 | 13,386 |
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: FolderHeaderView::FolderHeaderView(FolderHeaderViewDelegate* delegate)
: folder_item_(NULL),
back_button_(new views::ImageButton(this)),
folder_name_view_(new FolderNameView),
folder_name_placeholder_text_(
ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
I... | 0 | 29,365 |
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: ScriptResource::ScriptResource(
const ResourceRequest& resource_request,
const ResourceLoaderOptions& options,
const TextResourceDecoderOptions& decoder_options)
: TextResource(resource_request, kScript, options, decoder_options) {}
Commit Message: Check CORS using PassesAccessControlCheck() with... | 0 | 6,123 |
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 GetBlockForJpeg(void* param,
unsigned long pos,
unsigned char* buf,
unsigned long size) {
std::vector<uint8_t>* data_vector = static_cast<std::vector<uint8_t>*>(param);
if (pos + size < pos || pos + size > data_vector->size())
return 0;
mem... | 0 | 26,977 |
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: GBool LZWStream::processNextCode() {
int code;
int nextLength;
int i, j;
if (eof) {
return gFalse;
}
start:
code = getCode();
if (code == EOF || code == 257) {
eof = gTrue;
return gFalse;
}
if (code == 256) {
clearTable();
goto start;
}
if (nextCode >= 4097) {
erro... | 0 | 26,003 |
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: std::string ProfileSyncService::QuerySyncStatusSummary() {
if (unrecoverable_error_detected_) {
return "Unrecoverable error detected";
} else if (!backend_.get()) {
return "Syncing not enabled";
} else if (backend_.get() && !HasSyncSetupCompleted()) {
return "First time sync setup incomplete";
... | 0 | 6,636 |
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 TabCloseableStateWatcher::OnBrowserAdded(const Browser* browser) {
waiting_for_browser_ = false;
if (browser->type() != Browser::TYPE_NORMAL)
return;
tabstrip_watchers_.push_back(new TabStripWatcher(this, browser));
}
Commit Message: chromeos: fix bug where "aw snap" page replaces first tab if ... | 0 | 11,086 |
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 __x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa, u32 size)
{
int i, r;
unsigned long hva;
struct kvm_memslots *slots = kvm_memslots(kvm);
struct kvm_memory_slot *slot, old;
/* Called with kvm->slots_lock held. */
if (WARN_ON(id >= KVM_MEM_SLOTS_NUM))
return -EINVAL;
slot = id_to_memslot... | 0 | 3,429 |
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::SetHashState(
std::unique_ptr<crypto::SecureHash> hash_state) {
hash_state_ = std::move(hash_state);
if (!hash_state_) {
destination_info_.hash.clear();
return;
}
std::unique_ptr<crypto::SecureHash> clone_of_hash_state(hash_state_->Clone());
std::vector<char> hash_val... | 0 | 2,038 |
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 omx_vdec::free_input_buffer_header()
{
input_use_buffer = false;
if (arbitrary_bytes) {
if (m_inp_heap_ptr) {
DEBUG_PRINT_LOW("Free input Heap Pointer");
free (m_inp_heap_ptr);
m_inp_heap_ptr = NULL;
}
if (m_phdr_pmem_ptr) {
DEBUG_PRINT_LOW("Free input... | 0 | 21,066 |
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 Core::PassNodeControllerToIOThread(
std::unique_ptr<NodeController> node_controller) {
node_controller.release()->DestroyOnIOThreadShutdown();
}
Commit Message: Correct mojo::WrapSharedMemoryHandle usage
Fixes some incorrect uses of mojo::WrapSharedMemoryHandle which
were assuming that the call actua... | 0 | 2,582 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PHPAPI PHP_FUNCTION(feof)
{
zval *arg1;
php_stream *stream;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) {
RETURN_FALSE;
}
PHP_STREAM_TO_ZVAL(stream, &arg1);
if (php_stream_eof(stream)) {
RETURN_TRUE;
} else {
RETURN_FALSE;
}
}
Commit Message: Fix bug #72114 - int... | 0 | 21,602 |
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: parserep(netdissect_options *ndo,
register const struct sunrpc_msg *rp, register u_int length)
{
register const uint32_t *dp;
u_int len;
enum sunrpc_accept_stat astat;
/*
* Portability note:
* Here we find the address of the ar_verf credentials.
* Originally, this calculation was
* dp = (uin... | 0 | 26,434 |
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 bool forced_push(const struct tcp_sock *tp)
{
return after(tp->write_seq, tp->pushed_seq + (tp->max_window >> 1));
}
Commit Message: tcp: initialize rcv_mss to TCP_MIN_MSS instead of 0
When tcp_disconnect() is called, inet_csk_delack_init() sets
icsk->icsk_ack.rcv_mss to 0.
This could potentially... | 0 | 5,435 |
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: AP_DECLARE(int) ap_is_initial_req(request_rec *r)
{
return (r->main == NULL) /* otherwise, this is a sub-request */
&& (r->prev == NULL); /* otherwise, this is an internal redirect */
}
Commit Message: SECURITY: CVE-2015-3183 (cve.mitre.org)
Replacement of ap_some_auth_required (unusable ... | 0 | 2,589 |
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: cifs_get_tcon(struct cifsSesInfo *ses, struct smb_vol *volume_info)
{
int rc, xid;
struct cifsTconInfo *tcon;
tcon = cifs_find_tcon(ses, volume_info->UNC);
if (tcon) {
cFYI(1, "Found match on UNC path");
/* existing tcon already has a reference */
cifs_put_smb_ses(ses);
if (tcon->seal != volume_info-... | 0 | 16,427 |
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 dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie)
{
struct rtable *rt = (struct rtable *) dst;
/* All IPV4 dsts are created with ->obsolete set to the value
* DST_OBSOLETE_FORCE_CHK which forces validation calls down
* into this function always.
*
* When a PMTU/redirect informa... | 0 | 15,681 |
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: Eina_Iterator* ewk_frame_children_iterator_new(Evas_Object* ewkFrame)
{
EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData, 0);
Eina_Iterator_Ewk_Frame* iterator = static_cast<Eina_Iterator_Ewk_Frame*>
(calloc(1, sizeof(Eina_Iterator_Ewk_Frame)));
if (!iterator)
r... | 0 | 727 |
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 pte_t *lookup_pte(struct mm_struct *mm, unsigned long address)
{
pgd_t *dir;
pud_t *pud;
pmd_t *pmd;
pte_t *pte;
pte_t entry;
dir = pgd_offset(mm, address);
if (pgd_none(*dir))
return NULL;
pud = pud_offset(dir, address);
if (pud_none(*pud))
return NULL;
pmd = pmd_offset(pud, address);
if... | 0 | 22,326 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void btm_sec_link_key_request (UINT8 *p_bda)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_or_alloc_dev (p_bda);
BTM_TRACE_EVENT ("btm_sec_link_key_request() BDA: %02x:%02x:%02x:%02x:%02x:%02x",
p_bda[0], p_bda[1], p_bda[2], p_bda[3], p_bda[4], p_bda[5]);
if( (btm_cb.pairing_state == ... | 0 | 19,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: int btrfs_prealloc_file_range(struct inode *inode, int mode,
u64 start, u64 num_bytes, u64 min_size,
loff_t actual_len, u64 *alloc_hint)
{
return __btrfs_prealloc_file_range(inode, mode, start, num_bytes,
min_size, actual_len, alloc_hint,
NULL);
}
Commit Message: Btrfs: fix has... | 0 | 25,556 |
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: ~AutoInstallCurrentThreadPlatformMock()
{
Platform::initialize(m_oldPlatform);
}
Commit Message: Add assertions that the empty Platform::cryptographicallyRandomValues() overrides are not being used.
These implementations are not safe and look scary if not accompanied by an assertion. Also on... | 0 | 19,309 |
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: SCTP_STATIC struct sock *sctp_accept(struct sock *sk, int flags, int *err)
{
struct sctp_sock *sp;
struct sctp_endpoint *ep;
struct sock *newsk = NULL;
struct sctp_association *asoc;
long timeo;
int error = 0;
sctp_lock_sock(sk);
sp = sctp_sk(sk);
ep = sp->ep;
if (!sctp_style(sk, TCP)) {
error = -E... | 0 | 17,822 |
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 WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) {
content::GetContentClient()->SetActiveURL(page_url_);
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(WebPluginDelegateProxy, msg)
IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindow, OnSetWindow)
#if defined(OS_WIN)
IPC_MESSAGE_HANDLER(P... | 0 | 4,687 |
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: pkinit_init_dh_params(pkinit_plg_crypto_context plgctx)
{
krb5_error_code retval = ENOMEM;
plgctx->dh_1024 = DH_new();
if (plgctx->dh_1024 == NULL)
goto cleanup;
plgctx->dh_1024->p = BN_bin2bn(pkinit_1024_dhprime,
sizeof(pkinit_1024_dhprime), NULL);
... | 0 | 13,042 |
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 Browser::UpdateSearchState(TabContents* contents) {
if (chrome::search::IsInstantExtendedAPIEnabled(profile_))
search_delegate_->OnTabActivated(contents->web_contents());
}
Commit Message: Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Review URL: ht... | 0 | 17,601 |
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 u16 llcp_tlv_lto(u8 *tlv)
{
return llcp_tlv8(tlv, LLCP_TLV_LTO);
}
Commit Message: net: nfc: Fix NULL dereference on nfc_llcp_build_tlv fails
KASAN report this:
BUG: KASAN: null-ptr-deref in nfc_llcp_build_gb+0x37f/0x540 [nfc]
Read of size 3 at addr 0000000000000000 by task syz-executor.0/5401
CPU: 0 ... | 0 | 21,398 |
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 RenderFlexibleBox::isHorizontalFlow() const
{
if (isHorizontalWritingMode())
return !isColumnFlow();
return isColumnFlow();
}
Commit Message: Separate repaint and layout requirements of StyleDifference (Step 1)
Previously StyleDifference was an enum that proximately bigger values
imply smal... | 0 | 9,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: void GDataFileSystem::TransferFileFromLocalToRemoteAfterGetEntryInfo(
const FilePath& local_src_file_path,
const FilePath& remote_dest_file_path,
const FileOperationCallback& callback,
GDataFileError error,
scoped_ptr<GDataEntryProto> entry_proto) {
DCHECK(BrowserThread::CurrentlyOn(BrowserT... | 0 | 5,218 |
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 iwbmp_read_bits(struct iwbmprcontext *rctx)
{
int retval = 0;
rctx->img->width = rctx->width;
rctx->img->height = rctx->height;
if(rctx->fileheader_size>0) {
size_t expected_offbits;
expected_offbits = rctx->fileheader_size + rctx->infoheader_size +
rctx->bitfields_nbytes + rctx->palette_... | 0 | 20,930 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int kvm_read_guest(struct kvm *kvm, gpa_t gpa, void *data, unsigned long len)
{
gfn_t gfn = gpa >> PAGE_SHIFT;
int seg;
int offset = offset_in_page(gpa);
int ret;
while ((seg = next_segment(len, offset)) != 0) {
ret = kvm_read_guest_page(kvm, gfn, data, offset, seg);
if (ret < 0)
return ret;
offset... | 0 | 3,083 |
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 addColorBits(unsigned char* out, size_t index, unsigned bits, unsigned in)
{
unsigned m = bits == 1 ? 7 : bits == 2 ? 3 : 1; /*8 / bits - 1*/
/*p = the partial index in the byte, e.g. with 4 palettebits it is 0 for first half or 1 for second half*/
unsigned p = index & m;
in &= (1u << bits) - ... | 0 | 16,713 |
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 enum task_disposition sas_scsi_find_task(struct sas_task *task)
{
unsigned long flags;
int i, res;
struct sas_internal *si =
to_sas_internal(task->dev->port->ha->core.shost->transportt);
for (i = 0; i < 5; i++) {
SAS_DPRINTK("%s: aborting task 0x%p\n", __func__, task);
res = si->dft->lldd_abort_... | 0 | 20,317 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int cryptd_blkcipher_setkey(struct crypto_ablkcipher *parent,
const u8 *key, unsigned int keylen)
{
struct cryptd_blkcipher_ctx *ctx = crypto_ablkcipher_ctx(parent);
struct crypto_blkcipher *child = ctx->child;
int err;
crypto_blkcipher_clear_flags(child, CRYPTO_TFM_REQ_MASK);
crypto_blkcipher... | 0 | 1,587 |
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: armv6pmu_read_counter(int counter)
{
unsigned long value = 0;
if (ARMV6_CYCLE_COUNTER == counter)
asm volatile("mrc p15, 0, %0, c15, c12, 1" : "=r"(value));
else if (ARMV6_COUNTER0 == counter)
asm volatile("mrc p15, 0, %0, c15, c12, 2" : "=r"(value));
else if (ARMV6_COUNTER1 == counter)
asm volatil... | 0 | 2,915 |
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 RenderProcessHostImpl::OnMediaStreamRemoved() {
DCHECK_GT(media_stream_count_, 0);
--media_stream_count_;
UpdateProcessPriority();
}
Commit Message: Correct mojo::WrapSharedMemoryHandle usage
Fixes some incorrect uses of mojo::WrapSharedMemoryHandle which
were assuming that the call actually has any ... | 0 | 4,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: void build_ehash_secret(void)
{
u32 rnd;
do {
get_random_bytes(&rnd, sizeof(rnd));
} while (rnd == 0);
cmpxchg(&inet_ehash_secret, 0, rnd);
}
Commit Message: inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_c... | 0 | 28,695 |
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 WebContentsImpl::WasUnOccluded() {
if (capturer_count_ == 0)
DoWasUnOccluded();
should_normally_be_occluded_ = false;
}
Commit Message: If a page shows a popup, end fullscreen.
This was implemented in Blink r159834, but it is susceptible
to a popup/fullscreen race. This CL reverts that implementat... | 0 | 13,434 |
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 BassSetStrength(EffectContext *pContext, uint32_t strength){
pContext->pBundledContext->BassStrengthSaved = (int)strength;
LVM_ControlParams_t ActiveParams; /* Current control Parameters */
LVM_ReturnStatus_en LvmStatus=LVM_SUCCESS; /* Function call status */
/* Get the current settings */
... | 0 | 8,423 |
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 const char *register_authz_provider(cmd_parms *cmd, void *_cfg,
const char *name, const char *file,
const char *function)
{
lua_authz_provider_spec *spec;
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
... | 0 | 6,852 |
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::ProcessBaseElement() {
UseCounter::Count(*this, WebFeature::kBaseElement);
const AtomicString* href = nullptr;
const AtomicString* target = nullptr;
for (HTMLBaseElement* base = Traversal<HTMLBaseElement>::FirstWithin(*this);
base && (!href || !target);
base = Traversal<HTMLB... | 0 | 24,704 |
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 AudioFlinger::EffectModule::remove_effect_from_hal_l()
{
if ((mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_PRE_PROC ||
(mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_POST_PROC) {
sp<ThreadBase> thread = mThread.promote();
if (thread != 0) {
audio_stream_t *s... | 0 | 10,704 |
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 GF_AVCConfig *AVC_DuplicateConfig(GF_AVCConfig *cfg)
{
u32 i, count;
GF_AVCConfigSlot *p1, *p2;
GF_AVCConfig *cfg_new = gf_odf_avc_cfg_new();
cfg_new->AVCLevelIndication = cfg->AVCLevelIndication;
cfg_new->AVCProfileIndication = cfg->AVCProfileIndication;
cfg_new->configurationVersion = cfg->configur... | 0 | 17,824 |
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: cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
{
char line[32768], /* Line from client... */
locale[64], /* Locale */
*ptr; /* Pointer into strings */
http_status_t status; /* Transfer status */
ipp_state_t ipp_state; /* State of IPP transfer */
int bytes; /* Number of b... | 0 | 21,158 |
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: poppler_link_mapping_copy (PopplerLinkMapping *mapping)
{
PopplerLinkMapping *new_mapping;
new_mapping = poppler_link_mapping_new ();
*new_mapping = *mapping;
if (new_mapping->action)
new_mapping->action = poppler_action_copy (new_mapping->action);
return new_mapping;
}
Commit Message:
CWE ID:... | 0 | 7,025 |
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::scheduleUseShadowTreeUpdate(SVGUseElement& element)
{
m_useElementsNeedingUpdate.add(&element);
scheduleLayoutTreeUpdateIfNeeded();
}
Commit Message: Change Document::detach() to RELEASE_ASSERT all subframes are gone.
BUG=556724,577105
Review URL: https://codereview.chromium.org/16675730... | 0 | 1,640 |
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 MagickBooleanType UnregisterModule(const ModuleInfo *module_info,
ExceptionInfo *exception)
{
/*
Locate and execute UnregisterFORMATImage module.
*/
assert(module_info != (const ModuleInfo *) NULL);
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",module_info->tag);
assert(exception ... | 0 | 4,652 |
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 ExtensionService::ExtensionBindingsAllowed(const GURL& url) {
if (GetExtensionByURL(url))
return true;
const Extension* extension = GetExtensionByWebExtent(url);
return (extension && extension->location() == Extension::COMPONENT);
}
Commit Message: Unrevert: Show the install dialog for the initia... | 0 | 2,937 |
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 ip_tunnel **__ipgre_bucket(struct ipgre_net *ign,
struct ip_tunnel_parm *parms)
{
__be32 remote = parms->iph.daddr;
__be32 local = parms->iph.saddr;
__be32 key = parms->i_key;
unsigned h = HASH(key);
int prio = 0;
if (local)
prio |= 1;
if (remote && !ipv4_is_multicast(remote)) {
prio |... | 0 | 1,445 |
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 OpenVideoDeviceAndWaitForFailure(int page_request_id,
const std::string& device_id) {
EXPECT_CALL(*host_, OnDeviceOpenSuccess()).Times(0);
base::RunLoop run_loop;
host_->OnOpenDevice(page_request_id, device_id, MEDIA_DEVICE_VIDEO_CAPTURE,
... | 0 | 19,737 |
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: ExtensionSystemImpl::~ExtensionSystemImpl() {
if (rules_registry_service_.get())
rules_registry_service_->Shutdown();
}
Commit Message: Check prefs before allowing extension file access in the permissions API.
R=mpcomplete@chromium.org
BUG=169632
Review URL: https://chromiumcodereview.appspot.com/11884... | 0 | 15,922 |
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 ipxcfg_set_auto_select(char val)
{
ipxcfg_auto_select_primary = val;
if (val && !ipx_primary_net)
ipx_primary_net = ipx_interfaces_head();
}
Commit Message: net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set ms... | 0 | 23,791 |
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 StreamingProcessor::togglePauseStream(bool pause) {
ATRACE_CALL();
status_t res;
sp<CameraDeviceBase> device = mDevice.promote();
if (device == 0) {
ALOGE("%s: Camera %d: Device does not exist", __FUNCTION__, mId);
return INVALID_OPERATION;
}
ALOGV("%s: Camera %d: toggling pause... | 0 | 11,358 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: auth_etc_enlightenment_sysactions(char *a,
char *u,
char **g)
{
FILE *f;
char file[4096], buf[4096], id[4096], ugname[4096], perm[4096], act[4096];
char *p, *pp, *s, **gp;
int ok = 0;
size_t len, line = 0;
int allow = 0;
int ... | 0 | 21,056 |
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 ib_uverbs_free_hw_resources(struct ib_uverbs_device *uverbs_dev,
struct ib_device *ib_dev)
{
struct ib_uverbs_file *file;
struct ib_uverbs_event_file *event_file;
struct ib_event event;
/* Pending running commands to terminate */
synchronize_srcu(&uverbs_dev->disassociate_srcu);
event.even... | 0 | 20,046 |
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: pch_end (void)
{
return p_end;
}
Commit Message:
CWE ID: CWE-78 | 0 | 15,879 |
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 pcnet_set_link_status(NetClientState *nc)
{
PCNetState *d = qemu_get_nic_opaque(nc);
d->lnkst = nc->link_down ? 0 : 0x40;
}
Commit Message:
CWE ID: CWE-119 | 0 | 3,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: static inline unsigned long group_faults(struct task_struct *p, int nid)
{
if (!p->numa_group)
return 0;
return p->numa_group->faults[task_faults_idx(NUMA_MEM, nid, 0)] +
p->numa_group->faults[task_faults_idx(NUMA_MEM, nid, 1)];
}
Commit Message: sched/fair: Fix infinite loop in update_blocked_averages() ... | 0 | 11,161 |
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: help(void)
{
(void)fputs(
"Usage: file [OPTION...] [FILE...]\n"
"Determine type of FILEs.\n"
"\n", stdout);
#define OPT(shortname, longname, opt, doc) \
fprintf(stdout, " -%c, --" longname, shortname), \
docprint(doc);
#define OPT_LONGONLY(longname, opt, doc) \
fprintf(stdout, " --" longname... | 0 | 28,174 |
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 console_unblank(void)
{
struct console *c;
/*
* console_unblank can no longer be called in interrupt context unless
* oops_in_progress is set to 1..
*/
if (oops_in_progress) {
if (down_trylock(&console_sem) != 0)
return;
} else
console_lock();
console_locked = 1;
console_may_schedule = 0... | 0 | 1,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: MagickExport Image *ShaveImage(const Image *image,
const RectangleInfo *shave_info,ExceptionInfo *exception)
{
Image
*shave_image;
RectangleInfo
geometry;
assert(image != (const Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMa... | 0 | 22,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: static void nfs_set_open_stateid_locked(struct nfs4_state *state, nfs4_stateid *stateid, fmode_t fmode)
{
if (test_bit(NFS_DELEGATED_STATE, &state->flags) == 0)
nfs4_stateid_copy(&state->stateid, stateid);
nfs4_stateid_copy(&state->open_stateid, stateid);
switch (fmode) {
case FMODE_READ:
set_bit(NFS_O_... | 0 | 14,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: error::Error GLES2DecoderImpl::HandleGetActiveUniformBlockiv(
uint32_t immediate_data_size,
const volatile void* cmd_data) {
if (!feature_info_->IsWebGL2OrES3Context())
return error::kUnknownCommand;
const volatile gles2::cmds::GetActiveUniformBlockiv& c =
*static_cast<const volatile gles2::... | 0 | 24,739 |
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: enum AVPixelFormat ff_thread_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
{
return ff_get_format(avctx, fmt);
}
Commit Message: avcodec/utils: correct align value for interplay
Fixes out of array access
Fixes: 452/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_INTERPLAY_VIDEO_fuzzer
Found-by: continuo... | 0 | 29,152 |
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: EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOrange(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwVMTypeError(exec);
JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS... | 0 | 8,889 |
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 GLES2DecoderImpl::NeedsCopyTextureImageWorkaround(
GLenum internal_format,
int32_t channels_exist,
GLuint* source_texture_service_id,
GLenum* source_texture_target) {
if (!workarounds().use_intermediary_for_copy_texture_image)
return false;
if (internal_format == GL_RGB || internal_f... | 0 | 9,238 |
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_SetCommentHandler(XML_Parser parser,
XML_CommentHandler handler)
{
if (parser != NULL)
parser->m_commentHandler = handler;
}
Commit Message: xmlparse.c: Fix extraction of namespace prefix from XML name (#186)
CWE ID: CWE-611 | 0 | 18,389 |
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: MPEG4Source::~MPEG4Source() {
if (mStarted) {
stop();
}
free(mCurrentSampleInfoSizes);
free(mCurrentSampleInfoOffsets);
}
Commit Message: MPEG4Extractor.cpp: handle chunk_size > SIZE_MAX
chunk_size is a uint64_t, so it can legitimately be bigger
than SIZE_MAX, which would cause the subtraction... | 0 | 15,955 |
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 JSValueRef leapForwardCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
notImplemented();
return JSValueMakeUndefined(context);
}
Commit Message: [BlackBerry] Adapt to new BlackBerry::Platform::... | 0 | 17,892 |
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 tg3_stop_block(struct tg3 *tp, unsigned long ofs, u32 enable_bit, int silent)
{
unsigned int i;
u32 val;
if (tg3_flag(tp, 5705_PLUS)) {
switch (ofs) {
case RCVLSC_MODE:
case DMAC_MODE:
case MBFREE_MODE:
case BUFMGR_MODE:
case MEMARB_MODE:
/* We can't enable/disable these bits of the
... | 0 | 20,673 |
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: pimv2_print(netdissect_options *ndo,
register const u_char *bp, register u_int len, const u_char *bp2)
{
register const u_char *ep;
register const struct pim *pim = (const struct pim *)bp;
int advance;
enum checksum_status cksum_status;
ep = (const u_char *)ndo->ndo_snapend;
if (bp >= ep)
ret... | 1 | 5,034 |
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: xsltAddStackElemList(xsltTransformContextPtr ctxt, xsltStackElemPtr elems)
{
return(xsltAddStackElem(ctxt, elems));
}
Commit Message: Roll libxslt to 891681e3e948f31732229f53cb6db7215f740fc7
BUG=583156,583171
Review URL: https://codereview.chromium.org/1853083002
Cr-Commit-Position: refs/heads/master@{#38... | 0 | 8,230 |
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 PageInfo::OnChangePasswordButtonPressed(
content::WebContents* web_contents) {
#if defined(FULL_SAFE_BROWSING)
DCHECK(password_protection_service_);
DCHECK(safe_browsing_status_ == SAFE_BROWSING_STATUS_SIGN_IN_PASSWORD_REUSE ||
safe_browsing_status_ ==
SAFE_BROWSING_STATUS_EN... | 1 | 2,650 |
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 RenderProcessHostImpl::FastShutdownIfPossible() {
if (run_renderer_in_process())
return false; // Single process mode never shuts down the renderer.
if (!child_process_launcher_.get() || child_process_launcher_->IsStarting() ||
!GetHandle())
return false; // Render process hasn't started... | 0 | 12,678 |
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 RenderWidgetHostImpl::RequestToLockMouse(bool user_gesture,
bool last_unlocked_by_target) {
GotResponseToLockMouseRequest(false);
}
Commit Message: Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantages:
- allow tearing d... | 0 | 6,663 |
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: FileTransfer::DeterminePluginMethods( CondorError &e, const char* path )
{
FILE* fp;
const char *args[] = { path, "-classad", NULL};
char buf[1024];
fp = my_popenv( args, "r", FALSE );
if( ! fp ) {
dprintf( D_ALWAYS, "FILETRANSFER: Failed to execute %s, ignoring\n", path );
e.pushf... | 0 | 22,791 |
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 PrintViewManager::OnMessageReceived(
const IPC::Message& message,
content::RenderFrameHost* render_frame_host) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(PrintViewManager, message, render_frame_host)
IPC_MESSAGE_HANDLER(PrintHostMsg_DidShowPrintDialog, OnDidShowPrintDialog)
I... | 0 | 20,777 |
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 RunTransactionTestWithResponseInfo(net::HttpCache* cache,
const MockTransaction& trans_info,
net::HttpResponseInfo* response) {
RunTransactionTestWithRequest(
cache, trans_info, MockHttpRequest(trans_info), response);
}
... | 0 | 11,054 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void sctp_do_ecn_cwr_work(struct sctp_association *asoc,
__u32 lowest_tsn)
{
/* Turn off ECNE getting auto-prepended to every outgoing
* packet
*/
asoc->need_ecne = 0;
}
Commit Message: sctp: Prevent soft lockup when sctp_accept() is called during a timeout event
A case can occur when sctp_acc... | 0 | 6,595 |
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 CameraClient::setPreviewCallbackTarget(
const sp<IGraphicBufferProducer>& callbackProducer) {
(void)callbackProducer;
ALOGE("%s: Unimplemented!", __FUNCTION__);
return INVALID_OPERATION;
}
Commit Message: Camera: Disallow dumping clients directly
Camera service dumps should only be initiated thr... | 0 | 11,570 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: inf_gtk_certificate_manager_response_cb(GtkDialog* dialog,
int response_id,
gpointer user_data)
{
InfGtkCertificateManagerQuery* query;
InfGtkCertificateManagerPrivate* priv;
InfXmppConnection* connection;
gchar* hostname;
... | 0 | 10,167 |
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 CommandBufferProxyImpl::DiscardBackbuffer() {
if (last_state_.error != gpu::error::kNoError)
return false;
return Send(new GpuCommandBufferMsg_DiscardBackbuffer(route_id_));
}
Commit Message: Convert plugin and GPU process to brokered handle duplication.
BUG=119250
Review URL: https://chromiumcode... | 0 | 9,019 |
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 AutoFillManager::GUIDToID(const std::string& guid) {
static int last_id = 1;
if (!guid::IsValidGUID(guid))
return 0;
std::map<std::string, int>::const_iterator iter = guid_id_map_.find(guid);
if (iter == guid_id_map_.end()) {
guid_id_map_[guid] = last_id;
id_guid_map_[last_id] = guid;
... | 0 | 12,520 |
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: struct dst_entry *inet_csk_route_child_sock(const struct sock *sk,
struct sock *newsk,
const struct request_sock *req)
{
const struct inet_request_sock *ireq = inet_rsk(req);
struct net *net = read_pnet(&ireq->ireq_net);
struct inet_sock *newinet = inet_sk(newsk);
struct ip_options_rcu *opt;... | 0 | 8,941 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl)
{
struct gfs2_inode *ip = GFS2_I(file->f_mapping->host);
struct gfs2_sbd *sdp = GFS2_SB(file->f_mapping->host);
struct lm_lockstruct *ls = &sdp->sd_lockstruct;
if (!(fl->fl_flags & FL_POSIX))
return -ENOLCK;
if (__mandatory_lock(&ip->i... | 0 | 23,601 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void LayerTreeHost::DidCompletePageScaleAnimation() {
did_complete_scale_animation_ = true;
}
Commit Message: (Reland) Discard compositor frames from unloaded web content
This is a reland of https://codereview.chromium.org/2707243005/ with a
small change to fix an uninitialized memory error that fails on MSAN... | 0 | 12,968 |
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 Browser::ConvertContentsToApplication(TabContents* contents) {
const GURL& url = contents->controller().GetActiveEntry()->url();
std::string app_name = web_app::GenerateApplicationNameFromURL(url);
DetachContents(contents);
Browser* app_browser = Browser::CreateForApp(
TYPE_POPUP, app_name, gf... | 0 | 3,251 |
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: selftest_fips_192 (int extended, selftest_report_func_t report)
{
const char *what;
const char *errtxt;
(void)extended; /* No extended tests available. */
what = "low-level";
errtxt = selftest_basic_192 ();
if (errtxt)
goto failed;
return 0; /* Succeeded. */
failed:
if (report)
repo... | 0 | 22,888 |
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 compute_samples(int mask, short *output, int num_c, float **data, int d_offset, int len)
{
#define BUFFER_SIZE 32
float buffer[BUFFER_SIZE];
int i,j,o,n = BUFFER_SIZE;
check_endianness();
for (o = 0; o < len; o += BUFFER_SIZE) {
memset(buffer, 0, sizeof(buffer));
if (o + n ... | 0 | 3,703 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void FrameView::scheduleOrPerformPostLayoutTasks()
{
if (m_postLayoutTasksTimer.isActive())
return;
if (!m_inSynchronousPostLayout) {
m_inSynchronousPostLayout = true;
performPostLayoutTasks();
m_inSynchronousPostLayout = false;
}
if (!m_postLayoutTasksTimer.isAct... | 0 | 23,059 |
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 CreateResource() {
ui_resources_[num_ui_resources_++] =
FakeScopedUIResource::Create(layer_tree_host()->GetUIResourceManager());
}
Commit Message: (Reland) Discard compositor frames from unloaded web content
This is a reland of https://codereview.chromium.org/2707243005/ with a
small change... | 0 | 19,283 |
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 qemu_spice_destroy_update(SimpleSpiceDisplay *sdpy, SimpleSpiceUpdate *update)
{
g_free(update->bitmap);
g_free(update);
}
Commit Message:
CWE ID: CWE-200 | 0 | 27,248 |
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: PHP_FUNCTION(pg_field_prtlen)
{
php_pgsql_data_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_PG_DATA_LENGTH);
}
Commit Message:
CWE ID: | 0 | 13,562 |
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 fib_nh_exception *fnhe_oldest(struct fnhe_hash_bucket *hash)
{
struct fib_nh_exception *fnhe, *oldest;
oldest = rcu_dereference(hash->chain);
for (fnhe = rcu_dereference(oldest->fnhe_next); fnhe;
fnhe = rcu_dereference(fnhe->fnhe_next)) {
if (time_before(fnhe->fnhe_stamp, oldest->fnhe_st... | 0 | 10,339 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.