instruction stringclasses 1
value | input stringlengths 56 241k | output int64 0 1 | __index_level_0__ int64 0 175k |
|---|---|---|---|
Analyze the following 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 fuse_file_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
return fuse_ioctl_common(file, cmd, arg, 0);
}
Commit Message: fuse: break infinite loop in fuse_fill_write_pages()
I got a report about unkillable task eating CPU. Further
investigation shows, that the problem is in t... | 0 | 56,930 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: exp_build_l4proto_sctp(const struct nf_conntrack *ct, struct nethdr *n, int a)
{
ct_build_group(ct, ATTR_GRP_ORIG_PORT, n, a,
sizeof(struct nfct_attr_grp_port));
}
Commit Message:
CWE ID: CWE-17 | 0 | 1,447 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: flac_read_flac2i (SF_PRIVATE *psf, int *ptr, sf_count_t len)
{ FLAC_PRIVATE* pflac = (FLAC_PRIVATE*) psf->codec_data ;
sf_count_t total = 0, current ;
unsigned readlen ;
pflac->pcmtype = PFLAC_PCM_INT ;
while (total < len)
{ pflac->ptr = ptr + total ;
readlen = (len - total > 0x1000000) ? 0x1000000 : (un... | 0 | 67,113 |
Analyze the following 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 spd_fill_page(struct splice_pipe_desc *spd,
struct pipe_inode_info *pipe, struct page *page,
unsigned int *len, unsigned int offset,
bool linear,
struct sock *sk)
{
if (unlikely(spd->nr_pages == MAX_SKB_FRAGS))
return true;
if (linear) {
page = linear_to_page(page, len, &off... | 0 | 39,941 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: acpi_ns_print_node_pathname(struct acpi_namespace_node *node,
const char *message)
{
struct acpi_buffer buffer;
acpi_status status;
if (!node) {
acpi_os_printf("[NULL NAME]");
return;
}
/* Convert handle to full pathname and print it (with supplied message) */
buffer.length = ACPI_ALLOCATE_LOC... | 0 | 63,333 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: DynamicMetadataProvider::DynamicMetadataProvider(const DOMElement* e)
: AbstractMetadataProvider(e),
m_validate(XMLHelper::getAttrBool(e, false, validate)),
m_id(XMLHelper::getAttrString(e, "Dynamic", id)),
m_lock(RWLock::create()),
m_refreshDelayFactor(0.75),
m_minCa... | 1 | 164,622 |
Analyze the following 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 LayerTreeHostImpl::BindToClient(InputHandlerClient* client) {
DCHECK(input_handler_client_ == NULL);
input_handler_client_ = client;
}
Commit Message: (Reland) Discard compositor frames from unloaded web content
This is a reland of https://codereview.chromium.org/2707243005/ with a
small change to fix ... | 0 | 137,221 |
Analyze the following 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 BrowserView::ToggleBookmarkBar() {
bookmark_utils::ToggleWhenVisible(browser_->profile());
}
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/ch... | 0 | 118,461 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: WindowsRestructured(void)
{
DeviceIntPtr pDev = inputInfo.devices;
while (pDev) {
if (IsMaster(pDev) || IsFloating(pDev))
CheckMotion(NULL, pDev);
pDev = pDev->next;
}
}
Commit Message:
CWE ID: CWE-119 | 0 | 4,901 |
Analyze the following 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(xml_parser_create_ns)
{
php_xml_parser_create_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
Commit Message:
CWE ID: CWE-119 | 0 | 10,969 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static u16 prot_field_size(enum ib_signature_type type)
{
switch (type) {
case IB_SIG_TYPE_T10_DIF:
return MLX5_DIF_SIZE;
default:
return 0;
}
}
Commit Message: IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41... | 0 | 92,173 |
Analyze the following 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 WebGLRenderingContextBase::uniform1iv(const WebGLUniformLocation* location,
Vector<GLint>& v) {
if (isContextLost() ||
!ValidateUniformParameters("uniform1iv", location, v.data(), v.size(), 1,
0, v.size()))
return;
Con... | 0 | 133,883 |
Analyze the following 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 smp_task_timedout(struct timer_list *t)
{
struct sas_task_slow *slow = from_timer(slow, t, timer);
struct sas_task *task = slow->task;
unsigned long flags;
spin_lock_irqsave(&task->task_state_lock, flags);
if (!(task->task_state_flags & SAS_TASK_STATE_DONE))
task->task_state_flags |= SAS_TASK_... | 0 | 83,979 |
Analyze the following 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 __blk_mq_complete_request(struct request *rq)
{
struct request_queue *q = rq->q;
if (!q->softirq_done_fn)
blk_mq_end_request(rq, rq->errors);
else
blk_mq_ipi_complete_request(rq);
}
Commit Message: blk-mq: fix race between timeout and freeing request
Inside timeout handler, blk_mq_tag_to_rq() is ca... | 0 | 86,668 |
Analyze the following 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 r_pkcs7_free_signeddata (RPKCS7SignedData* sd) {
if (sd) {
r_pkcs7_free_digestalgorithmidentifier (&sd->digestAlgorithms);
r_pkcs7_free_contentinfo (&sd->contentInfo);
r_pkcs7_free_extendedcertificatesandcertificates (&sd->certificates);
r_pkcs7_free_certificaterevocationlists (&sd->crls);
r_pkcs7... | 0 | 67,750 |
Analyze the following 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 inode *inode_insert5(struct inode *inode, unsigned long hashval,
int (*test)(struct inode *, void *),
int (*set)(struct inode *, void *), void *data)
{
struct hlist_head *head = inode_hashtable + hash(inode->i_sb, hashval);
struct inode *old;
again:
spin_lock(&inode_hash_lock);
old = fin... | 0 | 79,841 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: DownloadItemTest()
: ui_thread_(BrowserThread::UI, &loop_),
file_thread_(BrowserThread::FILE, &loop_) {
}
Commit Message: Refactors to simplify rename pathway in DownloadFileManager.
This is https://chromiumcodereview.appspot.com/10668004 / r144817 (reverted
due to CrOS failure) with the comp... | 0 | 106,168 |
Analyze the following 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 netif_napi_add(struct net_device *dev, struct napi_struct *napi,
int (*poll)(struct napi_struct *, int), int weight)
{
INIT_LIST_HEAD(&napi->poll_list);
napi->gro_count = 0;
napi->gro_list = NULL;
napi->skb = NULL;
napi->poll = poll;
napi->weight = weight;
list_add(&napi->dev_list, &dev->napi_li... | 0 | 32,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: static void hid_scan_collection(struct hid_parser *parser, unsigned type)
{
struct hid_device *hid = parser->device;
int i;
if (((parser->global.usage_page << 16) == HID_UP_SENSOR) &&
type == HID_COLLECTION_PHYSICAL)
hid->group = HID_GROUP_SENSOR_HUB;
if (hid->vendor == USB_VENDOR_ID_MICROSOFT &&
... | 0 | 49,517 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Extension::InputComponentInfo::InputComponentInfo()
: type(INPUT_COMPONENT_TYPE_NONE),
shortcut_alt(false),
shortcut_ctrl(false),
shortcut_shift(false) {
}
Commit Message: Extend TTS extension API to support richer events returned from the engine
to the client. Previously we just had a comp... | 0 | 99,753 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SCTP_STATIC int sctp_setsockopt_connectx_old(struct sock* sk,
struct sockaddr __user *addrs,
int addrs_size)
{
return __sctp_setsockopt_connectx(sk, addrs, addrs_size, NULL);
}
Commit Message: net/sctp: Validate parameter size for SCTP_GET_ASSOC_STATS
Building sctp may fail with:
In functi... | 0 | 33,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: InspectorAgentRegistry::InspectorAgentRegistry(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* inspectorState)
: m_instrumentingAgents(instrumentingAgents)
, m_inspectorState(inspectorState)
{
}
Commit Message: DevTools: remove references to modules/device_orientation from core
BUG=... | 0 | 115,231 |
Analyze the following 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 OffscreenCanvas::HasPlaceholderCanvas() const {
return placeholder_canvas_id_ != kInvalidDOMNodeId;
}
Commit Message: Clean up CanvasResourceDispatcher on finalizer
We may have pending mojo messages after GC, so we want to drop the
dispatcher as soon as possible.
Bug: 929757,913964
Change-Id: I5789bcbb5... | 0 | 152,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: static void ide_dummy_transfer_stop(IDEState *s)
{
s->data_ptr = s->io_buffer;
s->data_end = s->io_buffer;
s->io_buffer[0] = 0xff;
s->io_buffer[1] = 0xff;
s->io_buffer[2] = 0xff;
s->io_buffer[3] = 0xff;
}
Commit Message:
CWE ID: CWE-399 | 0 | 6,733 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool GLES2DecoderImpl::InitializeShaderTranslator() {
if (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2 &&
(feature_info_->feature_flags().chromium_webglsl ||
force_webgl_glsl_validation_) &&
!use_shader_translator_) {
use_shader_translator_ = true;
}
if (!use_shader_tr... | 0 | 109,027 |
Analyze the following 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 PepperDeviceEnumerationHostHelper::OnEnumerateDevicesComplete(
int /* request_id */,
const std::vector<ppapi::DeviceRefData>& devices) {
DCHECK(enumerate_devices_context_.is_valid());
enumerate_.reset(NULL);
enumerate_devices_context_.params.set_result(PP_OK);
resource_host_->host()->SendRe... | 0 | 119,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: WebLayer* WebGLRenderingContextBase::PlatformLayer() const {
return isContextLost() ? 0 : GetDrawingBuffer()->PlatformLayer();
}
Commit Message: Reset ES3 pixel pack parameters and PIXEL_PACK_BUFFER binding in DrawingBuffer before ReadPixels() and recover them later.
BUG=740603
TEST=new conformance test
R=kbr... | 0 | 133,665 |
Analyze the following 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_create_principal(void *server_handle,
kadm5_principal_ent_t entry, long mask,
char *password)
{
return
kadm5_create_principal_3(server_handle, entry, mask,
0, NULL, password);
}
Commit Message: Return only new keys... | 0 | 36,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: SessionCommand* SessionService::CreateSetTabWindowCommand(
const SessionID& window_id,
const SessionID& tab_id) {
SessionID::id_type payload[] = { window_id.id(), tab_id.id() };
SessionCommand* command =
new SessionCommand(kCommandSetTabWindow, sizeof(payload));
memcpy(command->contents(), pay... | 0 | 108,806 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: nfssvc_encode_readres(struct svc_rqst *rqstp, __be32 *p,
struct nfsd_readres *resp)
{
p = encode_fattr(rqstp, p, &resp->fh, &resp->stat);
*p++ = htonl(resp->count);
xdr_ressize_check(rqstp, p);
/* now update rqstp->rq_res to reflect data as well */
rqstp->rq_res.page_len = resp->count;
if (resp->count... | 0 | 65,867 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: EventHandler::EventHandler( void (*f)(int), sigset_t m )
{
func = f;
mask = m;
is_installed = FALSE;
}
Commit Message:
CWE ID: CWE-134 | 0 | 16,555 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: unsigned TextTrackCue::CueIndex() {
DCHECK(track() && track()->cues());
TextTrackCueList* cue_list = track()->cues();
if (!cue_list->IsCueIndexValid(cue_index_))
cue_list->ValidateCueIndexes();
return cue_index_;
}
Commit Message: Support negative timestamps of TextTrackCue
Ensure proper behaviour f... | 0 | 125,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: int BufStream::lookChar(int idx) {
return buf[idx];
}
Commit Message:
CWE ID: CWE-119 | 0 | 3,995 |
Analyze the following 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 icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,
struct icmp6hdr *thdr, int len)
{
struct sk_buff *skb;
struct icmp6hdr *icmp6h;
int err = 0;
skb = skb_peek(&sk->sk_write_queue);
if (!skb)
goto out;
icmp6h = icmp6_hdr(skb);
memcpy(icmp6h, thdr, sizeof(struct icmp6hdr));
ic... | 0 | 47,685 |
Analyze the following 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 LvmEffect_free(EffectContext *pContext){
LVM_ReturnStatus_en LvmStatus=LVM_SUCCESS; /* Function call status */
LVM_ControlParams_t params; /* Control Parameters */
LVM_MemTab_t MemTab;
/* Free the algorithm memory */
LvmStatus = LVM_GetMemoryTable(pContext->pBundledContext->hInstance,
&MemT... | 0 | 157,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: assemble_algorithms(ServerOptions *o)
{
if (kex_assemble_names(KEX_SERVER_ENCRYPT, &o->ciphers) != 0 ||
kex_assemble_names(KEX_SERVER_MAC, &o->macs) != 0 ||
kex_assemble_names(KEX_SERVER_KEX, &o->kex_algorithms) != 0 ||
kex_assemble_names(KEX_DEFAULT_PK_ALG,
&o->hostkeyalgorithms) != 0 ||
... | 0 | 72,208 |
Analyze the following 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 ChromeContentUtilityClient::RegisterNetworkBinders(
service_manager::BinderRegistry* registry) {
if (g_network_binder_creation_callback.Get())
g_network_binder_creation_callback.Get().Run(registry);
}
Commit Message: Use pdf compositor service for printing when OOPIF is enabled
When OOPIF is enab... | 0 | 126,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: irc_server_gnutls_callback (void *data, gnutls_session_t tls_session,
const gnutls_datum_t *req_ca, int nreq,
const gnutls_pk_algorithm_t *pk_algos,
int pk_algos_len, gnutls_retr_st *answer)
{
struct t_irc_server *server;... | 1 | 164,713 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void ipv4_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu)
{
}
Commit Message: net: Compute protocol sequence numbers and fragment IDs using MD5.
Computers have become a lot faster since we compromised on the
partial MD4 hash which we use currently for performance reasons.
MD5 is a much safer ch... | 0 | 25,141 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static bool send_app_connect_signal(int fd, const bt_bdaddr_t* addr, int channel, int status, int send_fd) {
sock_connect_signal_t cs;
cs.size = sizeof(cs);
cs.bd_addr = *addr;
cs.channel = channel;
cs.status = status;
cs.max_rx_packet_size = 0; // not used for RFCOMM
cs.max_tx_packet_size = 0; // no... | 0 | 158,896 |
Analyze the following 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, copy)
{
char *oldfile, *newfile, *error;
const char *pcr_error;
size_t oldfile_len, newfile_len;
phar_entry_info *oldentry, newentry = {0}, *temp;
int tmp_len = 0;
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &oldfile, &oldfile_len, &newfile, &ne... | 1 | 165,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 nx842_exit(struct crypto_tfm *tfm)
{
struct nx842_ctx *ctx = crypto_tfm_ctx(tfm);
kfree(ctx->nx842_wmem);
}
Commit Message: crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so we never run
the risk of exposing module auto-loading to userspace... | 0 | 47,095 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: rend_service_allow_non_anonymous_connection(const or_options_t *options)
{
tor_assert(rend_service_non_anonymous_mode_consistent(options));
return options->HiddenServiceSingleHopMode ? 1 : 0;
}
Commit Message: Fix log-uninitialized-stack bug in rend_service_intro_established.
Fixes bug 23490; bugfix on 0.2.... | 0 | 69,603 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: check_auth (const struct url *u, char *user, char *passwd, struct response *resp,
struct request *req, bool *ntlm_seen_ref, bool *retry,
bool *basic_auth_finished_ref, bool *auth_finished_ref)
{
uerr_t auth_err = RETROK;
bool basic_auth_finished = *basic_auth_finished_ref;
bool auth_... | 0 | 15,470 |
Analyze the following 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_parse_islice_data_cabac(dec_struct_t * ps_dec,
dec_slice_params_t * ps_slice,
UWORD16 u2_first_mb_in_slice)
{
UWORD8 uc_more_data_flag;
UWORD8 u1_num_mbs, u1_mb_idx;
dec_mb_info_t *ps_cur_mb_info;
deblk_mb_t *ps_cur_deblk_mb;
dec_bit_stream_t * cons... | 0 | 161,527 |
Analyze the following 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 read_wvc_block (WavpackContext *wpc)
{
WavpackStream *wps = wpc->streams [wpc->current_stream];
int64_t bcount, file2pos;
WavpackHeader orig_wphdr;
WavpackHeader wphdr;
int compare_result;
while (1) {
file2pos = wpc->reader->get_pos (wpc->wvc_in);
bcount = read_next_he... | 0 | 70,901 |
Analyze the following 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 fuse_fsync(struct file *file, loff_t start, loff_t end,
int datasync)
{
return fuse_fsync_common(file, start, end, datasync, 0);
}
Commit Message: fuse: break infinite loop in fuse_fill_write_pages()
I got a report about unkillable task eating CPU. Further
investigation shows, that the probl... | 0 | 56,938 |
Analyze the following 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 AudioRendererHost::OnCreated(media::AudioOutputController* controller) {
BrowserThread::PostTask(
BrowserThread::IO,
FROM_HERE,
base::Bind(
&AudioRendererHost::DoCompleteCreation,
this,
make_scoped_refptr(controller)));
}
Commit Message: Improve validation w... | 0 | 118,569 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: const AtomicString& HTMLInputElement::defaultValue() const
{
return fastGetAttribute(valueAttr);
}
Commit Message: Add HTMLFormControlElement::supportsAutofocus to fix a FIXME comment.
This virtual function should return true if the form control can hanlde
'autofocucs' attribute if it is specified.
Note: H... | 0 | 113,970 |
Analyze the following 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 vmx_set_vmx_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
/*
* Don't allow changes to the VMX capability MSRs while the vCPU
* is in VMX operation.
*/
if (vmx->nested.vmxon)
return -EBUSY;
switch (msr_index) {
case MSR_IA32_VMX_BASIC:
return... | 0 | 81,077 |
Analyze the following 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 control_intr(struct virtqueue *vq)
{
struct ports_device *portdev;
portdev = vq->vdev->priv;
schedule_work(&portdev->control_work);
}
Commit Message: virtio-console: avoid DMA from stack
put_chars() stuffs the buffer it gets into an sg, but that buffer may be
on the stack. This breaks with CONFI... | 0 | 66,579 |
Analyze the following 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 ImageBitmapFactories::ImageBitmapLoader::RejectPromise(
ImageBitmapRejectionReason reason) {
switch (reason) {
case kUndecodableImageBitmapRejectionReason:
resolver_->Reject(
DOMException::Create(DOMExceptionCode::kInvalidStateError,
"The source image... | 1 | 173,069 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ClientStateNotification::~ClientStateNotification() {}
Commit Message: Convert plugin and GPU process to brokered handle duplication.
BUG=119250
Review URL: https://chromiumcodereview.appspot.com/9958034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132303 0039d316-1c4b-4281-b951-d872f2087c98
CWE ID: | 0 | 107,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: void Browser::CreateHistoricalTab(TabContentsWrapper* contents) {
if (!profile() || profile()->IsOffTheRecord())
return;
if (contents->tab_contents()->GetURL() == GURL(chrome::kChromeUIPrintURL))
return;
TabRestoreService* service =
TabRestoreServiceFactory::GetForProfile(profile());
if (... | 0 | 97,177 |
Analyze the following 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::SetLastFocusType(WebFocusType last_focus_type) {
last_focus_type_ = last_focus_type;
}
Commit Message: Cleanup and remove dead code in SetFocusedElement
This early-out was added in:
https://crrev.com/ce8ea3446283965c7eabab592cbffe223b1cf2bc
Back then, we applied fragment focus in LayoutUpdate... | 0 | 129,865 |
Analyze the following 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 PaintArtifactCompositor::WillBeRemovedFromFrame() {
RemoveChildLayers();
}
Commit Message: Reland "[CI] Make paint property nodes non-ref-counted"
This reverts commit 887383b30842d9d9006e11bb6932660a3cb5b1b7.
Reason for revert: Retry in M69.
Original change's description:
> Revert "[CI] Make paint prop... | 0 | 125,543 |
Analyze the following 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 pstore *get_info(struct dm_exception_store *store)
{
return (struct pstore *) store->context;
}
Commit Message: dm snapshot: fix data corruption
This patch fixes a particular type of data corruption that has been
encountered when loading a snapshot's metadata from disk.
When we allocate a new ch... | 0 | 29,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: static void on_no_comment_toggled(GtkToggleButton *togglebutton, gpointer user_data)
{
toggle_eb_comment();
}
Commit Message: wizard: fix save users changes after reviewing dump dir files
If the user reviewed the dump dir's files during reporting the crash, the
changes was thrown away and original data was ... | 0 | 42,850 |
Analyze the following 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 DefaultTabHandler::TabStripEmpty() {
delegate_->AsBrowser()->TabStripEmpty();
}
Commit Message: chromeos: fix bug where "aw snap" page replaces first tab if it was a NTP when closing window with > 1 tab.
BUG=chromium-os:12088
TEST=verify bug per bug report.
Review URL: http://codereview.chromium.org/6882... | 0 | 98,063 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: jas_image_fmtinfo_t *jas_image_lookupfmtbyname(const char *name)
{
int i;
jas_image_fmtinfo_t *fmtinfo;
for (i = 0, fmtinfo = jas_image_fmtinfos; i < jas_image_numfmts; ++i, ++fmtinfo) {
if (!strcmp(fmtinfo->name, name)) {
return fmtinfo;
}
}
return 0;
}
Commit Message: The generation of the configu... | 0 | 72,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: static BOOL freerdp_peer_get_fds(freerdp_peer* client, void** rfds, int* rcount)
{
rfds[*rcount] = (void*)(long)(client->context->rdp->transport->TcpIn->sockfd);
(*rcount)++;
return TRUE;
}
Commit Message: nla: invalidate sec handle after creation
If sec pointer isn't invalidated after creation it is not po... | 0 | 58,540 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: long Chapters::Atom::Parse(IMkvReader* pReader, long long pos, long long size) {
const long long stop = pos + size;
while (pos < stop) {
long long id, size;
long status = ParseElementHeader(pReader, pos, stop, id, size);
if (status < 0) // error
return status;
if (size == 0) // weird
continue;
if (i... | 0 | 164,271 |
Analyze the following 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 SetRecordActionTaskRunner(
scoped_refptr<SingleThreadTaskRunner> task_runner) {
DCHECK(task_runner->BelongsToCurrentThread());
DCHECK(!g_task_runner.Get() || g_task_runner.Get()->BelongsToCurrentThread());
g_task_runner.Get() = task_runner;
}
Commit Message: Convert Uses of base::RepeatingCallback... | 0 | 130,660 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: archive_write_client_open(struct archive_write_filter *f)
{
struct archive_write *a = (struct archive_write *)f->archive;
struct archive_none *state;
void *buffer;
size_t buffer_size;
f->bytes_per_block = archive_write_get_bytes_per_block(f->archive);
f->bytes_in_last_block =
archive_write_get_bytes_i... | 0 | 34,060 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: virDomainGetOSType(virDomainPtr domain)
{
virConnectPtr conn;
VIR_DOMAIN_DEBUG(domain);
virResetLastError();
virCheckDomainReturn(domain, NULL);
conn = domain->conn;
if (conn->driver->domainGetOSType) {
char *ret;
ret = conn->driver->domainGetOSType(domain);
if ... | 0 | 93,817 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ops_expand(regex_t* reg, int n)
{
#define MIN_OPS_EXPAND_SIZE 4
#ifdef USE_DIRECT_THREADED_CODE
enum OpCode* cp;
#endif
Operation* p;
size_t size;
if (n <= 0) n = MIN_OPS_EXPAND_SIZE;
n += reg->ops_alloc;
size = sizeof(Operation) * n;
p = (Operation* )xrealloc(reg->ops, size);
CHECK_NULL_RET... | 0 | 89,200 |
Analyze the following 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 void Init() {
#if defined(OS_WIN)
CoInitialize(NULL);
#endif
render_process_ = new RenderProcessImpl();
render_process_->set_main_thread(new RenderThread(channel_id_));
base::Thread::SetThreadWasQuitProperly(true);
}
Commit Message: DevTools: move DevToolsAgent/Client into content.
... | 0 | 98,795 |
Analyze the following 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 jas_icctxtdesc_copy(jas_iccattrval_t *attrval,
jas_iccattrval_t *othattrval)
{
jas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc;
/* Avoid compiler warnings about unused parameters. */
attrval = 0;
othattrval = 0;
txtdesc = 0;
/* Not yet implemented. */
abort();
return -1;
}
Commit Messag... | 0 | 72,739 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void LayoutBlockFlow::moveAllChildrenIncludingFloatsTo(LayoutBlock* toBlock, bool fullRemoveInsert)
{
LayoutBlockFlow* toBlockFlow = toLayoutBlockFlow(toBlock);
moveAllChildrenTo(toBlockFlow, fullRemoveInsert);
if (m_floatingObjects) {
if (!toBlockFlow->m_floatingObjects)
toBlockF... | 0 | 123,022 |
Analyze the following 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 DocumentLoader::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Loader);
info.addMember(m_frame, "frame");
info.addMember(m_cachedResourceLoader, "cachedResourceLoader");
info.addMember(m_mainResource, "mainResourc... | 0 | 105,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: PassRefPtrWillBeRawPtr<Element> Document::createElementNS(const AtomicString& namespaceURI, const AtomicString& qualifiedName, const AtomicString& typeExtension, ExceptionState& exceptionState)
{
QualifiedName qName(createQualifiedName(namespaceURI, qualifiedName, exceptionState));
if (qName == QualifiedN... | 0 | 124,319 |
Analyze the following 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 RenderViewImpl::runModalPromptDialog(WebFrame* frame,
const WebString& message,
const WebString& default_value,
WebString* actual_value) {
string16 result;
bool ok = RunJavaScript... | 0 | 115,640 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int process_bf_mask(struct iwbmprcontext *rctx, int k)
{
rctx->bf_high_bit[k] = find_high_bit(rctx->bf_mask[k]);
rctx->bf_low_bit[k] = find_low_bit(rctx->bf_mask[k]);
rctx->bf_bits_count[k] = 1+rctx->bf_high_bit[k]-rctx->bf_low_bit[k];
if(rctx->bf_high_bit[k] > (int)(rctx->bitcount-1)) return 0;
if(... | 0 | 64,883 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: type_char(png_uint_32 v)
{
/* In fact because chunk::chunk_type is validated prior to any call to this
* function it will always return a-zA-Z, but the extra codes are just there
* to help in finding internal (programming) errors. Note that the code only
* ever considers the low 7 bits of the value ... | 0 | 160,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: MagickExport ExceptionInfo *CloneExceptionInfo(ExceptionInfo *exception)
{
ExceptionInfo
*clone_exception;
clone_exception=(ExceptionInfo *) AcquireMagickMemory(sizeof(*exception));
if (clone_exception == (ExceptionInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");... | 0 | 71,406 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: evutil_global_setup_locks_(const int enable_locks)
{
return 0;
}
Commit Message: evutil_parse_sockaddr_port(): fix buffer overflow
@asn-the-goblin-slayer:
"Length between '[' and ']' is cast to signed 32 bit integer on line 1815. Is
the length is more than 2<<31 (INT_MAX), len will hold a negative value.
... | 0 | 70,736 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: read_png(struct control *control)
/* Read a PNG, return 0 on success else an error (status) code; a bit mask as
* defined for file::status_code as above.
*/
{
png_structp png_ptr;
png_infop info_ptr = NULL;
volatile png_bytep row = NULL, display = NULL;
volatile int rc;
png_ptr = p... | 1 | 173,738 |
Analyze the following 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 testIpSixFail() {
URI_TEST_IP_SIX_FAIL("::12345");
URI_TEST_IP_SIX_FAIL("abcd::abcd::abcd");
URI_TEST_IP_SIX_FAIL(":::1234");
URI_TEST_IP_SIX_FAIL("1234:::1234:1234");
URI_TEST_IP_SIX_FAIL("1234:1234:::1234");
URI_TEST_IP_SIX_FAIL("1234:::");
URI_TEST_IP_SIX_FAIL("1.2.3.4");
URI_TEST_IP_S... | 0 | 75,739 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: error::Error GLES2DecoderPassthroughImpl::DoGetRequestableExtensionsCHROMIUM(
const char** extensions) {
*extensions = reinterpret_cast<const char*>(
api()->glGetStringFn(GL_REQUESTABLE_EXTENSIONS_ANGLE));
return error::kNoError;
}
Commit Message: Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
This make... | 0 | 142,010 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: icc_base_conv_pixmap(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots)
{
fz_colorspace *srcs = src->colorspace;
fz_colorspace *base_cs = get_base_icc_space(ctx, srcs);
int i, j;
unsigned char *inp... | 0 | 415 |
Analyze the following 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 create_window(PluginInstance *plugin, NPWindow *window)
{
if (plugin->is_windowless) {
destroy_window_attributes(plugin->window.ws_info);
plugin->window.ws_info = NULL;
}
assert(plugin->window.ws_info == NULL);
NPSetWindowCallbackStruct *ws_info;
if ((ws_info = NPW_MemClone(NPSetWindowCall... | 0 | 27,022 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: WebContents* WebContentsImpl::Clone() {
CreateParams create_params(GetBrowserContext(), GetSiteInstance());
create_params.initial_size = GetContainerBounds().size();
FrameTreeNode* opener = frame_tree_.root()->opener();
RenderFrameHostImpl* opener_rfh = nullptr;
if (opener)
opener_rfh = opener->curr... | 0 | 147,687 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: _gnutls_encrypt (gnutls_session_t session, const uint8_t * headers,
size_t headers_size, const uint8_t * data,
size_t data_size, uint8_t * ciphertext,
size_t ciphertext_size, content_type_t type,
record_parameters_st * params)
{
gnutls_datum_t... | 0 | 11,306 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ikev1_ke_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext, u_int item_len _U_,
const u_char *ep _U_, uint32_t phase _U_, uint32_t doi _U_,
uint32_t proto _U_, int depth _U_)
{
struct isakmp_gen e;
ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_KE)));
ND_TCHECK(*e... | 0 | 93,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 ovl_set_opaque(struct dentry *upperdentry)
{
return ovl_do_setxattr(upperdentry, OVL_XATTR_OPAQUE, "y", 1, 0);
}
Commit Message: ovl: verify upper dentry before unlink and rename
Unlink and rename in overlayfs checked the upper dentry for staleness by
verifying upper->d_parent against upperdir. How... | 0 | 51,070 |
Analyze the following 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 dentry *d_alloc_name(struct dentry *parent, const char *name)
{
struct qstr q;
q.name = name;
q.len = strlen(name);
q.hash = full_name_hash(q.name, q.len);
return d_alloc(parent, &q);
}
Commit Message: dcache: Handle escaped paths in prepend_path
A rename can result in a dentry that by walking up d... | 0 | 94,588 |
Analyze the following 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 ChromeContentBrowserClient::ClearCache(RenderViewHost* rvh) {
Profile* profile = rvh->site_instance()->GetProcess()->profile();
BrowsingDataRemover* remover = new BrowsingDataRemover(profile,
BrowsingDataRemover::EVERYTHING,
base::Time());
remover->Remove(BrowsingDataRemover::REMOVE_CACHE);... | 0 | 98,728 |
Analyze the following 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 implicit_weight_table(H264Context *h, int field)
{
int ref0, ref1, i, cur_poc, ref_start, ref_count0, ref_count1;
for (i = 0; i < 2; i++) {
h->luma_weight_flag[i] = 0;
h->chroma_weight_flag[i] = 0;
}
if (field < 0) {
if (h->picture_structure == PICT_FRAME) {... | 0 | 28,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: MockP2PQuicStreamDelegate* stream_delegate() const {
return stream_delegate_.get();
}
Commit Message: P2PQuicStream write functionality.
This adds the P2PQuicStream::WriteData function and adds tests. It also
adds the concept of a write buffered amount, enforcing this at the
P2PQuicStreamImpl.
Bug: 874... | 0 | 132,769 |
Analyze the following 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 GetMimeTypeForPath(const std::string& path) {
std::string filename = PathWithoutParams(path);
if (base::EndsWith(filename, ".html", base::CompareCase::INSENSITIVE_ASCII)) {
return "text/html";
} else if (base::EndsWith(filename, ".css",
base::CompareCase::INSENSI... | 0 | 140,228 |
Analyze the following 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 RecordDownloadConnectionSecurity(const GURL& download_url,
const std::vector<GURL>& url_chain) {
UMA_HISTOGRAM_ENUMERATION(
"Download.TargetConnectionSecurity",
CheckDownloadConnectionSecurity(download_url, url_chain),
DOWNLOAD_CONNECTION_SECURITY_MAX... | 0 | 153,398 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: StyleSheetCSSRuleList(CSSStyleSheet* sheet) : style_sheet_(sheet) {}
Commit Message: Disallow access to opaque CSS responses.
Bug: 848786
Change-Id: Ie53fbf644afdd76d7c65649a05c939c63d89b4ec
Reviewed-on: https://chromium-review.googlesource.com/1088335
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Commit-Que... | 0 | 153,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: int restrict_link_reject(struct key *keyring,
const struct key_type *type,
const union key_payload *payload,
struct key *restriction_key)
{
return -EPERM;
}
Commit Message: KEYS: Fix race between updating and finding a negative key
Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the reject... | 0 | 60,255 |
Analyze the following 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 ExtensionDevToolsClientHost::MayAttachToBrowser() {
return false;
}
Commit Message: [DevTools] Do not allow Page.setDownloadBehavior for extensions
Bug: 866426
Change-Id: I71b672978e1a8ec779ede49da16b21198567d3a4
Reviewed-on: https://chromium-review.googlesource.com/c/1270007
Commit-Queue: Dmitry Gozman ... | 0 | 143,572 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: brcmf_cfg80211_change_station(struct wiphy *wiphy, struct net_device *ndev,
const u8 *mac, struct station_parameters *params)
{
struct brcmf_if *ifp = netdev_priv(ndev);
s32 err;
brcmf_dbg(TRACE, "Enter, MAC %pM, mask 0x%04x set 0x%04x\n", mac,
params->sta_flags_mask, params->sta_flags_set);
/*... | 0 | 49,000 |
Analyze the following 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 GLES2Implementation::GetUniformIndices(GLuint program,
GLsizei count,
const char* const* names,
GLuint* indices) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << Ge... | 0 | 141,042 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool HttpProxyClientSocket::IsUsingSpdy() const {
return using_spdy_;
}
Commit Message: Sanitize headers in Proxy Authentication Required responses
BUG=431504
Review URL: https://codereview.chromium.org/769043003
Cr-Commit-Position: refs/heads/master@{#310014}
CWE ID: CWE-19 | 0 | 129,333 |
Analyze the following 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 opfistp(RAsm *a, ut8 *data, const Opcode *op) {
int l = 0;
switch (op->operands_count) {
case 1:
if ( op->operands[0].type & OT_MEMORY ) {
if ( op->operands[0].type & OT_WORD ) {
data[l++] = 0xdf;
data[l++] = 0x18 | op->operands[0].regs[0];
} else if ( op->operands[0].type & OT_DWORD... | 0 | 75,402 |
Analyze the following 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 __nfs4_read_done_cb(struct nfs_read_data *data)
{
nfs_invalidate_atime(data->inode);
}
Commit Message: Fix length of buffer copied in __nfs4_get_acl_uncached
_copy_from_pages() used to copy data from the temporary buffer to the
user passed buffer is passed the wrong size parameter when copying
data. res.a... | 0 | 19,801 |
Analyze the following 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 RecordContentLengthHistograms(
int64 received_content_length,
int64 original_content_length,
const base::TimeDelta& freshness_lifetime) {
#if defined(OS_ANDROID)
if (original_content_length >= 0) {
UMA_HISTOGRAM_COUNTS("Net.HttpContentLengthWithValidOCL",
received_... | 0 | 113,577 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.