instruction
stringclasses
1 value
input
stringlengths
56
235k
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'. Remember, I want response in '1' or '0', No explanation.
Code: irc_server_send_signal (struct t_irc_server *server, const char *signal, const char *command, const char *full_message, const char *tags) { int length; char *str_signal, *full_message_tags; length = strlen (server->name) + 1 + strlen (signal) + 1 + ...
0
3,514
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static int imap_tags_edit(struct Context *ctx, const char *tags, char *buf, size_t buflen) { char *new = NULL; char *checker = NULL; struct ImapData *idata = (struct ImapData *) ctx->data; /* Check for \* flags capability */ if (!imap_has_flag(&idata->flags, NULL)) { mutt_error(_("IMAP server doe...
0
79,610
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: bool IsSelecting() { return window_selector_controller()->IsSelecting(); } Commit Message: cros: Enable some tests in //ash/wm in ash_unittests --mash For the ones that fail, disable them via filter file instead of in the code, per our disablement policy. Bug: 698085, 695556, 698878, 698888, 698093, 698894 T...
0
133,218
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static int comm_open(struct inode *inode, struct file *filp) { return single_open(filp, comm_show, inode); } Commit Message: proc: restrict access to /proc/PID/io /proc/PID/io may be used for gathering private information. E.g. for openssh and vsftpd daemons wchars/rchars may be used to learn the precise pas...
0
26,805
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: const struct sockaddr_storage *smbXcli_conn_remote_sockaddr(struct smbXcli_conn *conn) { return &conn->remote_ss; } Commit Message: CWE ID: CWE-20
0
2,466
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: encode_SET_L4_SRC_PORT(const struct ofpact_l4_port *l4_port, enum ofp_version ofp_version, struct ofpbuf *out) { uint8_t proto = l4_port->flow_ip_proto; enum mf_field_id field = (proto == IPPROTO_TCP ? MFF_TCP_SRC : proto == IPPROTO_UDP ? MFF_UDP_SRC ...
0
76,895
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static void sycc444_to_rgb(opj_image_t *img) { int *d0, *d1, *d2, *r, *g, *b; const int *y, *cb, *cr; size_t maxw, maxh, max, i; int offset, upb; upb = (int)img->comps[0].prec; offset = 1 << (upb - 1); upb = (1 << upb) - 1; maxw = (size_t)img->comps[0].w; maxh = (size_t)img->...
0
91,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'. Remember, I want response in '1' or '0', No explanation.
Code: static int rtecp_decipher(sc_card_t *card, const u8 *data, size_t data_len, u8 *out, size_t out_len) { int r; assert(card && card->ctx && data && out); /* decipher */ r = rtecp_cipher(card, data, data_len, out, out_len, 0); SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_VERBOSE, r); } Commit Message: fixed out o...
0
78,670
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void br_netfilter_fini(void) { nf_unregister_hooks(br_nf_ops, ARRAY_SIZE(br_nf_ops)); #ifdef CONFIG_SYSCTL unregister_sysctl_table(brnf_sysctl_header); #endif dst_entries_destroy(&fake_dst_ops); } Commit Message: bridge: reset IPCB in br_parse_ip_options Commit 462fb2af9788a82 (bridge : Sanitize skb before i...
0
34,704
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: bool GesturePoint::IsInDoubleClickWindow(const TouchEvent& event) const { return IsInSecondClickTimeWindow() && IsSecondClickInsideManhattanSquare(event); } Commit Message: Add setters for the aura gesture recognizer constants. BUG=113227 TEST=none Review URL: http://codereview.chromium.org/9372040 ...
0
108,727
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void ReadableStreamReader::error() { ASSERT(isActive()); m_closed->reject(m_stream->storedException()); } Commit Message: Remove blink::ReadableStream This CL removes two stable runtime enabled flags - ResponseConstructedWithReadableStream - ResponseBodyWithV8ExtraStream and related code including bli...
0
120,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'. Remember, I want response in '1' or '0', No explanation.
Code: unsigned HTMLSelectElement::length() const { unsigned options = 0; const Vector<HTMLElement*>& items = listItems(); for (unsigned i = 0; i < items.size(); ++i) { if (items[i]->hasTagName(optionTag)) ++options; } return options; } Commit Message: SelectElement should remo...
0
103,076
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: ProcPanoramiXQueryVersion(ClientPtr client) { /* REQUEST(xPanoramiXQueryVersionReq); */ xPanoramiXQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = SERVER_PANORAMIX_MAJOR_VERSION, .minorVersion = SERVER_PANOR...
0
17,378
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void FrameLoader::receivedMainResourceError(const ResourceError& error) { RefPtr<Frame> protect(m_frame); RefPtr<DocumentLoader> loader = activeDocumentLoader(); if (m_frame->document()->parser()) m_frame->document()->parser()->stopParsing(); ResourceError c(ResourceError::cancelledError...
0
111,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'. Remember, I want response in '1' or '0', No explanation.
Code: static inline int mov_get_stsc_samples(MOVStreamContext *sc, int index) { int chunk_count; if (mov_stsc_index_valid(index, sc->stsc_count)) chunk_count = sc->stsc_data[index + 1].first - sc->stsc_data[index].first; else chunk_count = sc->chunk_count - (sc->stsc_data[index].first - 1);...
0
61,391
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void WebGLRenderingContextBase::RestoreScissorBox() { if (isContextLost()) return; ContextGL()->Scissor(scissor_box_[0], scissor_box_[1], scissor_box_[2], scissor_box_[3]); } Commit Message: Reset ES3 pixel pack parameters and PIXEL_PACK_BUFFER binding in DrawingBuffer before Read...
0
133,682
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void DevToolsWindow::ActivateWindow() { if (IsDocked() && GetInspectedBrowserWindow()) web_contents_->GetView()->Focus(); else if (!IsDocked() && !browser_->window()->IsActive()) browser_->window()->Activate(); } Commit Message: DevTools: handle devtools renderer unresponsiveness during beforeunload ...
0
113,124
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static irqreturn_t airo_interrupt(int irq, void *dev_id) { struct net_device *dev = dev_id; u16 status, savedInterrupts = 0; struct airo_info *ai = dev->ml_priv; int handled = 0; if (!netif_device_present(dev)) return IRQ_NONE; for (;;) { status = IN4500(ai, EVSTAT); if (!(status & STATUS_INTS) || (...
0
23,974
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void NavigationController::UpdateVirtualURLToURL( NavigationEntry* entry, const GURL& new_url) { GURL new_virtual_url(new_url); if (BrowserURLHandler::ReverseURLRewrite( &new_virtual_url, entry->virtual_url(), profile_)) { entry->set_virtual_url(new_virtual_url); } } Commit Message: Ensur...
0
99,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'. Remember, I want response in '1' or '0', No explanation.
Code: int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir) { unsigned int nr; struct task_struct *reaper; struct tgid_iter iter; struct pid_namespace *ns; if (filp->f_pos >= PID_MAX_LIMIT + TGID_OFFSET) goto out_no_task; nr = filp->f_pos - FIRST_PROCESS_ENTRY; reaper = get_proc_task(fil...
0
26,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'. Remember, I want response in '1' or '0', No explanation.
Code: void WebContentsImpl::DidRedirectNavigation( NavigationHandle* navigation_handle) { for (auto& observer : observers_) observer.DidRedirectNavigation(navigation_handle); if (navigation_handle->GetReloadType() != ReloadType::NONE) { NavigationHandleImpl* nhi = static_cast<NavigationHandleIm...
0
135,676
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: compat_do_ipt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len) { int ret; if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) return -EPERM; switch (cmd) { case IPT_SO_GET_INFO: ret = get_info(sock_net(sk), user, len, 1); break; case IPT_SO_GET_ENTRIES: ret = compat_get_entries(soc...
0
52,281
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static uint8_t msix_pending_mask(int vector) { return 1 << (vector % 8); } Commit Message: CWE ID: CWE-476
0
15,884
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: connected_cell_format_payload(uint8_t *payload_out, const tor_addr_t *addr, uint32_t ttl) { const sa_family_t family = tor_addr_family(addr); int connected_payload_len; /* should be needless */ memset(payload_out, 0, MAX_CONNECTED_CELL_PAYLOAD_L...
0
69,884
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static inline int crash_local_vmclear_enabled(int cpu) { return cpumask_test_cpu(cpu, &crash_vmclear_enabled_bitmap); } Commit Message: x86,kvm,vmx: Preserve CR4 across VM entry CR4 isn't constant; at least the TSD and PCE bits can vary. TBH, treating CR0 and CR3 as constant scares me a bit, too, but it looks...
0
37,029
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: virtual ~WindowedPersonalDataManagerObserver() { if (!infobar_service_) return; InfoBarDelegate* infobar = NULL; if (infobar_service_->GetInfoBarCount() > 0 && (infobar = infobar_service_->GetInfoBarDelegateAt(0))) { infobar_service_->RemoveInfoBar(infobar); } } Commit Me...
0
118,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'. Remember, I want response in '1' or '0', No explanation.
Code: bool ExtensionApiTest::RunExtensionTestWithArg( const std::string& extension_name, const char* custom_arg) { return RunExtensionTestImpl(extension_name, std::string(), custom_arg, kFlagEnableFileAccess); } Commit Message: Hide DevTools frontend from webRequest API Prevent...
0
146,577
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname) { struct qstr name = { .name = "" }; struct path path; struct file *file; if (dname) { name.name = dname; name.len = strlen(name.name); } else if (sock->sk) { name.name = sock->sk->sk_prot_creator->name; name.len = strle...
0
50,266
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void GpuProcessHost::SendOutstandingReplies( EstablishChannelStatus failure_status) { DCHECK_NE(failure_status, EstablishChannelStatus::SUCCESS); valid_ = false; while (!channel_requests_.empty()) { auto callback = channel_requests_.front(); channel_requests_.pop(); std::move(callback).Run(...
0
132,506
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static int vmx_deliver_nested_posted_interrupt(struct kvm_vcpu *vcpu, int vector) { struct vcpu_vmx *vmx = to_vmx(vcpu); if (is_guest_mode(vcpu) && vector == vmx->nested.posted_intr_nv) { /* * If a posted intr is not recognized by hardware, * we will accomplish it in the next vmentry. */ ...
0
81,029
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void Document::resetLinkColor() { m_linkColor = Color(0, 0, 238); } Commit Message: Unreviewed, rolling out r147402. http://trac.webkit.org/changeset/147402 https://bugs.webkit.org/show_bug.cgi?id=112903 Source/WebCore: * dom/Document.cpp: (WebCore::Document::processHttpEquiv): * loader/DocumentLoader.cpp...
0
105,591
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: ExtensionApiTest::ExtensionApiTest() { embedded_test_server()->RegisterRequestHandler( base::Bind(&HandleServerRedirectRequest)); embedded_test_server()->RegisterRequestHandler( base::Bind(&HandleEchoHeaderRequest)); embedded_test_server()->RegisterRequestHandler( base::Bind(&HandleSetCook...
0
146,560
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: xmlParseURI(const char *str) { xmlURIPtr uri; int ret; if (str == NULL) return(NULL); uri = xmlCreateURI(); if (uri != NULL) { ret = xmlParse3986URIReference(uri, str); if (ret) { xmlFreeURI(uri); return(NULL); } } return(uri); } Commit Message: DO NOT MERGE: Use correct limit for port va...
0
163,359
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: ref_param_read_string_value(gs_memory_t *mem, const iparam_loc * ploc, gs_param_string * pvalue) { const ref *pref = ploc->pvalue; switch (r_type(pref)) { case t_name: { ref nref; name_string_ref(mem, pref, &nref); pvalue->data = nref.value.const_bytes; ...
0
3,279
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void HTMLInputElement::requiredAttributeChanged() { HTMLTextFormControlElement::requiredAttributeChanged(); if (CheckedRadioButtons* buttons = checkedRadioButtons()) buttons->requiredAttributeChanged(this); m_inputTypeView->requiredAttributeChanged(); } Commit Message: Add HTMLFormControlElem...
0
113,990
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void WebContentsImpl::ResetLoadProgressState() { frame_tree_.ResetLoadProgress(); loading_weak_factory_.InvalidateWeakPtrs(); loading_last_progress_update_ = base::TimeTicks(); } Commit Message: Don't call WebContents::DownloadImage() callback if the WebContents were deleted BUG=583718 Review URL: https:...
0
131,974
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static size_t safecatd(char *buffer, size_t bufsize, size_t pos, double d, int precision) { char number[64]; sprintf(number, "%.*f", precision, d); return safecat(buffer, bufsize, pos, number); } Commit Message: DO NOT MERGE Update libpng to 1.6.20 BUG:23265085 Change-Id: I85199805636d771f3597b691b63bc0...
0
160,029
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: int kvm_arch_interrupt_allowed(struct kvm_vcpu *vcpu) { return kvm_x86_ops->interrupt_allowed(vcpu); } Commit Message: KVM: Ensure all vcpus are consistent with in-kernel irqchip settings (cherry picked from commit 3e515705a1f46beb1c942bb8043c16f8ac7b1e9e) If some vcpus are created before KVM_CREATE_IRQCHIP, ...
0
20,726
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: int UDPSocketWin::Connect(const IPEndPoint& address) { net_log_.BeginEvent(NetLog::TYPE_UDP_CONNECT, CreateNetLogUDPConnectCallback(&address)); int rv = InternalConnect(address); if (rv != OK) Close(); net_log_.EndEventWithNetErrorCode(NetLog::TYPE_UDP_CONNECT, rv); return rv; ...
0
113,435
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: ft_var_load_avar( TT_Face face ) { FT_Stream stream = FT_FACE_STREAM(face); FT_Memory memory = stream->memory; GX_Blend blend = face->blend; GX_AVarSegment segment; FT_Error error = TT_Err_Ok; FT_ULong version; FT_Long axisCount; FT_I...
0
7,749
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static inline void sanitize_key(unsigned flags, char *str, size_t len, zval *zv, zend_bool *rfc5987 TSRMLS_DC) { char *eos; zval_dtor(zv); php_trim(str, len, NULL, 0, zv, 3 TSRMLS_CC); if (flags & PHP_HTTP_PARAMS_ESCAPED) { sanitize_escaped(zv TSRMLS_CC); } if (!Z_STRLEN_P(zv)) { return; } if (fl...
0
94,003
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static void mmu_pte_write_flush_tlb(struct kvm_vcpu *vcpu, bool zap_page, bool remote_flush, bool local_flush) { if (zap_page) return; if (remote_flush) kvm_flush_remote_tlbs(vcpu->kvm); else if (local_flush) kvm_mmu_flush_tlb(vcpu); } Commit Message: nEPT: Nested INVEPT If we let L1 use EPT, ...
0
37,534
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: sctp_disposition_t sctp_sf_do_9_2_shutdown_ack( struct net *net, const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *chunk = (struct sctp_chunk *) arg; struct sctp_chunk *reply; /* There are 2 ways of g...
0
37,340
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static v8::Handle<v8::Value> withScriptStateAttributeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.TestObj.withScriptStateAttribute._get"); TestObj* imp = V8TestObj::toNative(info.Holder()); ScriptState* state = ScriptState::current(); if (!state) re...
0
109,655
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static int _server_handle_ques(libgdbr_t *g, int (*cmd_cb) (void*, const char*, char*, size_t), void *core_ptr) { char message[64]; if (send_ack (g) < 0) { return -1; } snprintf (message, sizeof (message) - 1, "T05thread:%x;", cmd_cb (core_ptr, "dptr", NULL, 0)); return send_msg (g, message); } Commit Mes...
0
64,149
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: GDataDirectoryService::GDataDirectoryService() : blocking_task_runner_(NULL), serialized_size_(0), largest_changestamp_(0), origin_(UNINITIALIZED), weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { root_.reset(new GDataDirectory(NULL, this)); if (!util::IsDriveV2ApiEnab...
1
171,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'. Remember, I want response in '1' or '0', No explanation.
Code: static void VirtIONetRelease(PARANDIS_ADAPTER *pContext) { BOOLEAN b; ULONG i; DEBUG_ENTRY(0); /* list NetReceiveBuffersWaiting must be free */ for (i = 0; i < ARRAYSIZE(pContext->ReceiveQueues); i++) { pRxNetDescriptor pBufferDescriptor; while (NULL != (pBufferDescripto...
0
74,410
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static void hns_disable_serdes_lb(struct net_device *ndev) { struct hns_nic_priv *priv = netdev_priv(ndev); struct hnae_handle *h = priv->ae_handle; struct hnae_ae_ops *ops = h->dev->ops; ops->stop(h); ops->set_loopback(h, MAC_INTERNALLOOP_SERDES, 0); } Commit Message: net: hns: Fix a skb used after free b...
0
85,674
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static void camellia_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) { const struct camellia_ctx *cctx = crypto_tfm_ctx(tfm); const __be32 *src = (const __be32 *)in; __be32 *dst = (__be32 *)out; unsigned int max; u32 tmp[4]; tmp[0] = be32_to_cpu(src[0]); tmp[1] = be32_to_cpu(src[1]); tmp[2] = be3...
0
47,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'. Remember, I want response in '1' or '0', No explanation.
Code: void BackingStoreGtk::XShowRect(const gfx::Point &origin, const gfx::Rect& rect, XID target) { XCopyArea(display_, pixmap_, target, static_cast<GC>(pixmap_gc_), rect.x(), rect.y(), rect.width(), rect.height(), rect.x() + origin.x(), rect.y() + origin.y());...
0
119,144
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void WebKitTestController::WebContentsDestroyed() { DCHECK(CalledOnValidThread()); printer_->AddErrorMessage("FAIL: main window was destroyed"); DiscardMainWindow(); } Commit Message: content: Rename webkit_test_helpers.{cc,h} to blink_test_helpers.{cc,h} Now that webkit/ is gone, we are preparing ourselv...
0
123,533
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static int __cpuinit sched_cpu_active(struct notifier_block *nfb, unsigned long action, void *hcpu) { switch (action & ~CPU_TASKS_FROZEN) { case CPU_ONLINE: case CPU_DOWN_FAILED: set_cpu_active((long)hcpu, true); return NOTIFY_OK; default: return NOTIFY_DONE; } } Commit Message: Sched: fix s...
0
22,531
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: DefragGetOsPolicy(Packet *p) { int policy = -1; if (PKT_IS_IPV4(p)) { policy = SCHInfoGetIPv4HostOSFlavour((uint8_t *)GET_IPV4_DST_ADDR_PTR(p)); } else if (PKT_IS_IPV6(p)) { policy = SCHInfoGetIPv6HostOSFlavour((uint8_t *)GET_IPV6_DST_ADDR(p)); } if (policy == -1) { ...
0
67,843
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void TabletModeWindowState::UpdateBounds(wm::WindowState* window_state, bool animated) { if (wm::IsDraggingTabs(window_state->window())) return; if (current_state_type_ == WindowStateType::kMinimized) return; gfx::Rect bounds_in_parent = GetBoundsInTabletMo...
0
137,570
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static void tcp_illinois_acked(struct sock *sk, u32 pkts_acked, s32 rtt) { struct illinois *ca = inet_csk_ca(sk); ca->acked = pkts_acked; /* dup ack, no rtt sample */ if (rtt < 0) return; /* ignore bogus values, this prevents wraparound in alpha math */ if (rtt > RTT_MAX) rtt = RTT_MAX; /* keep tra...
0
18,529
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: bool RenderWidgetHostViewGtk::RetrieveSurrounding(std::string* text, size_t* cursor_index) { if (!selection_range_.IsValid()) return false; size_t offset = selection_range_.GetMin() - selection_text_offset_; DCHECK(offset <= selection_text_.length()); ...
0
114,987
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: clear_mml(MinMax* l) { l->min = l->max = 0; } Commit Message: Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode. CWE ID: CWE-476
0
89,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'. Remember, I want response in '1' or '0', No explanation.
Code: static ext4_lblk_t ext4_ext_next_leaf_block(struct inode *inode, struct ext4_ext_path *path) { int depth; BUG_ON(path == NULL); depth = path->p_depth; /* zero-tree has no leaf blocks at all */ if (depth == 0) return EXT_MAX_BLOCK; /* go to index block */ depth--; while (depth >= 0) { if (path...
0
34,757
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir, const unsigned char *s, uint32_t offset, size_t nbytes, struct magic *m) { /* * Note: FILE_SEARCH and FILE_REGEX do not actually copy * anything, but setup pointers into the source */ if (indir == 0) { switch (type) { case FILE_S...
0
35,658
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static int tls_process_cke_ecdhe(SSL *s, PACKET *pkt, int *al) { #ifndef OPENSSL_NO_EC EVP_PKEY *skey = s->s3->tmp.pkey; EVP_PKEY *ckey = NULL; int ret = 0; if (PACKET_remaining(pkt) == 0L) { /* We don't support ECDH client auth */ *al = SSL_AD_HANDSHAKE_FAILURE; SSLerr(SS...
0
12,752
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: header_bin_le(struct archive_read *a, struct cpio *cpio, struct archive_entry *entry, size_t *namelength, size_t *name_pad) { const void *h; const unsigned char *header; a->archive.archive_format = ARCHIVE_FORMAT_CPIO_BIN_LE; a->archive.archive_format_name = "cpio (little-endian binary)"; /* Read fixed...
0
52,598
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: COMPAT_SYSCALL_DEFINE4(rt_sigprocmask, int, how, compat_sigset_t __user *, nset, compat_sigset_t __user *, oset, compat_size_t, sigsetsize) { #ifdef __BIG_ENDIAN sigset_t old_set = current->blocked; /* XXX: Don't preclude handling different sized sigset_t's. */ if (sigsetsize != sizeof(sigset_t)) return ...
0
31,698
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: bool DXVAVideoDecodeAccelerator::InitDecoder() { HMODULE decoder_dll = ::GetModuleHandle(L"msmpeg2vdec.dll"); RETURN_ON_FAILURE(decoder_dll, "msmpeg2vdec.dll required for decoding is not loaded", false); typedef HRESULT (WINAPI* GetClassObject)(const CLSID& clsid, ...
0
106,931
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void StubOfflinePageModel::DeletePagesByOfflineId( const std::vector<int64_t>& offline_ids, const DeletePageCallback& callback) {} Commit Message: Add the method to check if offline archive is in internal dir Bug: 758690 Change-Id: I8bb4283fc40a87fa7a87df2c7e513e2e16903290 Reviewed-on: https://chromium-...
0
155,934
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: encode_SET_L4_port(const struct ofpact_l4_port *l4_port, enum ofp_version ofp_version, enum ofp_raw_action_type raw, enum mf_field_id field, struct ofpbuf *out) { uint16_t port = l4_port->port; if (ofp_version >= OFP12_VERSION && field != MFF_N_IDS) { put_set...
0
76,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'. Remember, I want response in '1' or '0', No explanation.
Code: static HB_Error Lookup_ContextPos3( GPOS_Instance* gpi, HB_ContextPosFormat3* cpf3, HB_Buffer buffer, HB_UShort flags, HB_UShort context_length, int nesting_level ) { HB_Error error; HB...
0
13,604
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: pkinit_load_fs_cert_and_key(krb5_context context, pkinit_identity_crypto_context id_cryptoctx, char *certname, char *keyname, int cindex) { krb5_error_code retval; X509 *x = NULL; EVP_PKEY *...
0
33,681
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static QString findImageForSpecImagePath(const QString &_path) { QString path = _path; if (path.startsWith(QLatin1String("file:"))) { QUrl url(path); path = url.toLocalFile(); } return KIconLoader::global()->iconPath(path, -KIconLoader::SizeHuge, ...
0
10,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'. Remember, I want response in '1' or '0', No explanation.
Code: static int hugetlb_sysfs_add_hstate(struct hstate *h, struct kobject *parent, struct kobject **hstate_kobjs, const struct attribute_group *hstate_attr_group) { int retval; int hi = hstate_index(h); hstate_kobjs[hi] = kobject_create_and_add(h->name, parent); if (!hstate_kobjs[hi]) return -EN...
0
86,391
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static int bdev_try_to_free_page(struct super_block *sb, struct page *page, gfp_t wait) { journal_t *journal = EXT4_SB(sb)->s_journal; WARN_ON(PageChecked(page)); if (!page_has_buffers(page)) return 0; if (journal) return jbd2_journal_try_to_free_buffers(journal, page, wait & ~__GFP_WAIT); r...
0
20,431
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: WebMediaPlayer::CORSMode HTMLMediaElement::CorsMode() const { const AtomicString& cross_origin_mode = FastGetAttribute(crossoriginAttr); if (cross_origin_mode.IsNull()) return WebMediaPlayer::kCORSModeUnspecified; if (DeprecatedEqualIgnoringCase(cross_origin_mode, "use-credentials")) return WebMedia...
0
144,547
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static void vb2_warn_zero_bytesused(struct vb2_buffer *vb) { static bool check_once; if (check_once) return; check_once = true; WARN_ON(1); pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n"); if (vb->vb2_queue->allow_zero_bytesused) pr_warn("use VIDIOC_DECODER_CMD(V4L...
0
52,780
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: struct inode *ovl_new_inode(struct super_block *sb, umode_t mode, struct ovl_entry *oe) { struct inode *inode; inode = new_inode(sb); if (!inode) return NULL; mode &= S_IFMT; inode->i_ino = get_next_ino(); inode->i_mode = mode; inode->i_flags |= S_NOATIME | S_NOCMTIME; switch (mode) { case S...
0
41,431
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void WebContentsImpl::FreezePage() { SendPageMessage(new PageMsg_FreezePage(MSG_ROUTING_NONE)); } Commit Message: Force a flush of drawing to the widget when a dialog is shown. BUG=823353 TEST=as in bug Change-Id: I5da777068fc29c5638ef02d50e59d5d7b2729260 Reviewed-on: https://chromium-review.googlesource.com...
0
155,624
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void InspectorController::connectFrontend(InspectorFrontendChannel* frontendChannel) { ASSERT(frontendChannel); initializeDeferredAgents(); m_inspectorFrontend = adoptPtr(new InspectorFrontend(frontendChannel)); m_state->unmute(); m_agents.setFrontend(m_inspectorFrontend.get()); Inspec...
0
114,117
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static void select_bad_process(struct oom_control *oc) { if (is_memcg_oom(oc)) mem_cgroup_scan_tasks(oc->memcg, oom_evaluate_task, oc); else { struct task_struct *p; rcu_read_lock(); for_each_process(p) if (oom_evaluate_task(p, oc)) break; rcu_read_unlock(); } oc->chosen_points = oc->chosen...
0
85,996
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: path_send(PG_FUNCTION_ARGS) { PATH *path = PG_GETARG_PATH_P(0); StringInfoData buf; int32 i; pq_begintypsend(&buf); pq_sendbyte(&buf, path->closed ? 1 : 0); pq_sendint(&buf, path->npts, sizeof(int32)); for (i = 0; i < path->npts; i++) { pq_sendfloat8(&buf, path->p[i].x); pq_sendfloat8(&buf, path-...
0
38,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'. Remember, I want response in '1' or '0', No explanation.
Code: void ClientControlledShellSurface::SetImeBlocked(bool ime_blocked) { TRACE_EVENT1("exo", "ClientControlledShellSurface::SetImeBlocked", "ime_blocked", ime_blocked); if (!widget_) CreateShellSurfaceWidget(ui::SHOW_STATE_NORMAL); WMHelper::GetInstance()->SetImeBlocked(widget_->GetNativeWi...
0
137,714
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static int ssl_parse_server_key_exchange( mbedtls_ssl_context *ssl ) { int ret; const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; unsigned char *p = NULL, *end = NULL; MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse server key exchange" ) ); #if define...
1
169,266
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static void put_nfs_open_context_sync(struct nfs_open_context *ctx) { __put_nfs_open_context(ctx, 1); } Commit Message: NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> CWE ID:
0
22,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'. Remember, I want response in '1' or '0', No explanation.
Code: RenderWidgetHostImpl::~RenderWidgetHostImpl() { SetView(NULL); BackingStoreManager::RemoveBackingStore(this); GpuSurfaceTracker::Get()->RemoveSurface(surface_id_); surface_id_ = 0; process_->Release(routing_id_); if (delegate_) delegate_->RenderWidgetDeleted(this); } Commit Message: Implement...
0
114,730
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void GLES2DecoderImpl::BindAndApplyTextureParameters( TextureManager::TextureInfo* info) { glBindTexture(info->target(), info->service_id()); glTexParameteri(info->target(), GL_TEXTURE_MIN_FILTER, info->min_filter()); glTexParameteri(info->target(), GL_TEXTURE_MAG_FILTER, info->mag_filter()); glTexPar...
0
103,481
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: GURL WebSocketJob::GetURLForCookies() const { GURL url = socket_->url(); std::string scheme = socket_->is_secure() ? "https" : "http"; url_canon::Replacements<char> replacements; replacements.SetScheme(scheme.c_str(), url_parse::Component(0, scheme.length())); return url.Replace...
0
98,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'. Remember, I want response in '1' or '0', No explanation.
Code: static void __sctp_write_space(struct sctp_association *asoc) { struct sock *sk = asoc->base.sk; struct socket *sock = sk->sk_socket; if ((sctp_wspace(asoc) > 0) && sock) { if (waitqueue_active(&asoc->wait)) wake_up_interruptible(&asoc->wait); if (sctp_writeable(sk)) { if (sk->sk_sleep && waitqueue...
0
34,989
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x) { BUF_MEM *b = NULL; const unsigned char *p; void *ret = NULL; int len; len = asn1_d2i_read_bio(in, &b); if (len < 0) goto err; p = (unsigned char *)b->data; ret = d2i(x, &p, len); err: BUF...
0
12,820
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx) { cancel_delayed_work(&hctx->run_work); cancel_delayed_work(&hctx->delay_work); set_bit(BLK_MQ_S_STOPPED, &hctx->state); } Commit Message: blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retriev...
0
86,744
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: bool is_checkpointed_data(struct f2fs_sb_info *sbi, block_t blkaddr) { struct sit_info *sit_i = SIT_I(sbi); unsigned int segno, offset; struct seg_entry *se; bool is_cp = false; if (blkaddr == NEW_ADDR || blkaddr == NULL_ADDR) return true; mutex_lock(&sit_i->sentry_lock); segno = GET_SEGNO(sbi, blkadd...
0
85,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'. Remember, I want response in '1' or '0', No explanation.
Code: struct vfsmount *collect_mounts(struct path *path) { struct mount *tree; namespace_lock(); tree = copy_tree(real_mount(path->mnt), path->dentry, CL_COPY_ALL | CL_PRIVATE); namespace_unlock(); if (IS_ERR(tree)) return ERR_CAST(tree); return &tree->mnt; } Commit Message: mnt: Correct permission checks ...
0
36,186
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: IntSize Document::viewportSize() const { if (!view()) return IntSize(); return view()->visibleContentRect(ScrollableArea::IncludeScrollbars).size(); } Commit Message: Unreviewed, rolling out r147402. http://trac.webkit.org/changeset/147402 https://bugs.webkit.org/show_bug.cgi?id=112903 Source/We...
0
105,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'. Remember, I want response in '1' or '0', No explanation.
Code: tsize_t t2p_write_pdf_xobject_icccs_stream(T2P* t2p, TIFF* output){ tsize_t written=0; written += t2p_write_pdf_stream( (tdata_t) t2p->tiff_iccprofile, (tsize_t) t2p->tiff_iccprofilelength, output); return(written); } Commit Message: * tools/tiffcrop.c: fix various out-of-bounds write vulner...
0
48,395
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: error::Error GLES2DecoderPassthroughImpl::DoMultiDrawEndCHROMIUM() { MultiDrawManager::ResultData result; if (!multi_draw_manager_->End(&result)) { return error::kInvalidArguments; } switch (result.draw_function) { case MultiDrawManager::DrawFunction::DrawArrays: api()->glMultiDrawArraysANGL...
0
142,062
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: bool AXNodeObject::isEmbeddedObject() const { return isHTMLPlugInElement(getNode()); } Commit Message: Switch to equalIgnoringASCIICase throughout modules/accessibility BUG=627682 Review-Url: https://codereview.chromium.org/2793913007 Cr-Commit-Position: refs/heads/master@{#461858} CWE ID: CWE-254
0
127,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'. Remember, I want response in '1' or '0', No explanation.
Code: static int crypto_fpu_setkey(struct crypto_tfm *parent, const u8 *key, unsigned int keylen) { struct crypto_fpu_ctx *ctx = crypto_tfm_ctx(parent); struct crypto_blkcipher *child = ctx->child; int err; crypto_blkcipher_clear_flags(child, CRYPTO_TFM_REQ_MASK); crypto_blkcipher_set_flags(child, crypto_...
0
45,464
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: gdImagePtr gdImageCreateFromGd2 (FILE * inFile) { gdIOCtx *in = gdNewFileCtx(inFile); gdImagePtr im; im = gdImageCreateFromGd2Ctx(in); in->gd_free(in); return im; } Commit Message: Fixed #72339 Integer Overflow in _gd2GetHeader() resulting in heap overflow CWE ID: CWE-190
0
51,471
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: build_sched_groups(struct sched_domain *sd, int cpu) { struct sched_group *first = NULL, *last = NULL; struct sd_data *sdd = sd->private; const struct cpumask *span = sched_domain_span(sd); struct cpumask *covered; int i; get_group(cpu, sdd, &sd->groups); atomic_inc(&sd->groups->ref); if (cpu != cpumask...
0
55,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'. Remember, I want response in '1' or '0', No explanation.
Code: void setup_new_exec(struct linux_binprm * bprm) { arch_pick_mmap_layout(current->mm); /* This is the point of no return */ current->sas_ss_sp = current->sas_ss_size = 0; if (uid_eq(current_euid(), current_uid()) && gid_eq(current_egid(), current_gid())) set_dumpable(current->mm, SUID_DUMP_USER); else s...
0
43,449
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static long sock_do_ioctl(struct net *net, struct socket *sock, unsigned int cmd, unsigned long arg) { int err; void __user *argp = (void __user *)arg; err = sock->ops->ioctl(sock, cmd, arg); /* * If this ioctl is unknown try to hand it down * to the NIC driver. */ if (err == -ENOIOCTLCMD) err...
0
18,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'. Remember, I want response in '1' or '0', No explanation.
Code: SkPath GM2TabStyle::GetPath(PathType path_type, float scale, bool force_active, RenderUnits render_units) const { const int stroke_thickness = GetStrokeThickness(force_active); gfx::RectF aligned_bounds = ScaleAndAlignB...
0
140,827
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static int nft_del_setelem(struct nft_ctx *ctx, struct nft_set *set, const struct nlattr *attr) { struct nlattr *nla[NFTA_SET_ELEM_MAX + 1]; struct nft_data_desc desc; struct nft_set_elem elem; struct nft_trans *trans; int err; err = nla_parse_nested(nla, NFTA_SET_ELEM_MAX, attr, nft_set_el...
0
58,014
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: int open_wait(char *pathname, int flags, mode_t mode) { if (!open_unlimited) { pthread_mutex_lock(&open_mutex); while (open_count == 0) pthread_cond_wait(&open_empty, &open_mutex); open_count --; pthread_mutex_unlock(&open_mutex); } return open(pathname, flags, mode); } Commit Message: unsquashfs-...
0
74,280