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: int xmlThrDefIndentTreeOutput(int v) { int ret; xmlMutexLock(xmlThrDefMutex); ret = xmlIndentTreeOutputThrDef; xmlIndentTreeOutputThrDef = v; xmlMutexUnlock(xmlThrDefMutex); return ret; } Commit Message: Attempt to address libxml crash. BUG=129930 Review URL: https://chromiumcodereview.a...
0
107,328
Analyze the 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::dispatchWindowLoadEvent() { ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); DOMWindow* domWindow = this->domWindow(); if (!domWindow) return; domWindow->dispatchLoadEvent(); } Commit Message: Refactoring: Move m_mayDisplaySeamlesslyWithParent down to Document...
0
102,703
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void PluginServiceImpl::UnregisterInternalPlugin(const FilePath& path) { plugin_list_->UnregisterInternalPlugin(path); } Commit Message: Follow-on fixes and naming changes for https://codereview.chromium.org/12086077/ BUG=172573 Review URL: https://codereview.chromium.org/12177018 git-svn-id: svn://svn.chrom...
0
116,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'. Remember, I want response in '1' or '0', No explanation.
Code: void Type_Signature_Free(struct _cms_typehandler_struct* self, void* Ptr) { _cmsFree(self ->ContextID, Ptr); } Commit Message: Added an extra check to MLU bounds Thanks to Ibrahim el-sayed for spotting the bug CWE ID: CWE-125
0
71,053
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static TRBCCode xhci_enable_slot(XHCIState *xhci, unsigned int slotid) { trace_usb_xhci_slot_enable(slotid); assert(slotid >= 1 && slotid <= xhci->numslots); xhci->slots[slotid-1].enabled = 1; xhci->slots[slotid-1].uport = NULL; memset(xhci->slots[slotid-1].eps, 0, sizeof(XHCIEPContext*)*31); ...
0
8,334
Analyze the 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 AppCacheDispatcherHost::OnStartUpdate(int host_id, IPC::Message* reply_msg) { if (pending_reply_msg_) { bad_message::ReceivedBadMessage( this, bad_message::ACDH_PENDING_REPLY_IN_START_UPDATE); delete reply_msg; return; } pending_reply_msg_...
0
124,247
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void ImageLoader::DecodeRequest::Trace(blink::Visitor* visitor) { visitor->Trace(resolver_); visitor->Trace(loader_); } Commit Message: service worker: Disable interception when OBJECT/EMBED uses ImageLoader. Per the specification, service worker should not intercept requests for OBJECT/EMBED elements. R=k...
0
147,512
Analyze the 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: WM_SYMBOL int WildMidi_SetCvtOption(uint16_t tag, uint16_t setting) { _WM_Lock(&WM_ConvertOptions.lock); switch (tag) { case WM_CO_XMI_TYPE: /* validation happens in xmidi.c */ WM_ConvertOptions.xmi_convert_type = setting; break; case WM_CO_FREQUENCY: /* validation happens in forma...
0
85,112
Analyze the 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::Shutdown() { TRACE_EVENT0("blink", "Document::shutdown"); CHECK(!frame_ || frame_->Tree().ChildCount() == 0); if (!IsActive()) return; FrameNavigationDisabler navigation_disabler(*frame_); HTMLFrameOwnerElement::PluginDisposeSuspendScope suspend_plugin_dispose; ScriptForbiddenScope...
0
146,945
Analyze the 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 vmsave_interception(struct vcpu_svm *svm) { struct vmcb *nested_vmcb; struct page *page; if (nested_svm_check_permissions(svm)) return 1; nested_vmcb = nested_svm_map(svm, svm->vmcb->save.rax, &page); if (!nested_vmcb) return 1; svm->next_rip = kvm_rip_read(&svm->vcpu) + 3; skip_emulated_...
0
37,928
Analyze the 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: MockAppCacheStorage* mock_storage() { return static_cast<MockAppCacheStorage*>(service_->storage()); } Commit Message: Reland "AppCache: Add padding to cross-origin responses." This is a reland of 85b389caa7d725cdd31f59e9a2b79ff54804b7b7 Initialized CacheRecord::padding_size to 0. Original change's de...
0
151,322
Analyze the 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 u32 tun_xdp_query(struct net_device *dev) { struct tun_struct *tun = netdev_priv(dev); const struct bpf_prog *xdp_prog; xdp_prog = rtnl_dereference(tun->xdp_prog); if (xdp_prog) return xdp_prog->aux->id; return 0; } Commit Message: tun: call dev_get_valid_name() before register_netdevice() regis...
0
93,337
Analyze the 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: ReadUserLogState::ReadUserLogState( const char *path, int max_rotations, int recent_thresh ) : ReadUserLogFileState( ) { Reset( RESET_INIT ); m_max_rotations = max_rotations; m_recent_thresh = recent_thresh; if ( path ) { m_base_path = path; } m_initialized = true; m_update_time = 0; } Comm...
0
16,633
Analyze the 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 __net_init icmp_sk_init(struct net *net) { int i, err; net->ipv4.icmp_sk = kzalloc(nr_cpu_ids * sizeof(struct sock *), GFP_KERNEL); if (net->ipv4.icmp_sk == NULL) return -ENOMEM; for_each_possible_cpu(i) { struct sock *sk; err = inet_ctl_sock_create(&sk, PF_INET, SOCK_RAW, IPPROT...
0
18,863
Analyze the 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 tls1_get_formatlist(SSL *s, const unsigned char **pformats, size_t *pformatslen) { /* If we have a custom point format list use it otherwise * use default */ if (s->tlsext_ecpointformatlist) { *pformats = s->tlsext_ecpointformatlist; *pformatslen = s->tlsext_ecpointformatlist_length; ...
0
10,824
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void FrameLoader::StopAllLoaders() { if (frame_->GetDocument()->PageDismissalEventBeingDispatched() != Document::kNoDismissal) return; if (in_stop_all_loaders_) return; AutoReset<bool> in_stop_all_loaders(&in_stop_all_loaders_, true); for (Frame* child = frame_->Tree().FirstChild(); child...
0
148,110
Analyze the 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 nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason, u32 exit_intr_info, unsigned long exit_qualification) { struct vcpu_vmx *vmx = to_vmx(vcpu); struct vmcs12 *vmcs12 = get_vmcs12(vcpu); /* trying to cancel vmlaunch/vmresume is a bug */ WARN_ON_ONCE(vmx->nested.nested_run_...
0
37,162
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void TabCloseableStateWatcher::TabStripWatcher::TabChangedAt( TabContentsWrapper* tab_contents, int index, TabChangeType change_type) { main_watcher_->OnTabStripChanged(browser_, false); } Commit Message: chromeos: fix bug where "aw snap" page replaces first tab if it was a NTP when closing window with > 1...
0
98,025
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: SitePerProcessAndroidImeTest() : SitePerProcessBrowserTest() {} Commit Message: Add a check for disallowing remote frame navigations to local resources. Previously, RemoteFrame navigations did not perform any renderer-side checks and relied solely on the browser-side logic to block disallowed navigations via ...
0
143,902
Analyze the 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 Browser::OnWindowClosing() { if (!ShouldCloseWindow()) return; bool should_quit_if_last_browser = browser_shutdown::IsTryingToQuit() || !browser::WillKeepAlive(); if (should_quit_if_last_browser && BrowserList::size() == 1) browser_shutdown::OnShutdownStarting(browser_shutdown::WINDOW_C...
0
117,796
Analyze the 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::DoTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, ...
0
142,133
Analyze the 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: ZEND_API void *zend_object_store_get_object_by_handle(zend_object_handle handle TSRMLS_DC) { return EG(objects_store).object_buckets[handle].bucket.obj.object; } Commit Message: Fix bug #73052 - Memory Corruption in During Deserialized-object Destruction CWE ID: CWE-119
0
49,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'. Remember, I want response in '1' or '0', No explanation.
Code: static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const char *table) /* {{{ */ { char *table_copy, *escaped, *token, *tmp; size_t len; /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); l...
1
164,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'. Remember, I want response in '1' or '0', No explanation.
Code: learn_min_len(uint16_t header) { int n_bits = header & NX_LEARN_N_BITS_MASK; int src_type = header & NX_LEARN_SRC_MASK; int dst_type = header & NX_LEARN_DST_MASK; unsigned int min_len; min_len = 0; if (src_type == NX_LEARN_SRC_FIELD) { min_len += sizeof(ovs_be32); /* src_field */ ...
0
76,975
Analyze the 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 NavigationControllerImpl::SetBrowserContext( BrowserContext* browser_context) { browser_context_ = browser_context; } Commit Message: Delete unneeded pending entries in DidFailProvisionalLoad to prevent a spoof. BUG=280512 BUG=278899 TEST=See bug for repro steps. Review URL: https://chromiumcoderevi...
0
111,564
Analyze the 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 CreateInputAndSetText(const std::string& text) { return ExecuteScript(interstitial_->GetMainFrame(), "create_input_and_set_text('" + text + "')"); } Commit Message: Don't show current RenderWidgetHostView while interstitial is showing. Also moves interstitial page tracking ...
0
136,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'. Remember, I want response in '1' or '0', No explanation.
Code: void ExtensionService::SetBackgroundPageReady(const Extension* extension) { DCHECK(!extension->background_url().is_empty()); extension_runtime_data_[extension->id()].background_page_ready = true; NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY, Source...
0
98,642
Analyze the 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 guess_mv(ERContext *s) { int (*blocklist)[2], (*next_blocklist)[2]; uint8_t *fixed; const ptrdiff_t mb_stride = s->mb_stride; const int mb_width = s->mb_width; int mb_height = s->mb_height; int i, depth, num_avail; int mb_x, mb_y; ptrdiff_t mot_step, mot_stride; in...
0
79,872
Analyze the 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_do_encrypt(const u32 *subkey, u32 *io, unsigned max) { u32 il, ir, t0, t1; /* temporary variables */ /* pre whitening but absorb kw2 */ io[0] ^= SUBKEY_L(0); io[1] ^= SUBKEY_R(0); /* main iteration */ #define ROUNDS(i) ({ \ CAMELLIA_ROUNDSM(io[0], io[1], \ SUBKEY_L(i + ...
0
47,159
Analyze the 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 ExtensionContextMenuModel::GetAcceleratorForCommandId( int command_id, ui::Accelerator* accelerator) { return false; } Commit Message: [i18n-fixlet] Make strings branding specific in extension code. IDS_EXTENSIONS_UNINSTALL IDS_EXTENSIONS_INCOGNITO_WARNING IDS_EXTENSION_INSTALLED_HEADING IDS_EXTENSIO...
0
107,729
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: PHP_FUNCTION(openssl_get_cipher_methods) { zend_bool aliases = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &aliases) == FAILURE) { return; } array_init(return_value); OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, aliases ? openssl_add_method_or_alias: openssl_add_method, return_value); } ...
0
4,524
Analyze the 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 noinline void *cache_alloc_pfmemalloc(struct kmem_cache *cachep, struct kmem_cache_node *n, gfp_t flags) { struct page *page; void *obj; void *list = NULL; if (!gfp_pfmemalloc_allowed(flags)) return NULL; spin_lock(&n->list_lock); page = get_first_slab(n, true); if (!page) { spin_unlock(&n...
0
68,839
Analyze the 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: virConnectListDomains(virConnectPtr conn, int *ids, int maxids) { VIR_DEBUG("conn=%p, ids=%p, maxids=%d", conn, ids, maxids); virResetLastError(); virCheckConnectReturn(conn, -1); virCheckNonNullArgGoto(ids, error); virCheckNonNegativeArgGoto(maxids, error); if (conn->driver->connectLis...
0
93,756
Analyze the 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 TestLessDrawing() { FakeDisplayItemClient first("first"); GraphicsContext context(GetPaintController()); InitRootChunk(); DrawRect(context, first, kBackgroundType, FloatRect(100, 100, 300, 300)); DrawRect(context, first, kForegroundType, FloatRect(100, 100, 300, 300)); GetPaintCont...
0
125,690
Analyze the 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: WORD32 ihevcd_ctl(iv_obj_t *ps_codec_obj, void *pv_api_ip, void *pv_api_op) { ivd_ctl_set_config_ip_t *ps_ctl_ip; ivd_ctl_set_config_op_t *ps_ctl_op; WORD32 ret = 0; WORD32 subcommand; codec_t *ps_codec = (codec_t *)ps_codec_obj->pv_codec_handle; ps_ctl_ip = (ivd_ctl_set_config_ip_t *)pv_api_ip; ...
0
163,303
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void BrowserMainLoop::RunMainMessageLoopParts() { TRACE_EVENT_ASYNC_BEGIN0("toplevel", "BrowserMain:MESSAGE_LOOP", this); bool ran_main_loop = false; if (parts_) ran_main_loop = parts_->MainMessageLoopRun(&result_code_); if (!ran_main_loop) MainMessageLoopRun(); TRACE_EVENT_ASYNC_END0("toplev...
0
150,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: print_pixel(char string[64], const Pixel *pixel, png_uint_32 format) { switch (format & (PNG_FORMAT_FLAG_ALPHA|PNG_FORMAT_FLAG_COLOR)) { case 0: sprintf(string, "%s(%d)", format_names[format], pixel->g); break; case PNG_FORMAT_FLAG_ALPHA: sprintf(string, "%s(%d,%d)", format_names[format], ...
0
159,940
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void LockContentsView::OnUsersChanged( const std::vector<mojom::LoginUserInfoPtr>& users) { main_view_->RemoveAllChildViews(true /*delete_children*/); opt_secondary_big_view_ = nullptr; users_list_ = nullptr; rotation_actions_.clear(); users_.clear(); if (users.empty()) { LOG_IF(FATAL, screen...
1
172,197
Analyze the 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 RenderWidgetHostViewAura::SelectionBoundsChanged( const gfx::Rect& start_rect, WebKit::WebTextDirection start_direction, const gfx::Rect& end_rect, WebKit::WebTextDirection end_direction) { if (selection_start_rect_ == start_rect && selection_end_rect_ == end_rect) return; selection_...
0
114,890
Analyze the 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 ChromeRenderMessageFilter::OnRendererHistograms( int sequence_number, const std::vector<std::string>& histograms) { HistogramSynchronizer::DeserializeHistogramList(sequence_number, histograms); } Commit Message: Make chrome.appWindow.create() provide access to the child window at a predictable tim...
0
105,329
Analyze the 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: SkiaOutputSurfaceImpl::~SkiaOutputSurfaceImpl() { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); current_paint_.reset(); root_recorder_.reset(); std::vector<std::unique_ptr<ImageContextImpl>> render_pass_image_contexts; render_pass_image_contexts.reserve(render_pass_image_cache_.size()); for (auto& ...
0
136,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'. Remember, I want response in '1' or '0', No explanation.
Code: void PDFiumEngine::AppendPage(PDFEngine* engine, int index) { pages_[index]->Unload(); pages_[index]->set_calculated_links(false); pp::Size curr_page_size = GetPageSize(index); FPDFPage_Delete(doc_, index); FPDF_ImportPages(doc_, static_cast<PDFiumEngine*>(engine)->doc(), ...
0
140,260
Analyze the 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 RenderFrameHostImpl::OnDidChangeOpener(int32_t opener_routing_id) { frame_tree_node_->render_manager()->DidChangeOpener(opener_routing_id, GetSiteInstance()); } Commit Message: Correctly reset FP in RFHI whenever origin changes Bug: 713364 Change-Id: ...
0
127,844
Analyze the 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 QQuickWebViewExperimental::setFlickableViewportEnabled(bool enable) { s_flickableViewportEnabled = enable; } Commit Message: [Qt][WK2] Allow transparent WebViews https://bugs.webkit.org/show_bug.cgi?id=80608 Reviewed by Tor Arne Vestbø. Added support for transparentBackground in QQuickWebViewExperi...
0
101,778
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void RenderWidgetHostImpl::OnGestureEventAck( const GestureEventWithLatencyInfo& event, InputEventAckSource ack_source, InputEventAckState ack_result) { latency_tracker_.OnInputEventAck(event.event, &event.latency, ack_result); for (auto& input_event_observer : input_event_observers_) input_ev...
0
155,589
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: bool AudioFlinger::EffectModule::isOffloaded() const { Mutex::Autolock _l(mLock); return mOffloaded; } Commit Message: Add EFFECT_CMD_SET_PARAM parameter checking Bug: 30204301 Change-Id: Ib9c3ee1c2f23c96f8f7092dd9e146bc453d7a290 (cherry picked from commit e4a1d91501d47931dbae19c47815952378787ab6) CWE ID: CW...
0
157,836
Analyze the 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 WebPagePrivate::didReceiveTouchEventMode(TouchEventMode mode) { if (mode != m_touchEventMode) m_client->touchEventModeChanged(toPlatformTouchEventMode(mode)); m_touchEventMode = mode; } Commit Message: [BlackBerry] Adapt to new BlackBerry::Platform::TouchPoint API https://bugs.webkit.org/sho...
0
104,175
Analyze the 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 ptrace_peek_siginfo(struct task_struct *child, unsigned long addr, unsigned long data) { struct ptrace_peeksiginfo_args arg; struct sigpending *pending; struct sigqueue *q; int ret, i; ret = copy_from_user(&arg, (void __user *) addr, sizeof(struct ptrace_peeksiginfo_args)); if (ret) ...
0
30,950
Analyze the 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 struct sock *unix_create1(struct net *net, struct socket *sock, int kern) { struct sock *sk = NULL; struct unix_sock *u; atomic_long_inc(&unix_nr_socks); if (atomic_long_read(&unix_nr_socks) > 2 * get_max_files()) goto out; sk = sk_alloc(net, PF_UNIX, GFP_KERNEL, &unix_proto, kern); if (!sk) go...
0
54,578
Analyze the 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: circle_contain(PG_FUNCTION_ARGS) { CIRCLE *circle1 = PG_GETARG_CIRCLE_P(0); CIRCLE *circle2 = PG_GETARG_CIRCLE_P(1); PG_RETURN_BOOL(FPle((point_dt(&circle1->center, &circle2->center) + circle2->radius), circle1->radius)); } Commit Message: Predict integer overflow to avoid buffer overruns. Several fun...
0
38,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'. Remember, I want response in '1' or '0', No explanation.
Code: static void __net_exit nf_ct_frags6_sysctl_unregister(struct net *net) { struct ctl_table *table; table = net->nf_frag.sysctl.frags_hdr->ctl_table_arg; unregister_net_sysctl_table(net->nf_frag.sysctl.frags_hdr); if (!net_eq(net, &init_net)) kfree(table); } Commit Message: netfilter: ipv6: nf_defrag: drop ...
0
47,992
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: error::Error GLES2DecoderPassthroughImpl::DoDisableVertexAttribArray( GLuint index) { api()->glDisableVertexAttribArrayFn(index); return error::kNoError; } Commit Message: Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM This makes the query of GL_COMPLETION_STATUS_KHR to programs much cheaper by minimizing the...
0
141,944
Analyze the 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 RenderWidgetHostImpl::NotifyTextDirection() { if (text_direction_updated_) { if (!text_direction_canceled_) Send(new ViewMsg_SetTextDirection(GetRoutingID(), text_direction_)); text_direction_updated_ = false; text_direction_canceled_ = false; } } Commit Message: Implement TextureImage...
0
114,648
Analyze the 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 ChromeContentRendererClient::CrossesExtensionExtents(WebFrame* frame, const GURL& new_url) { const ExtensionSet* extensions = extension_dispatcher_->extensions(); GURL old_url(frame->document().url()); if (old_url.is_empty() && frame->opener()) ...
0
98,766
Analyze the 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 sighand_ctor(void *data) { struct sighand_struct *sighand = data; spin_lock_init(&sighand->siglock); init_waitqueue_head(&sighand->signalfd_wqh); } Commit Message: Move "exit_robust_list" into mm_release() We don't want to get rid of the futexes just at exit() time, we want to drop them when doi...
0
22,180
Analyze the 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 Browser::FindInPage(bool find_next, bool forward_direction) { ShowFindBar(); if (find_next) { string16 find_text; #if defined(OS_MACOSX) find_text = GetFindPboardText(); #endif GetSelectedTabContentsWrapper()-> GetFindManager()->StartFinding(find_text, ...
1
170,656
Analyze the 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 LocalFrameClientImpl::DispatchDidFailLoad( const ResourceError& error, WebHistoryCommitType commit_type) { web_frame_->DidFail(error, false, commit_type); } Commit Message: Prevent renderer initiated back navigation to cancel a browser one. Renderer initiated back/forward navigations must not be ...
0
145,258
Analyze the 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 f2fs_reserve_block(struct dnode_of_data *dn, pgoff_t index) { bool need_put = dn->inode_page ? false : true; int err; err = get_dnode_of_data(dn, index, ALLOC_NODE); if (err) return err; if (dn->data_blkaddr == NULL_ADDR) err = reserve_new_block(dn); if (err || need_put) f2fs_put_dnode(dn); ret...
0
85,175
Analyze the 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 jit_subprogs(struct bpf_verifier_env *env) { struct bpf_prog *prog = env->prog, **func, *tmp; int i, j, subprog_start, subprog_end = 0, len, subprog; struct bpf_insn *insn; void *old_bpf_func; int err = -ENOMEM; if (env->subprog_cnt <= 1) return 0; for (i = 0, insn = prog->insnsi; i < prog->...
0
76,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 tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, u8 type, u8 code, int offset, __be32 info) { const struct ipv6hdr *hdr = (const struct ipv6hdr*)skb->data; const struct tcphdr *th = (struct tcphdr *)(skb->data+offset); struct ipv6_pinfo *np; struct sock *sk; int err; struct tcp_sock...
0
19,130
Analyze the 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 RenderViewHostImpl::IsFullscreen() const { return delegate_->IsFullscreenForCurrentTab(); } Commit Message: Filter more incoming URLs in the CreateWindow path. BUG=170532 Review URL: https://chromiumcodereview.appspot.com/12036002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178728 0039d316-1c4b...
0
117,209
Analyze the 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 tls12_get_pkey_idx(unsigned char sig_alg) { switch (sig_alg) { # ifndef OPENSSL_NO_RSA case TLSEXT_signature_rsa: return SSL_PKEY_RSA_SIGN; # endif # ifndef OPENSSL_NO_DSA case TLSEXT_signature_dsa: return SSL_PKEY_DSA_SIGN; # endif # ifndef OPENSSL_NO_ECDSA case TLSEXT_...
0
6,153
Analyze the 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: cmsPipeline* CMSEXPORT _cmsDefaultICCintents(cmsContext ContextID, cmsUInt32Number nProfiles, cmsUInt32Number TheIntents[], cmsHPROFILE hProfiles[], ...
0
58,430
Analyze the 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 DumpBrowserHistograms(const base::FilePath& output_file) { std::string output_string( base::StatisticsRecorder::ToJSON(base::JSON_VERBOSITY_LEVEL_FULL)); base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, base::BlockingType::MAY_BLOCK); base:...
0
137,494
Analyze the 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 ZIPARCHIVE_METHOD(getStream) { struct zip *intern; zval *self = getThis(); struct zip_stat sb; char *mode = "rb"; zend_string *filename; php_stream *stream; ze_zip_object *obj; if (!self) { RETURN_FALSE; } ZIP_FROM_OBJECT(intern, self); if (zend_parse_parameters(ZEND_NUM_ARGS(), "P", &filen...
0
54,417
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: DownloadId DownloadItemImpl::GetGlobalId() const { return download_id_; } Commit Message: Refactors to simplify rename pathway in DownloadFileManager. This is https://chromiumcodereview.appspot.com/10668004 / r144817 (reverted due to CrOS failure) with the completion logic moved to after the auto-opening. Th...
0
106,091
Analyze the 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 MockWebRTCPeerConnectionHandler::createOffer(const WebRTCSessionDescriptionRequest& request, const WebMediaConstraints& constraints) { WebString shouldSucceed; if (constraints.getMandatoryConstraintValue("succeed", shouldSucceed) && shouldSucceed == "true") { WebRTCSessionDescriptionDescrip...
1
170,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: void jas_matrix_clip(jas_matrix_t *matrix, jas_seqent_t minval, jas_seqent_t maxval) { int i; int j; jas_seqent_t v; jas_seqent_t *rowstart; jas_seqent_t *data; int rowstep; if (jas_matrix_numrows(matrix) > 0 && jas_matrix_numcols(matrix) > 0) { assert(matrix->rows_); rowstep = jas_matrix_r...
1
168,700
Analyze the 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 basic_authentication(zval* this_ptr, smart_str* soap_headers TSRMLS_DC) { zval **login, **password; zval **login, **password; if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_login", sizeof("_login"), (void **)&login) == SUCCESS && !zend_hash_exists(Z_OBJPROP_P(this_ptr),...
1
165,304
Analyze the 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 CSoundFile::InvertLoop(ModChannel *pChn) { if(GetType() != MOD_TYPE_MOD || pChn->nEFxSpeed == 0) return; ModSample *pModSample = const_cast<ModSample *>(pChn->pModSample); if(pModSample == nullptr || !pModSample->HasSampleData() || !pModSample->uFlags[CHN_LOOP] || pModSample->uFlags[CHN_16BIT]) return; ...
0
83,314
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static int opfisubr(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_DWORD ) { data[l++] = 0xda; data[l++] = 0x28 | op->operands[0].regs[0]; } else if ( op->operands[0].type & OT_WOR...
0
75,405
Analyze the 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 UsbTabHelper::DecrementConnectionCount( RenderFrameHost* render_frame_host) { auto it = frame_usb_services_.find(render_frame_host); DCHECK(it != frame_usb_services_.end()); DCHECK_GT(it->second->device_connection_count_, 0); it->second->device_connection_count_--; NotifyTabStateChanged(); } C...
0
155,086
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static int check_ptr_alignment(struct bpf_verifier_env *env, const struct bpf_reg_state *reg, int off, int size) { bool strict = env->strict_alignment; const char *pointer_desc = ""; switch (reg->type) { case PTR_TO_PACKET: case PTR_TO_PACKET_META: /* Special case, because of NET_IP_AL...
1
167,641
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void RenderFrameImpl::didDisplayInsecureContent(blink::WebLocalFrame* frame) { DCHECK(!frame_ || frame_ == frame); render_view_->Send(new ViewHostMsg_DidDisplayInsecureContent( render_view_->GetRoutingID())); } Commit Message: Add logging to figure out which IPC we're failing to deserialize in RenderFr...
0
110,245
Analyze the 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_New_Face_From_FSSpec( FT_Library library, const FSSpec* spec, FT_Long face_index, FT_Face* aface ) { #if ( __LP64__ ) || ( defined( MAC_OS_X_VERSION_10_5 ) && \ ( MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS...
0
6,949
Analyze the 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 MagnetometerCallback(scoped_refptr<PlatformSensor> sensor) { magnetometer_callback_called_ = true; magnetometer_ = static_cast<FakePlatformSensor*>(sensor.get()); } Commit Message: android: Fix sensors in device service. This patch fixes a bug that prevented more than one sensor data to be avai...
0
148,964
Analyze the 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 arcmsr_done4abort_postqueue(struct AdapterControlBlock *acb) { int i = 0; uint32_t flag_ccb, ccb_cdb_phy; struct ARCMSR_CDB *pARCMSR_CDB; bool error; struct CommandControlBlock *pCCB; switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_A: { struct MessageUnit_A __iomem *reg = acb->pmuA; uin...
0
49,745
Analyze the 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: archive_read_format_lha_read_data_skip(struct archive_read *a) { struct lha *lha; int64_t bytes_skipped; lha = (struct lha *)(a->format->data); if (lha->entry_unconsumed) { /* Consume as much as the decompressor actually used. */ __archive_read_consume(a, lha->entry_unconsumed); lha->entry_unconsumed ...
0
68,621
Analyze the 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 struct crypto_instance *alloc(struct rtattr **tb) { struct crypto_instance *inst; struct crypto_alg *alg; int err; err = crypto_check_attr_type(tb, CRYPTO_ALG_TYPE_BLKCIPHER); if (err) return ERR_PTR(err); alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER, CRYPTO_ALG_TYPE_MASK); if (IS_...
0
45,926
Analyze the 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 RenderWidgetHostViewAura::ExtendSelectionAndDelete( size_t before, size_t after) { RenderFrameHostImpl* rfh = GetFocusedFrame(); if (rfh) rfh->ExtendSelectionAndDelete(before, after); } Commit Message: Allocate a FrameSinkId for RenderWidgetHostViewAura in mus+ash RenderWidgetHostViewChildFrame...
0
132,222
Analyze the 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: ConstructClientIds(ClientPtr client, int numSpecs, xXResClientIdSpec* specs, ConstructClientIdCtx *ctx) { int specIdx; for (specIdx = 0; specIdx < numSpecs; ++specIdx) { if (specs[specIdx].client == 0) { int c; for (c = 0; c < currentM...
0
17,432
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static int __init sha256_s390_init(void) { int ret; if (!crypt_s390_func_available(KIMD_SHA_256, CRYPT_S390_MSA)) return -EOPNOTSUPP; ret = crypto_register_shash(&sha256_alg); if (ret < 0) goto out; ret = crypto_register_shash(&sha224_alg); if (ret < 0) crypto_unregister_shash(&sha256_alg); out: ret...
0
46,720
Analyze the 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 Release(int old_route_id) { session_storage_namespaces_awaiting_close_->erase(old_route_id); } Commit Message: Switching AudioOutputAuthorizationHandler from using AudioManager interface to AudioSystem one. BUG=672468 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;m...
0
128,303
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) { ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedAttrGetter2", "TestObject", info.Holder(), info.GetIsolate()); TestObject* imp = V8TestObject::toNati...
0
121,507
Analyze the 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::updateLayoutTreeForNodeIfNeeded(Node* node) { ASSERT(node); if (!node->canParticipateInComposedTree()) return; if (!needsLayoutTreeUpdate()) return; bool needsRecalc = needsFullLayoutTreeUpdate() || node->needsStyleRecalc() || node->needsStyleInvalidation(); if...
0
127,559
Analyze the 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 RenderViewImpl::OnZoom(PageZoom zoom) { if (!webview()) // Not sure if this can happen, but no harm in being safe. return; webview()->hidePopups(); double old_zoom_level = webview()->zoomLevel(); double zoom_level; if (zoom == PAGE_ZOOM_RESET) { zoom_level = 0; } else if (static_cast<i...
0
115,575
Analyze the 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 TabStripModel::TabNavigating(TabContentsWrapper* contents, PageTransition::Type transition) { if (ShouldForgetOpenersForTransition(transition)) { if (!IsNewTabAtEndOfTabStrip(contents)) { ForgetAllOpeners(); ForgetGroup(contents); } } } Commit Messag...
0
98,131
Analyze the 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 dev_set_mtu(struct net_device *dev, int new_mtu) { int err, orig_mtu; if (new_mtu == dev->mtu) return 0; /* MTU must be positive, and in range */ if (new_mtu < 0 || new_mtu < dev->min_mtu) { net_err_ratelimited("%s: Invalid MTU %d requested, hw min %d\n", dev->name, new_mtu, dev->min_mtu); ...
0
93,381
Analyze the 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 ~TestFieldTrialObserver() { FieldTrialList::RemoveObserver(this); } Commit Message: Convert ARRAYSIZE_UNSAFE -> arraysize in base/. R=thestig@chromium.org BUG=423134 Review URL: https://codereview.chromium.org/656033009 Cr-Commit-Position: refs/heads/master@{#299835} CWE ID: CWE-189
0
110,870
Analyze the 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 DeviceServiceAction::execute(Solid::Device &device) { new DelayedExecutor(m_service, device); } Commit Message: CWE ID: CWE-78
0
10,845
Analyze the 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: Ins_ROLL( FT_Long* args ) { FT_Long A, B, C; A = args[2]; B = args[1]; C = args[0]; args[2] = C; args[1] = A; args[0] = B; } Commit Message: CWE ID: CWE-476
0
10,649
Analyze the 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 nfs4_close_done(struct rpc_task *task, void *data) { struct nfs4_closedata *calldata = data; struct nfs4_state *state = calldata->state; struct nfs_server *server = NFS_SERVER(calldata->inode); nfs4_stateid *res_stateid = NULL; dprintk("%s: begin!\n", __func__); if (!nfs4_sequence_done(task, &c...
0
57,106
Analyze the 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 Dispatcher::RunScriptsAtDocumentStart(content::RenderFrame* render_frame) { ExtensionFrameHelper* frame_helper = ExtensionFrameHelper::Get(render_frame); if (!frame_helper) return; // The frame is invisible to extensions. frame_helper->RunScriptsAtDocumentStart(); } Commit Message: [Extensions] ...
0
132,578
Analyze the 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 encrypted_rcu_free(struct rcu_head *rcu) { struct encrypted_key_payload *epayload; epayload = container_of(rcu, struct encrypted_key_payload, rcu); memset(epayload->decrypted_data, 0, epayload->decrypted_datalen); kfree(epayload); } Commit Message: KEYS: Fix handling of stored error in a negativ...
0
57,386
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: void OmniboxViewViews::AddedToWidget() { views::Textfield::AddedToWidget(); scoped_compositor_observer_.Add(GetWidget()->GetCompositor()); } Commit Message: omnibox: experiment with restoring placeholder when caret shows Shows the "Search Google or type a URL" omnibox placeholder even when the caret (text e...
0
142,408
Analyze the 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: t2p_disable(TIFF *tif) { T2P *t2p = (T2P*) TIFFClientdata(tif); t2p->outputdisable = 1; } Commit Message: * tools/tiffcrop.c: fix various out-of-bounds write vulnerabilities in heap or stack allocated buffers. Reported as MSVR 35093, MSVR 35096 and MSVR 35097. Discovered by Axel Souchet and Vishal Chauhan from...
0
48,342
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static int special_mapping_mremap(struct vm_area_struct *new_vma) { struct vm_special_mapping *sm = new_vma->vm_private_data; if (WARN_ON_ONCE(current->mm != new_vma->vm_mm)) return -EFAULT; if (sm->mremap) return sm->mremap(sm, new_vma); return 0; } Commit Message: coredump: fix race condition betwee...
0
90,589
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation.
Code: static int sctp_get_port(struct sock *sk, unsigned short snum) { union sctp_addr addr; struct sctp_af *af = sctp_sk(sk)->pf->af; /* Set up a dummy address struct from the sk. */ af->from_sk(&addr, sk); addr.v4.sin_port = htons(snum); /* Note: sk->sk_num gets filled in if ephemeral port request. */ return...
0
43,530
Analyze the 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 smp_send_keypress_notification(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { p_cb->local_keypress_notification = *(uint8_t*)p_data; smp_send_cmd(SMP_OPCODE_PAIR_KEYPR_NOTIF, p_cb); } Commit Message: DO NOT MERGE Fix OOB read before buffer length check Bug: 111936834 Test: manual Change-Id: Ib98528fb62db0d724...
0
162,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: selRotateOrth(SEL *sel, l_int32 quads) { l_int32 i, j, ni, nj, sx, sy, cx, cy, nsx, nsy, ncx, ncy, type; SEL *seld; PROCNAME("selRotateOrth"); if (!sel) return (SEL *)ERROR_PTR("sel not defined", procName, NULL); if (quads < 0 || quads > 4) return (SEL *)ERROR...
0
84,222