instruction stringclasses 1
value | input stringlengths 64 129k | output int64 0 1 | __index_level_0__ int64 0 30k |
|---|---|---|---|
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static inline Evas_Smart* _ewk_frame_smart_class_new(void)
{
static Evas_Smart_Class smartClass = EVAS_SMART_CLASS_INIT_NAME_VERSION(EWK_FRAME_TYPE_STR);
static Evas_Smart* smart = 0;
if (EINA_UNLIKELY(!smart)) {
evas_object_smart_clipped_smart_set(&_parent_sc);
_ewk_frame_smart_set(&... | 0 | 330 |
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: ZEND_API zend_bool ZEND_FASTCALL zend_hash_index_exists(const HashTable *ht, zend_ulong h)
{
Bucket *p;
IS_CONSISTENT(ht);
if (ht->u.flags & HASH_FLAG_PACKED) {
if (h < ht->nNumUsed) {
if (Z_TYPE(ht->arData[h].val) != IS_UNDEF) {
return 1;
}
}
return 0;
}
p = zend_hash_index_find_bucket(ht... | 0 | 5,653 |
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 rpng2_win_load_bg_image()
{
uch *src, *dest;
uch r1, r2, g1, g2, b1, b2;
uch r1_inv, r2_inv, g1_inv, g2_inv, b1_inv, b2_inv;
int k, hmax, max;
int xidx, yidx, yidx_max = (bgscale-1);
int even_odd_vert, even_odd_horiz, even_odd;
int invert_gradient2 = (bg[pat].type & 0x08);
int invert_c... | 0 | 13,947 |
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_DEFINE2(setrlimit, unsigned int, resource, struct rlimit __user *, rlim)
{
struct rlimit new_rlim;
if (copy_from_user(&new_rlim, rlim, sizeof(*rlim)))
return -EFAULT;
return do_prlimit(current, resource, &new_rlim, NULL);
}
Commit Message: mm: fix prctl_set_vma_anon_name
prctl_set_vma_anon_name cou... | 0 | 6,871 |
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 BluetoothAdapterChromeOS::DiscoveringChanged(
bool discovering) {
FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
AdapterDiscoveringChanged(this, discovering));
}
Commit Message: Refactor to support default Bluetooth pairing delegate
In order to support a default pairing... | 0 | 533 |
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(imageloadfont)
{
char *file;
int file_name, hdr_size = sizeof(gdFont) - sizeof(char *);
int ind, body_size, n = 0, b, i, body_size_check;
gdFontPtr font;
php_stream *stream;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &file, &file_name) == FAILURE) {
return;
}
stream = php_s... | 0 | 528 |
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 handle_mount_opt(struct super_block *sb, char *opt, int token,
substring_t *args, unsigned long *journal_devnum,
unsigned int *journal_ioprio, int is_remount)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
const struct mount_opts *m;
kuid_t uid;
kgid_t gid;
int arg = 0;
#ifdef CONFIG_QUO... | 0 | 2,100 |
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 RunMethod(Method method) {
(this->*method)();
}
Commit Message: Reland "AppCache: Add padding to cross-origin responses."
This is a reland of 85b389caa7d725cdd31f59e9a2b79ff54804b7b7
Initialized CacheRecord::padding_size to 0.
Original change's description:
> AppCache: Add padding to cross-origin... | 0 | 16,073 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool IsUserAllowedForARC(const AccountId& account_id) {
return user_manager::UserManager::IsInitialized() &&
arc::IsArcAllowedForUser(
user_manager::UserManager::Get()->FindUser(account_id));
}
Commit Message: cros: Check initial auth type when showing views login.
Bug: 859611
Change-Id:... | 0 | 17,903 |
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 futex_unlock_pi(u32 __user *uaddr, unsigned int flags)
{
struct futex_hash_bucket *hb;
struct futex_q *this, *next;
union futex_key key = FUTEX_KEY_INIT;
u32 uval, vpid = task_pid_vnr(current);
int ret;
retry:
if (get_user(uval, uaddr))
return -EFAULT;
/*
* We release only a lock we actuall... | 0 | 6,163 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: kadm5_modify_principal(void *server_handle,
kadm5_principal_ent_t entry, long mask)
{
int ret, ret2, i;
kadm5_policy_ent_rec pol;
krb5_boolean have_pol = FALSE;
krb5_db_entry *kdb;
krb5_tl_data *tl_data_orig;
osa... | 1 | 4,118 |
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 GpuChannel::OnCreateOffscreenCommandBuffer(
const gfx::Size& size,
const GPUCreateCommandBufferConfig& init_params,
IPC::Message* reply_message) {
int32 route_id = MSG_ROUTING_NONE;
content::GetContentClient()->SetActiveURL(init_params.active_url);
#if defined(ENABLE_GPU)
WillCreateComm... | 0 | 13,346 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void php_xmlwriter_end(INTERNAL_FUNCTION_PARAMETERS, xmlwriter_read_int_t internal_function)
{
zval *pind;
xmlwriter_object *intern;
xmlTextWriterPtr ptr;
int retval;
#ifdef ZEND_ENGINE_2
zval *this = getThis();
if (this) {
XMLWRITER_FROM_OBJECT(intern, this);
if (zend_parse_parameters_none() =... | 0 | 20,321 |
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: opj_pi_iterator_t *opj_pi_create_decode(opj_image_t *p_image,
opj_cp_t *p_cp,
OPJ_UINT32 p_tile_no)
{
OPJ_UINT32 numcomps = p_image->numcomps;
/* loop */
OPJ_UINT32 pino;
OPJ_UINT32 compno, resno;
/* to store w, ... | 0 | 7,183 |
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: spnego_gss_import_sec_context(
OM_uint32 *minor_status,
const gss_buffer_t interprocess_token,
gss_ctx_id_t *context_handle)
{
OM_uint32 ret;
ret = gss_import_sec_context(minor_status,
interprocess_token,
context_handle);
return (ret);
}
Commit Message: Fix SPNEGO context aliasing bug... | 1 | 12,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: static struct dst_entry *tcp_v6_route_req(const struct sock *sk,
struct flowi *fl,
const struct request_sock *req)
{
return inet6_csk_route_req(sk, &fl->u.ip6, req, IPPROTO_TCP);
}
Commit Message: ipv6/dccp: do not inherit ipv6_mc_list from parent
Like commit 657831ffc38e ("dccp/tcp: do not inher... | 0 | 1,121 |
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 mov_write_track_metadata(AVIOContext *pb, AVStream *st,
const char *tag, const char *str)
{
int64_t pos = avio_tell(pb);
AVDictionaryEntry *t = av_dict_get(st->metadata, str, NULL, 0);
if (!t || !utf8len(t->value))
return 0;
avio_wb32(pb, 0);... | 0 | 18,832 |
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: uint32_t virtio_config_readw(VirtIODevice *vdev, uint32_t addr)
{
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
uint16_t val;
if (addr + sizeof(val) > vdev->config_len) {
return (uint32_t)-1;
}
k->get_config(vdev, vdev->config);
val = lduw_p(vdev->config + addr);
ret... | 0 | 3,404 |
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 tcp_v4_init_sock(struct sock *sk)
{
struct inet_connection_sock *icsk = inet_csk(sk);
tcp_init_sock(sk);
icsk->icsk_af_ops = &ipv4_specific;
#ifdef CONFIG_TCP_MD5SIG
tcp_sk(sk)->af_specific = &tcp_sock_ipv4_specific;
#endif
return 0;
}
Commit Message: tcp: take care of truncations done by sk_... | 0 | 10,807 |
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: vrrp_gnotify_fault_handler(vector_t *strvec)
{
vrrp_sgroup_t *vgroup = LIST_TAIL_DATA(vrrp_data->vrrp_sync_group);
if (vgroup->script_fault) {
report_config_error(CONFIG_GENERAL_ERROR, "vrrp group %s: notify_fault script already specified - ignoring %s", vgroup->gname, FMT_STR_VSLOT(strvec,1));
return;
}
... | 0 | 7,205 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool PaintController::UseCachedDrawingIfPossible(
const DisplayItemClient& client,
DisplayItem::Type type) {
DCHECK(DisplayItem::IsDrawingType(type));
if (DisplayItemConstructionIsDisabled())
return false;
if (!ClientCacheIsValid(client))
return false;
if (RuntimeEnabledFeatures::PaintU... | 0 | 20,748 |
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 iucv_sock_create(struct net *net, struct socket *sock, int protocol,
int kern)
{
struct sock *sk;
if (protocol && protocol != PF_IUCV)
return -EPROTONOSUPPORT;
sock->state = SS_UNCONNECTED;
switch (sock->type) {
case SOCK_STREAM:
sock->ops = &iucv_sock_ops;
break;
case SOCK_SEQPAC... | 0 | 19,776 |
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: ssize_t tpm_show_pcrs(struct device *dev, struct device_attribute *attr,
char *buf)
{
cap_t cap;
u8 digest[TPM_DIGEST_SIZE];
ssize_t rc;
int i, j, num_pcrs;
char *str = buf;
struct tpm_chip *chip = dev_get_drvdata(dev);
rc = tpm_getcap(dev, TPM_CAP_PROP_PCR, &cap,
"attempting to determine the n... | 0 | 7,094 |
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 u32 apic_get_tmcct(struct kvm_lapic *apic)
{
ktime_t remaining;
s64 ns;
u32 tmcct;
ASSERT(apic != NULL);
/* if initial count is 0, current count should also be 0 */
if (kvm_apic_get_reg(apic, APIC_TMICT) == 0 ||
apic->lapic_timer.period == 0)
return 0;
remaining = hrtimer_get_remaining(&apic-... | 0 | 29,111 |
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_page_get_duration (PopplerPage *page)
{
g_return_val_if_fail (POPPLER_IS_PAGE (page), -1);
return page->page->getDuration ();
}
Commit Message:
CWE ID: CWE-189 | 0 | 2,688 |
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 RecordDownloadContentDisposition(
const std::string& content_disposition_string) {
if (content_disposition_string.empty())
return;
net::HttpContentDisposition content_disposition(content_disposition_string,
std::string());
int result = content_d... | 0 | 7,444 |
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 tgr128_final(struct shash_desc *desc, u8 * out)
{
u8 D[64];
tgr192_final(desc, D);
memcpy(out, D, TGR128_DIGEST_SIZE);
memzero_explicit(D, TGR192_DIGEST_SIZE);
return 0;
}
Commit Message: crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so... | 0 | 20,809 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void AutocompleteEditModel::SetUserText(const string16& text) {
SetInputInProgress(true);
InternalSetUserText(text);
paste_state_ = NONE;
has_temporary_text_ = false;
}
Commit Message: Adds per-provider information to omnibox UMA logs.
Adds a fairly general structure to omnibox logs that can be used to ... | 0 | 12,794 |
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 del_dac(struct task_struct *child, int slot)
{
if (slot == 1) {
if ((dbcr_dac(child) & (DBCR_DAC1R | DBCR_DAC1W)) == 0)
return -ENOENT;
child->thread.debug.dac1 = 0;
dbcr_dac(child) &= ~(DBCR_DAC1R | DBCR_DAC1W);
#ifdef CONFIG_PPC_ADV_DEBUG_DAC_RANGE
if (child->thread.debug.dbcr2 & DBCR2_D... | 0 | 1,931 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderFrameImpl::OnSelectPopupMenuItems(
bool canceled,
const std::vector<int>& selected_indices) {
if (!external_popup_menu_)
return;
blink::WebScopedUserGesture gesture(frame_);
external_popup_menu_->DidSelectItems(canceled, selected_indices);
external_popup_menu_.reset();
}
Comm... | 1 | 12,331 |
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 CLASS kodak_rgb_load_raw()
{
short buf[768], *bp;
int row, col, len, c, i, rgb[3];
ushort *ip=image[0];
for (row=0; row < height; row++)
for (col=0; col < width; col+=256) {
len = MIN (256, width-col);
kodak_65000_decode (buf, len*3);
memset (rgb, 0, sizeof rgb);
for (bp=... | 0 | 27,780 |
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: virtual ~BordersTest() {}
Commit Message: Merge Conflict Fix CL to lmp-mr1-release for ag/849478
DO NOT MERGE - libvpx: Pull from upstream
Current HEAD: 7105df53d7dc13d5e575bc8df714ec8d1da36b06
BUG=23452792
Change-Id: Ic78176fc369e0bacc71d423e0e2e6075d004aaec
CWE ID: CWE-119 | 0 | 15,830 |
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 BindMediaStreamDeviceObserverRequest(
int render_process_id,
int render_frame_id,
blink::mojom::MediaStreamDeviceObserverRequest request) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
RenderFrameHost* render_frame_host =
RenderFrameHost::FromID(render_process_id, render_frame_id);
if (re... | 0 | 19,490 |
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 PageHandler::Reload(Maybe<bool> bypassCache,
Maybe<std::string> script_to_evaluate_on_load,
std::unique_ptr<ReloadCallback> callback) {
WebContentsImpl* web_contents = GetWebContents();
if (!web_contents) {
callback->sendFailure(Response::InternalErro... | 0 | 10,323 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: cifs_reclassify_socket6(struct socket *sock)
{
struct sock *sk = sock->sk;
BUG_ON(sock_owned_by_user(sk));
sock_lock_init_class_and_name(sk, "slock-AF_INET6-CIFS",
&cifs_slock_key[1], "sk_lock-AF_INET6-CIFS", &cifs_key[1]);
}
Commit Message: cifs: always do is_path_accessible check in cifs_mount
Currently,... | 0 | 17,934 |
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 mov_find_codec_tag(AVFormatContext *s, MOVTrack *track)
{
int tag;
if (is_cover_image(track->st))
return ff_codec_get_tag(codec_cover_image_tags, track->par->codec_id);
if (track->mode == MODE_MP4 || track->mode == MODE_PSP)
tag = track->par->codec_tag;
else if (track-... | 0 | 29,400 |
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 HTMLInputElement::isInRequiredRadioButtonGroup()
{
ASSERT(isRadioButton());
if (CheckedRadioButtons* buttons = checkedRadioButtons())
return buttons->isInRequiredGroup(this);
return false;
}
Commit Message: Setting input.x-webkit-speech should not cause focus change
In r150866, we intro... | 0 | 17,303 |
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 RenderWidgetHostViewGtk::SetHasHorizontalScrollbar(
bool has_horizontal_scrollbar) {
}
Commit Message: Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantages:
- allow tearing down and recreating the UI parent context without
losing the renderer contexts
- do not re... | 0 | 12,987 |
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: COMPAT_SYSCALL_DEFINE2(clock_getres, clockid_t, which_clock,
struct compat_timespec __user *, tp)
{
const struct k_clock *kc = clockid_to_kclock(which_clock);
struct timespec64 ts;
int err;
if (!kc)
return -EINVAL;
err = kc->clock_getres(which_clock, &ts);
if (!err && tp && compat_put_timespec6... | 0 | 4,521 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void GLES2DecoderImpl::PerformIdleWork() {
gpu_tracer_->ProcessTraces();
ProcessPendingReadPixels(false);
}
Commit Message: Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
This makes the query of GL_COMPLETION_STATUS_KHR to programs much
cheaper by minimizing the round-trip to the GPU thread.
Bug: 881152, 957001
... | 0 | 6,396 |
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: bson_iter_array (const bson_iter_t *iter, /* IN */
uint32_t *array_len, /* OUT */
const uint8_t **array) /* OUT */
{
BSON_ASSERT (iter);
BSON_ASSERT (array_len);
BSON_ASSERT (array);
*array = NULL;
*array_len = 0;
if (ITER_TYPE (iter) == BSON_TYPE_ARRAY)... | 0 | 29,877 |
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 TabStrip::ButtonPressed(views::Button* sender, const ui::Event& event) {
if (sender == new_tab_button_) {
base::RecordAction(base::UserMetricsAction("NewTab_Button"));
UMA_HISTOGRAM_ENUMERATION("Tab.NewTab", TabStripModel::NEW_TAB_BUTTON,
TabStripModel::NEW_TAB_ENUM_CO... | 0 | 27,547 |
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: iperf_set_test_unit_format(struct iperf_test *ipt, char unit_format)
{
ipt->settings->unit_format = unit_format;
}
Commit Message: Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was alread... | 0 | 14,508 |
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 unsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
v8SetReturnValueUnsigned(info, imp->unsignedLongAttribute());
}
Commit Message: document.location bindings fix
BUG=352374
R=jochen@chro... | 0 | 14,641 |
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 Element::detachAttrNodeAtIndex(Attr* attr, size_t index)
{
ASSERT(attr);
ASSERT(elementData());
const Attribute* attribute = elementData()->attributeItem(index);
ASSERT(attribute);
ASSERT(attribute->name() == attr->qualifiedName());
detachAttrNodeFromElementWithValue(attr, attribute-... | 0 | 2,294 |
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 SessionStore::AreValidSpecifics(const SessionSpecifics& specifics) {
if (specifics.session_tag().empty()) {
return false;
}
if (specifics.has_tab()) {
return specifics.tab_node_id() >= 0 && specifics.tab().tab_id() > 0;
}
if (specifics.has_header()) {
std::set<int> session_tab_ids;
... | 0 | 6,289 |
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 RenderBlockFlow::layoutBlock(bool relayoutChildren)
{
ASSERT(needsLayout());
ASSERT(isInlineBlockOrInlineTable() || !isInline());
m_hasOnlySelfCollapsingChildren = false;
if (!relayoutChildren && simplifiedLayout())
return;
SubtreeLayoutScope layoutScope(*this);
bool done ... | 0 | 26,359 |
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 em_sgdt(struct x86_emulate_ctxt *ctxt)
{
return emulate_store_desc_ptr(ctxt, ctxt->ops->get_gdt);
}
Commit Message: KVM: x86: Introduce segmented_write_std
Introduces segemented_write_std.
Switches from emulated reads/writes to standard read/writes in fxsave,
fxrstor, sgdt, and sidt. This fixes C... | 0 | 166 |
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: new_device (u2fh_devs * devs)
{
struct u2fdevice *new = malloc (sizeof (struct u2fdevice));
if (new == NULL)
{
return NULL;
}
memset (new, 0, sizeof (struct u2fdevice));
new->id = devs->max_id++;
if (devs->first == NULL)
{
devs->first = new;
}
else
{
struct u2fdev... | 0 | 13,170 |
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: SessionStore::WriteBatch::~WriteBatch() {
DCHECK(!batch_) << "Destructed without prior commit";
}
Commit Message: Add trace event to sync_sessions::OnReadAllMetadata()
It is likely a cause of janks on UI thread on Android.
Add a trace event to get metrics about the duration.
BUG=902203
Change-Id: I4c4e9c2a2... | 0 | 28,992 |
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 UiSceneCreator::CreateUnderDevelopmentNotice() {
auto text = base::MakeUnique<Text>(kUnderDevelopmentNoticeFontHeightDMM);
BindColor(model_, text.get(), &ColorScheme::world_background_text,
&Text::SetColor);
text->SetText(l10n_util::GetStringUTF16(IDS_VR_UNDER_DEVELOPMENT_NOTICE));
text->... | 0 | 27,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: void HTMLFormElement::PrepareForSubmission(
Event* event,
HTMLFormControlElement* submit_button) {
LocalFrame* frame = GetDocument().GetFrame();
if (!frame || is_submitting_ || in_user_js_submit_event_)
return;
if (!isConnected()) {
GetDocument().AddConsoleMessage(ConsoleMessage::Create(
... | 0 | 10,206 |
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 build_ntlmssp_auth_blob(unsigned char **pbuffer,
u16 *buflen,
struct cifs_ses *ses,
const struct nls_table *nls_cp)
{
int rc;
AUTHENTICATE_MESSAGE *sec_blob;
__u32 flags;
unsigned char *tmp;
rc = setup_ntlmv2_rsp(ses, nls_cp);
if (rc) {
cifs_dbg(VFS, "Error %d during NTLMSSP authen... | 1 | 12,599 |
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 unqueue_me(struct futex_q *q)
{
spinlock_t *lock_ptr;
int ret = 0;
/* In the common case we don't take the spinlock, which is nice. */
retry:
lock_ptr = q->lock_ptr;
barrier();
if (lock_ptr != NULL) {
spin_lock(lock_ptr);
/*
* q->lock_ptr can change between reading it and
* spin_lock()... | 0 | 1,341 |
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 sig_handler(int signo) {
if (signo == SIGINT) {
fprintf(stderr, "Received SIGINT\n");
CALL_AND_WAIT(bt_interface->disable(), adapter_state_changed);
fprintf(stderr, "BT adapter is down\n");
exit(1);
}
}
Commit Message: Add guest mode functionality (2/3)
Add a flag to enable() to st... | 0 | 15,499 |
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 NavigatorImpl::RequestOpenURL(
RenderFrameHostImpl* render_frame_host,
const GURL& url,
bool uses_post,
const scoped_refptr<ResourceRequestBodyImpl>& body,
const std::string& extra_headers,
SiteInstance* source_site_instance,
const Referrer& referrer,
WindowOpenDisposition dis... | 0 | 20,843 |
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 tls1_alert_code(int code)
{
switch (code) {
case SSL_AD_CLOSE_NOTIFY:
return (SSL3_AD_CLOSE_NOTIFY);
case SSL_AD_UNEXPECTED_MESSAGE:
return (SSL3_AD_UNEXPECTED_MESSAGE);
case SSL_AD_BAD_RECORD_MAC:
return (SSL3_AD_BAD_RECORD_MAC);
case SSL_AD_DECRYPTION_FAILED:
... | 0 | 1,940 |
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 dump_attrs(FILE *ofd, struct nlattr *attrs, int attrlen,
int prefix)
{
int rem;
struct nlattr *nla;
nla_for_each_attr(nla, attrs, attrlen, rem) {
int padlen, alen = nla_len(nla);
prefix_line(ofd, prefix);
if (nla->nla_type == 0)
fprintf(ofd, " [ATTR PADDING] %d octets\n", alen... | 0 | 28,162 |
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 did_receive_event() { return did_receive_event_; }
Commit Message: Add a check for disallowing remote frame navigations to local resources.
Previously, RemoteFrame navigations did not perform any renderer-side
checks and relied solely on the browser-side logic to block disallowed
navigations via mechanis... | 0 | 12,778 |
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: gamma_test(png_modifier *pmIn, PNG_CONST png_byte colour_typeIn,
PNG_CONST png_byte bit_depthIn, PNG_CONST int palette_numberIn,
PNG_CONST int interlace_typeIn,
PNG_CONST double file_gammaIn, PNG_CONST double screen_gammaIn,
PNG_CONST png_byte sbitIn, PNG_CONST int threshold_testIn,
PNG_CONST ... | 1 | 14,914 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void GLES2DecoderImpl::ReleaseIOSurfaceForTexture(GLuint texture_id) {
TextureToIOSurfaceMap::iterator it = texture_to_io_surface_map_.find(
texture_id);
if (it != texture_to_io_surface_map_.end()) {
CFTypeRef surface = it->second;
CFRelease(surface);
texture_to_io_surface_map_.erase(it);
... | 0 | 18,751 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: e1000e_set_pbaclr(E1000ECore *core, int index, uint32_t val)
{
int i;
core->mac[PBACLR] = val & E1000_PBACLR_VALID_MASK;
if (!msix_enabled(core->owner)) {
return;
}
for (i = 0; i < E1000E_MSIX_VEC_NUM; i++) {
if (core->mac[PBACLR] & BIT(i)) {
msix_clr_pending(cor... | 0 | 8,689 |
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: FastTransactionServer() {
no_store = false;
}
Commit Message: Http cache: Test deleting an entry with a pending_entry when
adding the truncated flag.
BUG=125159
TEST=net_unittests
Review URL: https://chromiumcodereview.appspot.com/10356113
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139331 0039... | 0 | 4,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: void SecurityExploitBrowserTest::TestFileChooserWithPath(
const base::FilePath& path) {
GURL foo("http://foo.com/simple_page.html");
NavigateToURL(shell(), foo);
EXPECT_EQ(base::ASCIIToUTF16("OK"), shell()->web_contents()->GetTitle());
RenderFrameHost* compromised_renderer =
shell()->web_conten... | 0 | 20,466 |
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: BrowserContext* DownloadManagerImpl::GetBrowserContext() const {
return browser_context_;
}
Commit Message: Downloads : Fixed an issue of opening incorrect download file
When one download overwrites another completed download, calling download.open in the old download causes the new download to open, which co... | 0 | 9,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: static void __exit snd_compress_exit(void)
{
}
Commit Message: ALSA: compress: fix an integer overflow check
I previously added an integer overflow check here but looking at it now,
it's still buggy.
The bug happens in snd_compr_allocate_buffer(). We multiply
".fragments" and ".fragment_size" and that doesn't... | 0 | 10,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: static bool isMainDisplay(int32_t displayId) {
return displayId == ADISPLAY_ID_DEFAULT || displayId == ADISPLAY_ID_NONE;
}
Commit Message: Add new MotionEvent flag for partially obscured windows.
Due to more complex window layouts resulting in lots of overlapping
windows, the policy around FLAG_WINDOW_IS_OBSCU... | 0 | 6,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: static void br_multicast_del_pg(struct net_bridge *br,
struct net_bridge_port_group *pg)
{
struct net_bridge_mdb_htable *mdb;
struct net_bridge_mdb_entry *mp;
struct net_bridge_port_group *p;
struct net_bridge_port_group __rcu **pp;
mdb = mlock_dereference(br->mdb, br);
mp = br_mdb_ip_get(mdb, &pg->ad... | 1 | 16,065 |
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 longAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjectV8Internal::longAttrAttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Exe... | 0 | 2,924 |
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 __pgd_error(const char *file, int line, pgd_t pgd)
{
printk("%s:%d: bad pgd %08llx.\n", file, line, (long long)pgd_val(pgd));
}
Commit Message: ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork
Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to
prevent it... | 0 | 15,342 |
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::CloseFrameAfterDragSession() {
#if defined(OS_WIN) || defined(OS_LINUX)
MessageLoop::current()->PostTask(
FROM_HERE, method_factory_.NewRunnableMethod(&Browser::CloseFrame));
#endif
}
Commit Message: chromeos: fix bug where "aw snap" page replaces first tab if it was a NTP when closing wind... | 0 | 24,748 |
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 do_qib_user_sdma_queue_create(struct file *fp)
{
struct qib_filedata *fd = fp->private_data;
struct qib_ctxtdata *rcd = fd->rcd;
struct qib_devdata *dd = rcd->dd;
if (dd->flags & QIB_HAS_SEND_DMA) {
fd->pq = qib_user_sdma_queue_create(&dd->pcidev->dev,
dd->unit,
rcd->ctxt,
... | 0 | 3,099 |
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 ChromeWebContentsDelegateAndroid::AddNewContents(
WebContents* source,
WebContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_rect,
bool user_gesture,
bool* was_blocked) {
DCHECK_NE(disposition, SAVE_TO_DISK);
DCHECK_NE(disposition, CURRENT_TAB);
... | 1 | 21,729 |
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 ssize_t aac_show_vendor(struct device *device,
struct device_attribute *attr, char *buf)
{
struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata;
int len;
if (dev->supplement_adapter_info.AdapterTypeText[0]) {
char * cp = dev->supplement_adapter_info.AdapterTypeText;
whi... | 0 | 15,442 |
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: device_filesystem_set_label (Device *device,
const char *new_label,
DBusGMethodInvocation *context)
{
const Filesystem *fs_details;
GError *error;
error = NULL;
if (device->priv->id_usage == NULL || strcmp (device->priv->id_usage, "filesystem") !... | 0 | 7,811 |
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: ALuint S_AL_BufferGet(sfxHandle_t sfx)
{
return knownSfx[sfx].buffer;
}
Commit Message: Don't open .pk3 files as OpenAL drivers.
CWE ID: CWE-269 | 0 | 13,767 |
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 BaseMultipleFieldsDateAndTimeInputType::editControlValueChanged()
{
RefPtr<HTMLInputElement> input(element());
String oldValue = input->value();
String newValue = sanitizeValue(m_dateTimeEditElement->value());
if ((oldValue.isEmpty() && newValue.isEmpty()) || oldValue == newValue)
inp... | 0 | 25,162 |
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: int64_t streamTrimByLength(stream *s, size_t maxlen, int approx) {
if (s->length <= maxlen) return 0;
raxIterator ri;
raxStart(&ri,s->rax);
raxSeek(&ri,"^",NULL,0);
int64_t deleted = 0;
while(s->length > maxlen && raxNext(&ri)) {
unsigned char *lp = ri.data, *p = lpFirst(lp);
... | 0 | 24,830 |
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: Document& Document::AXObjectCacheOwner() const {
Document* doc = const_cast<Document*>(this);
if (doc->GetFrame() && doc->GetFrame()->PagePopupOwner()) {
DCHECK(!doc->ax_object_cache_);
return doc->GetFrame()
->PagePopupOwner()
->GetDocument()
.AXObjectCacheOwner();
}
retur... | 0 | 26,755 |
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: NavigationPolicy FrameLoader::CheckLoadCanStart(
FrameLoadRequest& frame_load_request,
FrameLoadType type,
NavigationPolicy navigation_policy,
NavigationType navigation_type) {
if (frame_->GetDocument()->PageDismissalEventBeingDispatched() !=
Document::kNoDismissal) {
return kNavigatio... | 0 | 11,612 |
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 CorePageLoadMetricsObserver::OnFirstContentfulPaint(
const page_load_metrics::PageLoadTiming& timing,
const page_load_metrics::PageLoadExtraInfo& info) {
if (WasStartedInForegroundOptionalEventInForeground(
timing.first_contentful_paint, info)) {
PAGE_LOAD_HISTOGRAM(internal::kHistogr... | 0 | 4,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: fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data,
tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree _U_)
{
fp_info *fpi;
guint8 tfi, c_t;
int offset = 0, i=0, j=0, num_tbs, chan, tb_size, tb_bit_off;
... | 1 | 12,982 |
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_acl_filtered_copy(const char *user, xmlNode* acl_source, xmlNode *xml, xmlNode ** result)
{
GListPtr aIter = NULL;
xmlNode *target = NULL;
xml_private_t *p = NULL;
xml_private_t *doc = NULL;
*result = NULL;
if(xml == NULL || pcmk_acl_required(user) == FALSE) {
crm_trace("no ac... | 0 | 1,030 |
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 LongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
TestObject* impl = V8TestObject::ToImpl(info.Holder());
V8SetReturnValueInt(info, impl->longMethod());
}
Commit Message: bindings: Support "attribute FrozenArray<T>?"
Adds a quick hack to support a case of "attribute FrozenArra... | 0 | 13,840 |
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: zipx_xz_init(struct archive_read *a, struct zip *zip)
{
lzma_ret r;
if(zip->zipx_lzma_valid) {
lzma_end(&zip->zipx_lzma_stream);
zip->zipx_lzma_valid = 0;
}
memset(&zip->zipx_lzma_stream, 0, sizeof(zip->zipx_lzma_stream));
r = lzma_stream_decoder(&zip->zipx_lzma_stream, UINT64_MAX, 0);
if (r != LZMA_O... | 0 | 29,147 |
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 RenderWidgetHostViewAura::GetTextFromRange(
const ui::Range& range,
string16* text) {
ui::Range selection_text_range(selection_text_offset_,
selection_text_offset_ + selection_text_.length());
if (!selection_text_range.Contains(range)) {
text->clear();
return false;
}
if (selec... | 0 | 28,861 |
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 copy_mm(unsigned long clone_flags, struct task_struct * tsk)
{
struct mm_struct * mm, *oldmm;
int retval;
tsk->min_flt = tsk->maj_flt = 0;
tsk->nvcsw = tsk->nivcsw = 0;
#ifdef CONFIG_DETECT_HUNG_TASK
tsk->last_switch_count = tsk->nvcsw + tsk->nivcsw;
#endif
tsk->mm = NULL;
tsk->active_mm = NUL... | 0 | 6,052 |
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 CustomButton::SetState(ButtonState state) {
if (state == state_)
return;
if (animate_on_state_change_ &&
(!is_throbbing_ || !hover_animation_->is_animating())) {
is_throbbing_ = false;
if ((state_ == STATE_HOVERED) && (state == STATE_NORMAL)) {
hover_animation_->Hide();
} els... | 0 | 82 |
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 vmx_set_constant_host_state(struct vcpu_vmx *vmx)
{
u32 low32, high32;
unsigned long tmpl;
struct desc_ptr dt;
vmcs_writel(HOST_CR0, read_cr0() & ~X86_CR0_TS); /* 22.2.3 */
vmcs_writel(HOST_CR4, read_cr4()); /* 22.2.3, 22.2.5 */
vmcs_writel(HOST_CR3, read_cr3()); /* 22.2.3 FIXME: shadow tab... | 0 | 21,826 |
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_METHOD(PharFileInfo, isCRCChecked)
{
PHAR_ENTRY_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
return;
}
RETURN_BOOL(entry_obj->ent.entry->is_crc_checked);
}
Commit Message:
CWE ID: | 0 | 26,474 |
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: NavigationState* RenderFrameImpl::CreateNavigationStateFromPending() {
if (IsBrowserInitiated(pending_navigation_params_.get())) {
return NavigationStateImpl::CreateBrowserInitiated(
pending_navigation_params_->common_params,
pending_navigation_params_->request_params);
}
return Navigati... | 0 | 13,891 |
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 ssl3_get_server_certificate(SSL *s)
{
int al, i, ok, ret = -1, exp_idx;
unsigned long n, nc, llen, l;
X509 *x = NULL;
const unsigned char *q, *p;
unsigned char *d;
STACK_OF(X509) *sk = NULL;
SESS_CERT *sc;
EVP_PKEY *pkey = NULL;
n = s->method->ssl_get_message(s,
... | 0 | 7,117 |
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 BlinkTestRunner::SetPermission(const std::string& name,
const std::string& value,
const GURL& origin,
const GURL& embedding_origin) {
content::PermissionStatus status;
if (value == "granted")
s... | 0 | 2,184 |
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 RenderLayerCompositor::repaintCompositedLayers(const IntRect* absRect)
{
recursiveRepaintLayer(rootRenderLayer(), absRect);
}
Commit Message: Disable some more query compositingState asserts.
This gets the tests passing again on Mac. See the bug for the stacktrace.
A future patch will need to actually ... | 0 | 2,048 |
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 CSoundFile::SampleOffset(ModChannel &chn, SmpLength param) const
{
chn.proTrackerOffset += param;
if(param >= chn.nLoopEnd && GetType() == MOD_TYPE_MTM && chn.dwFlags[CHN_LOOP] && chn.nLoopEnd > 0)
{
param = (param - chn.nLoopStart) % (chn.nLoopEnd - chn.nLoopStart) + chn.nLoopStart;
}
if(GetType() ... | 0 | 24,183 |
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 ImageCapture::OnMojoSetOptions(ScriptPromiseResolver* resolver,
PromiseResolverFunction resolve_function,
bool trigger_take_photo,
bool result) {
DCHECK(service_requests_.Contains(resolver));
if (... | 0 | 13,372 |
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 migrate_misplaced_transhuge_page(struct mm_struct *mm,
struct vm_area_struct *vma,
pmd_t *pmd, pmd_t entry,
unsigned long address,
struct page *page, int node)
{
spinlock_t *ptl;
pg_data_t *pgdat = NODE_DATA(node);
int isolated = 0;
struct page *new_page = NULL;
int page_lru = page_is_fil... | 0 | 5,181 |
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 RenderWidgetHostViewGuest::CopyFromCompositingSurface(
const gfx::Rect& src_subrect,
const gfx::Size& /* dst_size */,
const base::Callback<void(bool)>& callback,
skia::PlatformBitmap* output) {
NOTIMPLEMENTED();
}
Commit Message: Implement TextureImageTransportSurface using texture mailb... | 0 | 11,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 WebLocalFrameImpl::Close() {
WebLocalFrame::Close();
client_ = nullptr;
if (dev_tools_agent_)
dev_tools_agent_.Clear();
self_keep_alive_.Clear();
if (print_context_)
PrintEnd();
#if DCHECK_IS_ON()
is_in_printing_ = false;
#endif
}
Commit Message: Do not forward resource timing to par... | 0 | 1,709 |
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: header_put_le_int (SF_PRIVATE *psf, int x)
{ if (psf->headindex < SIGNED_SIZEOF (psf->header) - 4)
{ psf->header [psf->headindex++] = x ;
psf->header [psf->headindex++] = (x >> 8) ;
psf->header [psf->headindex++] = (x >> 16) ;
psf->header [psf->headindex++] = (x >> 24) ;
} ;
} /* header_put_le_int */
... | 1 | 28,148 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.