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: void RenderViewImpl::DisableAutoResizeForTesting(const gfx::Size& new_size) {
OnDisableAutoResize(new_size);
}
Commit Message: If a page calls |window.focus()|, kick it out of fullscreen.
BUG=776418, 800056
Change-Id: I1880fe600e4814c073f247c43b1c1ac80c8fc017
Reviewed-on: https://chromium-review.googlesource... | 0 | 9,849 |
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 PDFiumEngine::Form_OutputSelectedRect(FPDF_FORMFILLINFO* param,
FPDF_PAGE page,
double left,
double top,
double right,
... | 0 | 5,407 |
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: fit(peer_t *p, double rd)
{
if ((p->reachable_bits & (p->reachable_bits-1)) == 0) {
/* One or zero bits in reachable_bits */
VERB4 bb_error_msg("peer %s unfit for selection: unreachable", p->p_dotted);
return 0;
}
#if 0 /* we filter out such packets earlier */
if ((p->lastpkt_status & LI_ALARM) == LI_ALA... | 0 | 18,002 |
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 mem_cgroup_sockets_init(struct mem_cgroup *memcg, struct cgroup_subsys *ss)
{
struct proto *proto;
int ret = 0;
mutex_lock(&proto_list_mutex);
list_for_each_entry(proto, &proto_list, node) {
if (proto->init_cgroup) {
ret = proto->init_cgroup(memcg, ss);
if (ret)
goto out;
}
}
mutex_unloc... | 0 | 22,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: bool omx_video::omx_c2d_conv::open(unsigned int height,unsigned int width,
ColorConvertFormat src, ColorConvertFormat dest,unsigned int src_stride)
{
bool status = false;
pthread_mutex_lock(&c_lock);
if (!c2dcc) {
c2dcc = mConvertOpen(width, height, width, height,
src,dest,0,src_str... | 0 | 14,193 |
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 BrowserWindowGtk::IsFullscreenBubbleVisible() const {
return fullscreen_exit_bubble_ != NULL;
}
Commit Message: Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.appspot.com/11293205
git-svn-id: svn://svn.chromium.org... | 0 | 16,324 |
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 llcp_sock_accept(struct socket *sock, struct socket *newsock,
int flags)
{
DECLARE_WAITQUEUE(wait, current);
struct sock *sk = sock->sk, *new_sk;
long timeo;
int ret = 0;
pr_debug("parent %p\n", sk);
lock_sock_nested(sk, SINGLE_DEPTH_NESTING);
if (sk->sk_state != LLCP_LISTEN) {
ret =... | 0 | 14,247 |
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: WebContentsImpl::GetLastCommittedNavigationEntryForRenderManager() {
return controller_.GetLastCommittedEntry();
}
Commit Message: Don't show current RenderWidgetHostView while interstitial is showing.
Also moves interstitial page tracking from RenderFrameHostManager to
WebContents, since interstitial p... | 0 | 27,171 |
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 Resource::CachedMetadataHandlerImpl::SendToPlatform() {
if (cached_metadata_) {
const Vector<char>& serialized_data = cached_metadata_->SerializedData();
Platform::Current()->CacheMetadata(response_url_, response_time_,
serialized_data.data(),
... | 0 | 513 |
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::MediaMutedStatusChanged(
const WebContentsObserver::MediaPlayerId& id,
bool muted) {
for (auto& observer : observers_)
observer.MediaMutedStatusChanged(id, muted);
}
Commit Message: Prevent renderer initiated back navigation to cancel a browser one.
Renderer initiated back/fo... | 0 | 13,502 |
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 is_disabled(void)
{
u64 vm_cr;
rdmsrl(MSR_VM_CR, vm_cr);
if (vm_cr & (1 << SVM_VM_CR_SVM_DISABLE))
return 1;
return 0;
}
Commit Message: KVM: x86: Check non-canonical addresses upon WRMSR
Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is
written to certain MSRs. The ... | 0 | 19,741 |
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: iasecc_select_aid(struct sc_card *card, struct sc_aid *aid, unsigned char *out, size_t *out_len)
{
struct sc_apdu apdu;
unsigned char apdu_resp[SC_MAX_APDU_BUFFER_SIZE];
int rv;
/* Select application (deselect previously selected application) */
sc_format_apdu(card, &apdu, SC_APDU_CASE_4_SHORT, 0xA4, 0x04, ... | 0 | 22,731 |
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 expandRegular(rpmfi fi, const char *dest, rpmpsm psm, int nodigest, int nocontent)
{
FD_t wfd = NULL;
int rc = 0;
/* Create the file with 0200 permissions (write by owner). */
{
mode_t old_umask = umask(0577);
wfd = Fopen(dest, "w.ufdio");
umask(old_umask);
}
if (F... | 1 | 9,367 |
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 write_response(ESPState *s)
{
trace_esp_write_response(s->status);
s->ti_buf[0] = s->status;
s->ti_buf[1] = 0;
if (s->dma) {
s->dma_memory_write(s->dma_opaque, s->ti_buf, 2);
s->rregs[ESP_RSTAT] = STAT_TC | STAT_ST;
s->rregs[ESP_RINTR] = INTR_BS | INTR_FC;
... | 0 | 3,241 |
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 Plugin::StartProxiedExecution(NaClSrpcChannel* srpc_channel,
ErrorInfo* error_info) {
PLUGIN_PRINTF(("Plugin::StartProxiedExecution (srpc_channel=%p)\n",
static_cast<void*>(srpc_channel)));
HistogramStartupTimeMedium(
"NaCl.Perf.StartupTime.NaClO... | 0 | 2,253 |
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: parse_oxms(struct ofpbuf *payload, bool loose,
struct mf_bitmap *exactp, struct mf_bitmap *maskedp)
{
struct mf_bitmap exact = MF_BITMAP_INITIALIZER;
struct mf_bitmap masked = MF_BITMAP_INITIALIZER;
while (payload->size > 0) {
const struct mf_field *field;
enum ofperr error... | 0 | 8,707 |
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 gtco_input_open(struct input_dev *inputdev)
{
struct gtco *device = input_get_drvdata(inputdev);
device->urbinfo->dev = device->usbdev;
if (usb_submit_urb(device->urbinfo, GFP_KERNEL))
return -EIO;
return 0;
}
Commit Message: Input: gtco - fix crash on detecting device without endpoints
The g... | 0 | 23,157 |
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 LiveSyncTest::TearDownLocalTestServer() {
if (test_server_handle_ != base::kNullProcessHandle) {
EXPECT_TRUE(base::KillProcess(test_server_handle_, 0, false))
<< "Could not stop local test server.";
base::CloseProcessHandle(test_server_handle_);
test_server_handle_ = base::kNullProcessH... | 0 | 19,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: static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id)
{
struct vcpu_svm *svm;
struct page *page;
struct page *msrpm_pages;
struct page *hsave_page;
struct page *nested_msrpm_pages;
int err;
svm = kmem_cache_zalloc(kvm_vcpu_cache, GFP_KERNEL);
if (!svm) {
err = -ENOMEM;
goto out;
... | 0 | 4,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: int am_postdir_cleanup(request_rec *r)
{
am_mod_cfg_rec *mod_cfg;
apr_dir_t *postdir;
apr_status_t rv;
char error_buffer[64];
apr_finfo_t afi;
char *fname;
int count;
apr_time_t expire_before;
mod_cfg = am_get_mod_cfg(r->server);
/* The oldes file we should keep. Delete f... | 0 | 5,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: static int sctp_wait_for_connect(struct sctp_association *asoc, long *timeo_p)
{
struct sock *sk = asoc->base.sk;
int err = 0;
long current_timeo = *timeo_p;
DEFINE_WAIT(wait);
pr_debug("%s: asoc:%p, timeo:%ld\n", __func__, asoc, *timeo_p);
/* Increment the association's refcnt. */
sctp_association_hold... | 0 | 10,504 |
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 nfs_read(struct device_d *dev, FILE *file, void *buf, size_t insize)
{
struct file_priv *priv = file->priv;
if (insize > 1024)
insize = 1024;
if (insize && !kfifo_len(priv->fifo)) {
int ret = nfs_read_req(priv, file->pos, insize);
if (ret)
return ret;
}
return kfifo_get(priv->fifo, buf... | 0 | 12,856 |
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: string_strncasecmp_range (const char *string1, const char *string2, int max,
int range)
{
int count, diff;
if (!string1 || !string2)
return (string1) ? 1 : ((string2) ? -1 : 0);
count = 0;
while ((count < max) && string1[0] && string2[0])
{
diff = ut... | 0 | 15,956 |
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 HTMLSelectElement::recalcListItems(bool updateSelectedStates) const
{
m_listItems.clear();
m_shouldRecalcListItems = false;
HTMLOptionElement* foundSelected = 0;
HTMLOptionElement* firstOption = 0;
for (Element* currentElement = ElementTraversal::firstWithin(this); currentElement; ) {
... | 0 | 2,725 |
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: get_connection_info(int populate, int use_dns)
{
struct ssh *ssh = active_state; /* XXX */
static struct connection_info ci;
if (!populate)
return &ci;
ci.host = auth_get_canonical_hostname(ssh, use_dns);
ci.address = ssh_remote_ipaddr(ssh);
ci.laddress = ssh_local_ipaddr(ssh);
ci.lport = ssh_local_port... | 0 | 4,491 |
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: WORD32 ih264d_get_frame_dimensions(iv_obj_t *dec_hdl,
void *pv_api_ip,
void *pv_api_op)
{
ih264d_ctl_get_frame_dimensions_ip_t *ps_ip;
ih264d_ctl_get_frame_dimensions_op_t *ps_op;
dec_struct_t *ps_dec = dec_hdl->pv_codec_handle;
UWORD32 disp_wd, disp_ht, buffer_wd, buffer_ht, x_offset, y_offset;
ps_... | 0 | 19,957 |
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 avc_emulation_bytes_remove_count(const char *buffer, u32 nal_size)
{
u32 i = 0, emulation_bytes_count = 0;
u8 num_zero = 0;
while (i < nal_size)
{
/*ISO 14496-10: "Within the NAL unit, any four-byte sequence that starts with 0x000003
other than the following sequences shall not occur at any ... | 0 | 29,053 |
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 gdImageHLine(gdImagePtr im, int y, int x1, int x2, int col)
{
if (im->thick > 1) {
int thickhalf = im->thick >> 1;
_gdImageFilledHRectangle(im, x1, y - thickhalf, x2, y + im->thick - thickhalf - 1, col);
} else {
if (x2 < x1) {
int t = x2;
x2 = x1;
x1 = t;
}
for (; x1 <= x2; x1++... | 0 | 13,292 |
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 jas_matrix_asl(jas_matrix_t *matrix, int n)
{
int i;
int j;
jas_seqent_t *rowstart;
int rowstep;
jas_seqent_t *data;
if (jas_matrix_numrows(matrix) > 0 && jas_matrix_numcols(matrix) > 0) {
assert(matrix->rows_);
rowstep = jas_matrix_rowstep(matrix);
for (i = matrix->numrows_, rowstart = matrix->... | 0 | 3,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: pdf14_rgbspot_get_color_mapping_procs(const gx_device * dev)
{
return &pdf14_DeviceRGBspot_procs;
}
Commit Message:
CWE ID: CWE-416 | 0 | 4,413 |
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 sock *ax25_find_listener(ax25_address *addr, int digi,
struct net_device *dev, int type)
{
ax25_cb *s;
spin_lock(&ax25_list_lock);
ax25_for_each(s, &ax25_list) {
if ((s->iamdigi && !digi) || (!s->iamdigi && digi))
continue;
if (s->sk && !ax25cmp(&s->source_addr, addr) &&
s->sk->sk_type ==... | 0 | 11,352 |
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 int add_index_stringl(zval *arg, ulong index, const char *str, uint length, int duplicate) /* {{{ */
{
zval *tmp;
if (UNEXPECTED(length > INT_MAX)) {
zend_error_noreturn(E_ERROR, "String overflow, max size is %d", INT_MAX);
}
MAKE_STD_ZVAL(tmp);
ZVAL_STRINGL(tmp, str, length, duplicate);
retur... | 0 | 6,314 |
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(copy)
{
char *source, *target;
int source_len, target_len;
zval *zcontext = NULL;
php_stream_context *context;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "pp|r", &source, &source_len, &target, &target_len, &zcontext) == FAILURE) {
return;
}
if (php_check_open_basedir(source TSRML... | 0 | 21,606 |
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: String Location::toString() const {
USVStringOrTrustedURL result;
href(result);
DCHECK(result.IsUSVString());
return result.GetAsUSVString();
}
Commit Message: Check the source browsing context's CSP in Location::SetLocation prior to dispatching a navigation to a `javascript:` URL.
Makes `javascript:` n... | 0 | 12,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: static int dn_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen)
{
struct sock *sk = sock->sk;
int err;
lock_sock(sk);
err = __dn_setsockopt(sock, level, optname, optval, optlen, 0);
release_sock(sk);
return err;
}
Commit Message: net: add validation for the... | 0 | 18,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: static int netlink_setsockopt(struct socket *sock, int level, int optname,
char __user *optval, unsigned int optlen)
{
struct sock *sk = sock->sk;
struct netlink_sock *nlk = nlk_sk(sk);
unsigned int val = 0;
int err;
if (level != SOL_NETLINK)
return -ENOPROTOOPT;
if (optlen >= sizeof(int) &&
... | 0 | 7,001 |
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: xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
int ret = 0;
int avail, tlen;
xmlChar cur, next;
const xmlChar *lastlt, *lastgt;
if (ctxt->input == NULL)
return(0);
#ifdef DEBUG_PUSH
switch (ctxt->instate) {
case XML_PARSER_EOF:
xmlGenericError(xmlGenericErrorCo... | 0 | 6,154 |
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: use_polling_handler(vector_t *strvec)
{
if (!strvec)
return;
global_data->linkbeat_use_polling = true;
}
Commit Message: Add command line and configuration option to set umask
Issue #1048 identified that files created by keepalived are created
with mode 0666. This commit changes the default to 0644, and al... | 0 | 9,140 |
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 vrend_renderer_get_cap_set(uint32_t cap_set, uint32_t *max_ver,
uint32_t *max_size)
{
if (cap_set != VREND_CAP_SET) {
*max_ver = 0;
*max_size = 0;
return;
}
*max_ver = 1;
*max_size = sizeof(union virgl_caps);
}
Commit Message:
CWE ID: CWE-772 | 0 | 4,764 |
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 VarianceTest<VarianceFunctionType>::OneQuarterTest() {
memset(src_, 255, block_size_);
const int half = block_size_ / 2;
memset(ref_, 255, half);
memset(ref_ + half, 0, half);
unsigned int sse;
unsigned int var;
REGISTER_STATE_CHECK(var = variance_(src_, width_, ref_, width_, &sse));
con... | 1 | 15,008 |
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 xmlEntityPtr SVGGetParameterEntity(void *context,const xmlChar *name)
{
SVGInfo
*svg_info;
/*
Get a parameter entity by name.
*/
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" SAX.getParameterEntity(%s)",name);
svg_info=(SVGInfo *) context;
return(xmlGetParameterEntity(svg_... | 0 | 18,963 |
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: key_ref_t lookup_user_key(key_serial_t id, unsigned long lflags,
key_perm_t perm)
{
struct request_key_auth *rka;
const struct cred *cred;
struct key *key;
key_ref_t key_ref, skey_ref;
int ret;
try_again:
cred = get_current_cred();
key_ref = ERR_PTR(-ENOKEY);
switch (id) {
case KEY_SPEC_THREAD_KEY... | 0 | 17,079 |
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 OPJ_OFF_T JP2SkipHandler(OPJ_OFF_T offset,void *context)
{
Image
*image;
image=(Image *) context;
return(SeekBlob(image,offset,SEEK_CUR) < 0 ? -1 : offset);
}
Commit Message: https://github.com/ImageMagick/ImageMagick/issues/501
CWE ID: CWE-20 | 0 | 24,432 |
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 DevToolsWindow::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
DCHECK_EQ(chrome::NOTIFICATION_BROWSER_THEME_CHANGED, type);
UpdateTheme();
}
Commit Message: DevTools: handle devtools re... | 0 | 10,314 |
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 Reset(double delta_x, double delta_y) {
message_loop_runner_ = new content::MessageLoopRunner;
remaining_delta_x_ = delta_x;
remaining_delta_y_ = delta_y;
scroll_end_received_ = false;
}
Commit Message: Add a check for disallowing remote frame navigations to local resources.
Previously,... | 0 | 18,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: parse_rock_ridge_inode_internal(struct iso_directory_record *de,
struct inode *inode, int flags)
{
int symlink_len = 0;
int cnt, sig;
unsigned int reloc_block;
struct inode *reloc;
struct rock_ridge *rr;
int rootflag;
struct rock_state rs;
int ret = 0;
if (!ISOFS_SB(inode->i_sb)->s_rock)
return 0;... | 0 | 11,790 |
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 writeGenerateFreshObject()
{
append(GenerateFreshObjectTag);
}
Commit Message: Replace further questionable HashMap::add usages in bindings
BUG=390928
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/411273002
git-svn-id: svn://svn.chromium.org/blink/trunk@178823 bbb... | 0 | 20,371 |
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 limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter(info);
TRACE_EVENT_SET... | 0 | 4,235 |
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 policy_vma(struct vm_area_struct *vma, struct mempolicy *new)
{
int err = 0;
struct mempolicy *old = vma->vm_policy;
pr_debug("vma %lx-%lx/%lx vm_ops %p vm_file %p set_policy %p\n",
vma->vm_start, vma->vm_end, vma->vm_pgoff,
vma->vm_ops, vma->vm_file,
vma->vm_ops ? vma->vm_ops->set_policy ... | 0 | 21,419 |
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 BlobStorageContext::RunOnConstructionBegin(
const std::string& uuid,
const BlobStatusCallback& done) {
BlobEntry* entry = registry_.GetEntry(uuid);
DCHECK(entry);
if (entry->status() == BlobStatus::PENDING_CONSTRUCTION) {
entry->building_state_->build_started_callbacks.push_back(done);
... | 0 | 27,273 |
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 V8Console::CommandLineAPIScope::accessorGetterCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
CommandLineAPIScope* scope = static_cast<CommandLineAPIScope*>(info.Data().As<v8::External>()->Value());
DCHECK(scope);
v8::Local<v8::Context> context = info.GetIso... | 0 | 25,155 |
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 numa_maps_open(struct inode *inode, struct file *file)
{
return do_maps_open(inode, file, &proc_pid_numa_maps_op);
}
Commit Message: proc: fix oops on invalid /proc/<pid>/maps access
When m_start returns an error, the seq_file logic will still call m_stop
with that error entry, so we'd better make s... | 0 | 15,300 |
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 OmniboxEditModel::SetSuggestionToPrefetch(
const InstantSuggestion& suggestion) {
delegate_->SetSuggestionToPrefetch(suggestion);
}
Commit Message: [OriginChip] Re-enable the chip as necessary when switching tabs.
BUG=369500
Review URL: https://codereview.chromium.org/292493003
git-svn-id: svn://sv... | 0 | 3,596 |
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 CL_Cache_EndGather_f( void ) {
int i, j, handle, cachePass;
char filename[MAX_QPATH];
cachePass = (int)floor( (float)cacheIndex * CACHE_HIT_RATIO );
for ( i = 0; i < CACHE_NUMGROUPS; i++ ) {
Q_strncpyz( filename, cacheGroups[i].name, MAX_QPATH );
Q_strcat( filename, MAX_QPATH, ".cache" );
... | 0 | 5,026 |
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 dev_unicast_flush(struct net_device *dev)
{
netif_addr_lock_bh(dev);
__hw_addr_flush(&dev->uc);
netif_addr_unlock_bh(dev);
}
Commit Message: veth: Dont kfree_skb() after dev_forward_skb()
In case of congestion, netif_rx() frees the skb, so we must assume
dev_forward_skb() also consume skb.
Bug i... | 0 | 10,193 |
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 SoundPool::unload(int sampleID)
{
ALOGV("unload: sampleID=%d", sampleID);
Mutex::Autolock lock(&mLock);
return mSamples.removeItem(sampleID);
}
Commit Message: DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread
Sample decoding still occurs in SoundPoolThread
without holding ... | 0 | 28,393 |
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: BrowserPolicyConnector::BrowserPolicyConnector()
: ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) {
managed_platform_provider_.reset(CreateManagedPlatformProvider());
recommended_platform_provider_.reset(CreateRecommendedPlatformProvider());
managed_cloud_provider_.reset(new CloudPolicyProviderI... | 0 | 11,416 |
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: xt_replace_table(struct xt_table *table,
unsigned int num_counters,
struct xt_table_info *newinfo,
int *error)
{
struct xt_table_info *private;
int ret;
ret = xt_jumpstack_alloc(newinfo);
if (ret < 0) {
*error = ret;
return NULL;
}
/* Do the substitution. */
local_bh_disable();
... | 0 | 14,764 |
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 GDataDirectory::TakeEntry(GDataEntry* entry) {
DCHECK(entry);
DCHECK(entry->parent());
entry->parent()->RemoveChild(entry);
AddEntry(entry);
return true;
}
Commit Message: gdata: Define the resource ID for the root directory
Per the spec, the resource ID for the root directory is defined
as "fo... | 0 | 27,343 |
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 smbXcli_req_cleanup(struct tevent_req *req,
enum tevent_req_state req_state)
{
struct smbXcli_req_state *state =
tevent_req_data(req,
struct smbXcli_req_state);
TALLOC_FREE(state->write_req);
switch (req_state) {
case TEVENT_REQ_RECEIVED:
/*
* Make sure we really remove it from
*... | 0 | 23,782 |
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 ldm_parse_tocblock (const u8 *data, struct tocblock *toc)
{
BUG_ON (!data || !toc);
if (MAGIC_TOCBLOCK != get_unaligned_be64(data)) {
ldm_crit ("Cannot find TOCBLOCK, database may be corrupt.");
return false;
}
strncpy (toc->bitmap1_name, data + 0x24, sizeof (toc->bitmap1_name));
toc->bitmap... | 0 | 24,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: SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
u64 persistent_fid, u64 volatile_fid, int index,
struct cifs_search_info *srch_inf)
{
struct smb2_query_directory_req *req;
struct smb2_query_directory_rsp *rsp = NULL;
struct kvec iov[2];
struct kvec rsp_iov;
int rc = 0;
int... | 0 | 14,691 |
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: xfs_attr_leaf_lasthash(
struct xfs_buf *bp,
int *count)
{
struct xfs_attr3_icleaf_hdr ichdr;
struct xfs_attr_leaf_entry *entries;
struct xfs_mount *mp = bp->b_target->bt_mount;
xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichdr, bp->b_addr);
entries = xfs_attr3_leaf_entryp(bp->b_addr);
if (count)
*co... | 0 | 1,383 |
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 detach_mnt(struct mount *mnt, struct path *old_path)
{
old_path->dentry = mnt->mnt_mountpoint;
old_path->mnt = &mnt->mnt_parent->mnt;
mnt->mnt_parent = mnt;
mnt->mnt_mountpoint = mnt->mnt.mnt_root;
list_del_init(&mnt->mnt_child);
hlist_del_init_rcu(&mnt->mnt_hash);
put_mountpoint(mnt->mnt_mp);
... | 0 | 25,037 |
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 GLES2DecoderPassthroughImpl::SetSurface(
const scoped_refptr<gl::GLSurface>& surface) {
DCHECK(context_->IsCurrent(nullptr));
DCHECK(surface_.get());
surface_ = surface;
}
Commit Message: Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
This makes the query of GL_COMPLETION_STATUS_KHR to programs much
ch... | 0 | 22,351 |
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_bad(unsigned long addr, unsigned int esr, struct pt_regs *regs)
{
return 1;
}
Commit Message: Revert "arm64: Introduce execute-only page access permissions"
This reverts commit bc07c2c6e9ed125d362af0214b6313dca180cb08.
While the aim is increased security for --x memory maps, it does not
protect ... | 0 | 10,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: std::string TestURLLoader::ReadEntireFile(pp::FileIO* file_io,
std::string* data) {
TestCompletionCallback callback(instance_->pp_instance(), callback_type());
char buf[256];
int64_t offset = 0;
for (;;) {
callback.WaitForResult(file_io->Read(offset, buf, siz... | 0 | 472 |
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::OpenEmptyWindow(Profile* profile) {
Browser* browser = Browser::Create(profile);
browser->AddBlankTab(true);
browser->window()->Show();
}
Commit Message: Implement a bubble that appears at the top of the screen when a tab enters
fullscreen mode via webkitRequestFullScreen(), telling the user... | 0 | 28,710 |
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: vmxnet3_on_tx_done_update_stats(VMXNET3State *s, int qidx,
Vmxnet3PktStatus status)
{
size_t tot_len = net_tx_pkt_get_total_len(s->tx_pkt);
struct UPT1_TxStats *stats = &s->txq_descr[qidx].txq_stats;
switch (status) {
case VMXNET3_PKT_STATUS_OK:
switch (net_tx_pkt_get_packet_type(s->t... | 0 | 26,207 |
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: generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
unsigned long *nr_segs, loff_t pos, loff_t *ppos,
size_t count, size_t ocount)
{
struct file *file = iocb->ki_filp;
struct address_space *mapping = file->f_mapping;
struct inode *inode = mapping->host;
ssize_t written;
if (count != ... | 0 | 3,854 |
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 assertLayoutTreeUpdated(Node& root)
{
for (Node& node : NodeTraversal::inclusiveDescendantsOf(root)) {
if (!node.isElementNode()
&& !node.isTextNode()
&& !node.isShadowRoot()
&& !node.isDocumentNode())
continue;
ASSERT(!node.needsStyl... | 0 | 18,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 Document::scheduleSVGFilterLayerUpdateHack(Element& element)
{
if (element.styleChangeType() == NeedsReattachStyleChange)
return;
element.setSVGFilterNeedsLayerUpdate();
m_layerUpdateSVGFilterElements.add(&element);
scheduleLayoutTreeUpdateIfNeeded();
}
Commit Message: Change Documen... | 0 | 1,422 |
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 VoidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
TestObject* impl = V8TestObject::ToImpl(info.Holder());
if (UNLIKELY(info.Length() < 1)) {
V8ThrowException::ThrowTypeError(info.GetIsolate(), ExceptionMessages::FailedToExecute("voidMethodPromiseArg", "TestObject",... | 0 | 1,631 |
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 sched_copy_attr(struct sched_attr __user *uattr,
struct sched_attr *attr)
{
u32 size;
int ret;
if (!access_ok(VERIFY_WRITE, uattr, SCHED_ATTR_SIZE_VER0))
return -EFAULT;
/*
* zero the full structure, so that a short copy will be nice.
*/
memset(attr, 0, sizeof(*attr));
ret = get_us... | 0 | 2,129 |
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: uint64_t skipped_mig_pages_transferred(void)
{
return acct_info.skipped_pages;
}
Commit Message:
CWE ID: CWE-20 | 0 | 10,265 |
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: fbCombineDisjointOutReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
{
fbCombineDisjointGeneralC (dest, src, mask, width, CombineBOut);
}
Commit Message:
CWE ID: CWE-189 | 0 | 3,135 |
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: selGetName(SEL *sel)
{
PROCNAME("selGetName");
if (!sel)
return (char *)ERROR_PTR("sel not defined", procName, NULL);
return sel->name;
}
Commit Message: Security fixes: expect final changes for release 1.75.3.
* Fixed a debian security issue with fscanf() reading a string with
possible ... | 0 | 28,518 |
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 BrowserPpapiHostImpl::IsPotentiallySecurePluginContext(
PP_Instance instance) {
auto it = instance_map_.find(instance);
if (it == instance_map_.end())
return false;
return it->second->renderer_data.is_potentially_secure_plugin_context;
}
Commit Message: Validate in-process plugin instance mess... | 0 | 14,643 |
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 nfsd4_cb_channel_good(struct nfs4_client *clp)
{
if (clp->cl_cb_state == NFSD4_CB_UP)
return true;
/*
* In the sessions case, since we don't have to establish a
* separate connection for callbacks, we assume it's OK
* until we hear otherwise:
*/
return clp->cl_minorversion && clp->cl_cb_s... | 0 | 25,368 |
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: CParaNdisTX::CParaNdisTX()
{ }
Commit Message: NetKVM: BZ#1169718: Checking the length only on read
Signed-off-by: Joseph Hindin <yhindin@rehat.com>
CWE ID: CWE-20 | 0 | 20,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: MagickExport Image *EnhanceImage(const Image *image,ExceptionInfo *exception)
{
#define EnhanceImageTag "Enhance/Image"
#define EnhancePixel(weight) \
mean=QuantumScale*((double) GetPixelRed(image,r)+pixel.red)/2.0; \
distance=QuantumScale*((double) GetPixelRed(image,r)-pixel.red); \
distance_squared=(4.0+... | 0 | 18,740 |
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 AXTree::DestroyNodeAndSubtree(AXNode* node,
AXTreeUpdateState* update_state) {
AXNodeData empty_data;
empty_data.id = node->id();
UpdateReverseRelations(node, empty_data);
const auto& table_info_entry = table_info_map_.find(node->id());
if (table_info_entry != ta... | 0 | 11,581 |
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::OnCopy() {
AutoResetMember<bool> handling_select_range(
this, &RenderFrameImpl::handling_select_range_, true);
frame_->ExecuteCommand(WebString::FromUTF8("Copy"));
}
Commit Message: If a page calls |window.focus()|, kick it out of fullscreen.
BUG=776418, 800056
Change-Id: I1880f... | 0 | 21,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: std::string GetDocumentMetadata(FPDF_DOCUMENT doc, const std::string& key) {
size_t size = FPDF_GetMetaText(doc, key.c_str(), nullptr, 0);
if (size == 0)
return std::string();
base::string16 value;
PDFiumAPIStringBufferSizeInBytesAdapter<base::string16> string_adapter(
&value, size, false);
s... | 0 | 9,873 |
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 SendCommandDebuggerFunction::SendResponseBody(
DictionaryValue* dictionary) {
Value* error_body;
if (dictionary->Get("error", &error_body)) {
base::JSONWriter::Write(error_body, false, &error_);
SendResponse(false);
return;
}
Value* result_body;
if (dictionary->Get("result", &resul... | 0 | 10,894 |
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 long set_instruction_bp(struct task_struct *child,
struct ppc_hw_breakpoint *bp_info)
{
int slot;
int slot1_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC1) != 0);
int slot2_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC2) != 0);
int slot3_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC3)... | 0 | 22,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: void CreateAppListShortcuts(
const base::FilePath& user_data_dir,
const string16& app_model_id,
const ShellIntegration::ShortcutLocations& creation_locations) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
std::vector<base::FilePath> shortcut_paths =
web_app::i... | 0 | 16,257 |
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 sctp_getsockopt_default_send_param(struct sock *sk,
int len, char __user *optval,
int __user *optlen)
{
struct sctp_sndrcvinfo info;
struct sctp_association *asoc;
struct sctp_sock *sp = sctp_sk(sk);
if (len != sizeof(struct sctp_sndrcvinfo))
return -EINVAL;
if (copy_from_user(&info, ... | 0 | 19,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: void fuse_force_forget(struct file *file, u64 nodeid)
{
struct inode *inode = file_inode(file);
struct fuse_conn *fc = get_fuse_conn(inode);
struct fuse_req *req;
struct fuse_forget_in inarg;
memset(&inarg, 0, sizeof(inarg));
inarg.nlookup = 1;
req = fuse_get_req_nofail_nopages(fc, file);
req->in.h.opcod... | 0 | 6,452 |
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 cirrus_vga_write_sr(CirrusVGAState * s, uint32_t val)
{
switch (s->vga.sr_index) {
case 0x00: // Standard VGA
case 0x01: // Standard VGA
case 0x02: // Standard VGA
case 0x03: // Standard VGA
case 0x04: // Standard VGA
s->vga.sr[s->vga.sr_index] = val & sr_mask[s->vga... | 0 | 21,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 BTM_SecSetConnectFilterCallback (tBTM_FILTER_CB *p_callback)
{
btm_cb.p_conn_filter_cb = p_callback;
}
Commit Message: DO NOT MERGE Remove Porsche car-kit pairing workaround
Bug: 26551752
Change-Id: I14c5e3fcda0849874c8a94e48aeb7d09585617e1
CWE ID: CWE-264 | 0 | 28,151 |
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(Phar, decompressFiles)
{
char *error;
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
return;
}
if (PHAR_G(readonly) && !phar_obj->archive->is_data) {
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0,
"Phar is readonly, cannot change compression");
return;
... | 0 | 29,911 |
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: set_default_script_user(const char *username, const char *groupname)
{
if (!default_script_uid_set || username) {
/* Even if we fail to set it, there is no point in trying again */
default_script_uid_set = true;
if (set_uid_gid(username, groupname, &default_script_uid, &default_script_gid, true)) {
if ... | 0 | 23,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: DebuggerFunction::DebuggerFunction()
: client_host_(NULL) {
}
Commit Message: Have the Debugger extension api check that it has access to the tab
Check PermissionsData::CanAccessTab() prior to attaching the debugger.
BUG=367567
Review URL: https://codereview.chromium.org/352523003
git-svn-id: svn://svn.c... | 0 | 15,290 |
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 InputHandler::openSelectPopup(HTMLSelectElement* select)
{
if (!select || select->disabled())
return false;
if (!select->document()->view())
return false;
if (isActiveTextEdit())
clearCurrentFocusElement();
m_currentFocusElement = select;
m_currentFocusElementTy... | 0 | 22,064 |
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 perf_pmu_nop_void(struct pmu *pmu)
{
}
Commit Message: perf: Remove the nmi parameter from the swevent and overflow interface
The nmi parameter indicated if we could do wakeups from the current
context, if not, we would set some state and self-IPI and let the
resulting interrupt do the wakeup.
For ... | 0 | 10,417 |
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 NavigatorImpl::NavigateToPendingEntry(
FrameTreeNode* frame_tree_node,
const FrameNavigationEntry& frame_entry,
ReloadType reload_type,
bool is_same_document_history_load) {
return NavigateToEntry(frame_tree_node, frame_entry,
*controller_->GetPendingEntry(), reload... | 0 | 8,485 |
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 clearCell(
MemPage *pPage, /* The page that contains the Cell */
unsigned char *pCell, /* First byte of the Cell */
CellInfo *pInfo /* Size information about the cell */
){
BtShared *pBt = pPage->pBt;
Pgno ovflPgno;
int rc;
int nOvfl;
u32 ovflPageSize;
assert( sq... | 0 | 6,350 |
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: FilePath DownloadItemImpl::GetFileNameToReportUser() const {
if (!display_name_.empty())
return display_name_;
return target_path_.BaseName();
}
Commit Message: Refactors to simplify rename pathway in DownloadFileManager.
This is https://chromiumcodereview.appspot.com/10668004 / r144817 (reverted
due t... | 0 | 12,045 |
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: base::string16 GetExternalDisplayName(int64_t external_display_id) {
DCHECK(!display::Display::IsInternalDisplayId(external_display_id));
display::DisplayManager* display_manager = GetDisplayManager();
DCHECK(!display_manager->IsInMirrorMode());
if (external_display_id == display::kInvalidDisplayId)
... | 0 | 7,252 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.