instruction
stringclasses
1 value
input
stringlengths
64
129k
output
int64
0
1
__index_level_0__
int64
0
30k
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: LogL10toY(int p10) /* compute luminance from 10-bit LogL */ { if (p10 == 0) return (0.); return (exp(M_LN2/64.*(p10+.5) - M_LN2*12.)); } Commit Message: * libtiff/tif_pixarlog.c, libtiff/tif_luv.c: fix heap-based buffer overflow on generation of PixarLog / LUV compressed files, with ColorMap, TransferFuncti...
0
27,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'.
Code: void HandleLoadTerminationCancel( Offliner::CompletionCallback completion_callback, const SavePageRequest& canceled_request) { std::move(completion_callback) .Run(canceled_request, Offliner::RequestStatus::FOREGROUND_CANCELED); } Commit Message: Remove unused histograms from the background loa...
0
588
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void RunCallbackUntilCallbackInvoked( bool result, UsbMidiDevice::Devices* devices) { factory_->callback_.Run(result, devices); while (!client_->complete_start_session_) { base::RunLoop run_loop; run_loop.RunUntilIdle(); } } Commit Message: MidiManagerUsb should not trust indice...
0
17,223
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: test_bson_append_timeval (void) { struct timeval tv = {0}; bson_t *b; bson_t *b2; tv.tv_sec = 1234567890; tv.tv_usec = 0; b = bson_new (); BSON_ASSERT (bson_append_timeval (b, "time_t", -1, &tv)); b2 = get_bson ("test26.bson"); BSON_ASSERT_BSON_EQUAL (b, b2); bson_destroy (b); b...
0
21,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'.
Code: void rxrpc_remove_user_ID(struct rxrpc_sock *rx, struct rxrpc_call *call) { _debug("RELEASE CALL %d", call->debug_id); if (test_bit(RXRPC_CALL_HAS_USERID, &call->flags)) { write_lock_bh(&rx->call_lock); rb_erase(&call->sock_node, &call->socket->calls); clear_bit(RXRPC_CALL_HAS_USERID, &call->flags); wr...
0
19,909
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void Con_RunConsole (void) { if ( Key_GetCatcher( ) & KEYCATCH_CONSOLE ) con.finalFrac = 0.5; // half screen else con.finalFrac = 0; // none visible if (con.finalFrac < con.displayFrac) { con.displayFrac -= con_conspeed->value*cls.realFrametime*0.001; if (con.finalFrac > con.displayFrac) con....
0
20,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'.
Code: void FileSystemOperation::DoTruncate(const StatusCallback& callback, int64 length) { FileSystemFileUtilProxy::Truncate( &operation_context_, src_util_, src_path_, length, base::Bind(&FileSystemOperation::DidFinishFileOperation, base::Owned(this),...
0
17,998
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: INST_HANDLER (inc) { // INC Rd int d = ((buf[0] >> 4) & 0xf) | ((buf[1] & 0x1) << 4); ESIL_A ("1,r%d,+,", d); // ++Rd ESIL_A ("0,RPICK,0x80,==,vf,=,"); // V ESIL_A ("0,RPICK,0x80,&,!,!,nf,=,"); // N ESIL_A ("0,RPICK,!,zf,=,"); // Z ESIL_A ("vf,nf,^,sf,=,"); // S ESIL_A ("r%d,=,", d); // R...
0
22,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'.
Code: void ExtensionInstalledBubble::Observe( int type, const content::NotificationSource& source, const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_EXTENSION_LOADED) { const Extension* extension = content::Details<const Extension>(details).ptr(); if (extensio...
0
11,162
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: JsVar *jspGetStackTrace() { JsVar *stackTraceName = jsvFindChildFromString(execInfo.hiddenRoot, JSPARSE_STACKTRACE_VAR, false); if (stackTraceName) { JsVar *stackTrace = jsvSkipName(stackTraceName); jsvRemoveChild(execInfo.hiddenRoot, stackTraceName); jsvUnLock(stackTraceName); return stackTra...
0
24,315
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void BindToCurrentThread() { thread_task_runner_handle_ = MakeUnique<ThreadTaskRunnerHandle>(simple_task_runner_); run_loop_client_ = RunLoop::RegisterDelegateForCurrentThread(this); } Commit Message: Introduce RunLoop::Type::NESTABLE_TASKS_ALLOWED to replace MessageLoop::ScopedNestableTask...
0
18,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'.
Code: void OnSecondResult(std::unique_ptr<runtime::EvaluateResult> result) { EXPECT_TRUE(result->GetResult()->HasValue()); EXPECT_EQ(27 * 4, result->GetResult()->GetValue()->GetInt()); FinishAsynchronousTest(); } Commit Message: Implicitly bypass localhost when proxying requests. This aligns Chrome's...
0
9,294
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void RenderWidgetHostImpl::OnMsgUpdateIsDelayed() { if (in_get_backing_store_) abort_get_backing_store_ = true; } Commit Message: Implement TextureImageTransportSurface using texture mailbox This has a couple of advantages: - allow tearing down and recreating the UI parent context without losing the rende...
0
13,675
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bool vfs_init_custom(connection_struct *conn, const char *vfs_object) { char *module_path = NULL; char *module_name = NULL; char *module_param = NULL, *p; vfs_handle_struct *handle; const struct vfs_init_function_entry *entry; if (!conn||!vfs_object||!vfs_object[0]) { DEBUG(0, ("vfs_init_custom() called ...
0
18,066
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void CairoOutputDev::updateStrokeOpacity(GfxState *state) { stroke_opacity = state->getStrokeOpacity(); cairo_pattern_destroy(stroke_pattern); stroke_pattern = cairo_pattern_create_rgba(stroke_color.r / 65535.0, stroke_color.g / 65535.0, stroke_color.b / 65535.0, stroke_opacit...
0
10,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'.
Code: void GLES2DecoderPassthroughImpl::RestoreState(const ContextState* prev_state) { } Commit Message: Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM This makes the query of GL_COMPLETION_STATUS_KHR to programs much cheaper by minimizing the round-trip to the GPU thread. Bug: 881152, 957001 Change-Id: Iadfa798af29225e75...
0
2,484
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: schemes_are_similar_p (enum url_scheme a, enum url_scheme b) { if (a == b) return true; #ifdef HAVE_SSL if ((a == SCHEME_HTTP && b == SCHEME_HTTPS) || (a == SCHEME_HTTPS && b == SCHEME_HTTP)) return true; #endif return false; } Commit Message: CWE ID: CWE-93
0
11,569
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: int fpm_stdio_init_child(struct fpm_worker_pool_s *wp) /* {{{ */ { #ifdef HAVE_SYSLOG_H if (fpm_globals.error_log_fd == ZLOG_SYSLOG) { closelog(); /* ensure to close syslog not to interrupt with PHP syslog code */ } else #endif /* Notice: child cannot use master error_log * because not aware when being re...
1
23,399
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void AutofillManager::OnShowAutofillDialog() { Browser* browser = BrowserList::GetLastActive(); if (browser) browser->ShowOptionsTab(chrome::kAutofillSubPage); } Commit Message: Add support for the "uploadrequired" attribute for Autofill query responses BUG=84693 TEST=unit_tests --gtest_filter=AutofillD...
0
13,896
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int em_test(struct x86_emulate_ctxt *ctxt) { emulate_2op_SrcV(ctxt, "test"); /* Disable writeback. */ ctxt->dst.type = OP_NONE; return X86EMUL_CONTINUE; } Commit Message: KVM: x86: fix missing checks in syscall emulation On hosts without this patch, 32bit guests will crash (and 64bit guests may behav...
0
26,504
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int PC4500_accessrid(struct airo_info *ai, u16 rid, u16 accmd) { Cmd cmd; /* for issuing commands */ Resp rsp; /* response from commands */ u16 status; memset(&cmd, 0, sizeof(cmd)); cmd.cmd = accmd; cmd.parm0 = rid; status = issuecommand(ai, &cmd, &rsp); if (status != 0) return status; if ( (rsp....
0
8,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'.
Code: vbf_stp_fetchbody(struct worker *wrk, struct busyobj *bo) { ssize_t l; uint8_t *ptr; enum vfp_status vfps = VFP_ERROR; ssize_t est; struct vfp_ctx *vfc; CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC); vfc = bo->vfc; CHECK_OBJ_NOTNULL(vfc, VFP_CTX_MAGIC); AN(vfc->vfp_nxt); est = bo->htc->content_length; if (es...
0
22,672
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int init_victim_secmap(struct f2fs_sb_info *sbi) { struct dirty_seglist_info *dirty_i = DIRTY_I(sbi); unsigned int bitmap_size = f2fs_bitmap_size(MAIN_SECS(sbi)); dirty_i->victim_secmap = f2fs_kvzalloc(bitmap_size, GFP_KERNEL); if (!dirty_i->victim_secmap) return -ENOMEM; return 0; } Commit Messag...
0
28,634
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void checkAppendMsg( IntegrityCk *pCheck, const char *zFormat, ... ){ va_list ap; if( !pCheck->mxErr ) return; pCheck->mxErr--; pCheck->nErr++; va_start(ap, zFormat); if( pCheck->errMsg.nChar ){ sqlite3StrAccumAppend(&pCheck->errMsg, "\n", 1); } if( pCheck->zPfx ){ sqlite3XPri...
0
17,306
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bool SelectionController::HandlePasteGlobalSelection( const WebMouseEvent& mouse_event) { if (mouse_event.GetType() != WebInputEvent::kMouseUp) return false; if (!frame_->GetPage()) return false; Frame* focus_frame = frame_->GetPage()->GetFocusController().FocusedOrMainFrame(); if (fram...
0
469
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void GLES2DecoderImpl::RestoreAllAttributes() const { state_.RestoreVertexAttribs(); } Commit Message: Framebuffer clear() needs to consider the situation some draw buffers are disabled. This is when we expose DrawBuffers extension. BUG=376951 TEST=the attached test case, webgl conformance R=kbr@chromium.org...
0
7,921
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: png_read_start_row(png_structp png_ptr) { #ifdef PNG_READ_INTERLACING_SUPPORTED /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ /* Start of interlace block */ PNG_CONST int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; /* Offset to next interlace block */ PNG_CONST int png_pa...
0
25,147
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int pmcraid_suspend(struct pci_dev *pdev, pm_message_t state) { struct pmcraid_instance *pinstance = pci_get_drvdata(pdev); pmcraid_shutdown(pdev); pmcraid_disable_interrupts(pinstance, ~0); pmcraid_kill_tasklets(pinstance); pci_set_drvdata(pinstance->pdev, pinstance); pmcraid_unregister_interrupt_h...
0
27,650
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void compute_bandwidth(void) { unsigned bandwidth; int i; FFServerStream *stream; for(stream = config.first_stream; stream; stream = stream->next) { bandwidth = 0; for(i=0;i<stream->nb_streams;i++) { LayeredAVStream *st = stream->streams[i]; switch(s...
0
29,210
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void RenderWidgetHostImpl::Paste() { Send(new ViewMsg_Paste(GetRoutingID())); RecordAction(UserMetricsAction("Paste")); } Commit Message: Implement TextureImageTransportSurface using texture mailbox This has a couple of advantages: - allow tearing down and recreating the UI parent context without losing the...
0
27,702
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: make_log_entry( httpd_conn* hc, struct timeval* nowP ) { char* ru; char url[305]; char bytes[40]; if ( hc->hs->no_log ) return; /* This is straight CERN Combined Log Format - the only tweak ** being that if we're using syslog() we leave out the date, because ** syslogd puts it i...
0
20,211
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: set_permissions_file (SetPermissionsJob *job, GFile *file, GFileInfo *info) { CommonJob *common; GFileInfo *child_info; gboolean free_info; guint32 current; guint32 value; guint32 mask; GFileEnumerator *enumerator; GFi...
0
24,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'.
Code: static inline int qeth_is_cq(struct qeth_card *card, unsigned int queue) { return card->options.cq == QETH_CQ_ENABLED && card->qdio.c_q != NULL && queue != 0 && queue == card->qdio.no_in_queues - 1; } Commit Message: qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioc...
0
28,447
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: int GahpClient::ec2_ping(const char *service_url, const char * publickeyfile, const char * privatekeyfile) { static const char* command = "EC2_VM_STATUS_ALL"; char* esc1 = strdup( escapeGahpString(service_url) ); char* esc2 = strdup( escapeGahpString(publickeyfile) ); char* esc3 = strdup( escapeGahpString(p...
0
29,983
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bool GLES2DecoderImpl::DoBindOrCopyTexImageIfNeeded(Texture* texture, GLenum textarget, GLuint texture_unit) { if (texture && !texture->IsAttachedToFramebuffer()) { Texture::ImageState image_state; gl...
0
24,158
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void WebRtcAudioRenderer::Stop() { base::AutoLock auto_lock(lock_); if (state_ == UNINITIALIZED) return; source_->RemoveRenderer(this); source_ = NULL; sink_->Stop(); state_ = UNINITIALIZED; } Commit Message: Avoids crash in WebRTC audio clients for 96kHz render rate on Mac OSX. TBR=xians BUG=1...
0
14,419
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int usb_dev_prepare(struct device *dev) { return 0; /* Implement eventually? */ } Commit Message: USB: check usb_get_extra_descriptor for proper size When reading an extra descriptor, we need to properly check the minimum and maximum size allowed, to prevent from invalid data being sent by a device. R...
0
26,366
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: WebContents* WebContentsAddedObserver::GetWebContents() { if (web_contents_) return web_contents_; runner_ = new MessageLoopRunner(); runner_->Run(); return web_contents_; } Commit Message: Apply ExtensionNavigationThrottle filesystem/blob checks to all frames. BUG=836858 Change-Id: I34333a7250112...
0
4,511
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void __wait_discard_cmd(struct f2fs_sb_info *sbi, bool wait_cond) { struct discard_cmd_control *dcc = SM_I(sbi)->dcc_info; struct list_head *wait_list = &(dcc->wait_list); struct discard_cmd *dc, *tmp; bool need_wait; next: need_wait = false; mutex_lock(&dcc->cmd_lock); list_for_each_entry_safe(dc...
0
20,985
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void HeadlessWebContentsImpl::CreateTabSocketMojoService( mojo::ScopedMessagePipeHandle handle) { headless_tab_socket_->CreateMojoService(TabSocketRequest(std::move(handle))); } Commit Message: Use pdf compositor service for printing when OOPIF is enabled When OOPIF is enabled (by site-per-process flag or...
0
6,041
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void ip_vs_control_cleanup(void) { EnterFunction(2); ip_vs_trash_cleanup(); cancel_rearming_delayed_work(&defense_work); cancel_work_sync(&defense_work.work); ip_vs_kill_estimator(&ip_vs_stats); unregister_sysctl_table(sysctl_header); proc_net_remove(&init_net, "ip_vs_stats"); proc_net_remove(&init_net, "...
0
16,349
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: JPEGImageReader(JPEGImageDecoder* decoder) : m_decoder(decoder) , m_bufferLength(0) , m_bytesToSkip(0) , m_state(JPEG_HEADER) , m_samples(0) #if USE(QCMSLIB) , m_transform(0) #endif { memset(&m_info, 0, sizeof(jpeg_decompress_struct)); m_inf...
0
18,561
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static snd_pcm_sframes_t snd_pcm_lib_write1(struct snd_pcm_substream *substream, unsigned long data, snd_pcm_uframes_t size, int nonblock, transfer_f transfer) { struct snd_pcm_runtime *runtime = substream->runtime; snd_pcm_uframes_t xfer = 0; snd_pcm_uframes_t offset = 0; ...
0
26,912
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bool HandleWebUIReverse(GURL* url, content::BrowserContext* browser_context) { if (!url->is_valid() || !url->SchemeIs(chrome::kChromeUIScheme)) return false; return RemoveUberHost(url); } Commit Message: Ensure extensions and the Chrome Web Store are loaded in new BrowsingInstances. BUG=174943 TEST=Can...
0
14,059
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: cf2_getLanguageGroup( CFF_Decoder* decoder ) { FT_ASSERT( decoder && decoder->current_subfont ); return decoder->current_subfont->private_dict.language_group; } Commit Message: CWE ID: CWE-20
0
6,620
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void qrio_prst(u8 bit, bool en, bool wden) { u16 prst; void __iomem *qrio_base = (void *)CONFIG_SYS_QRIO_BASE; qrio_wdmask(bit, wden); prst = in_be16(qrio_base + PRST_OFF); if (en) prst &= ~(1 << bit); else prst |= (1 << bit); out_be16(qrio_base + PRST_OFF, prst); } Commit Message: Merge branch '2...
0
5,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'.
Code: create_backup (char const *to, struct stat *to_st, int *to_errno, bool leave_original, bool remember_backup) { struct stat tmp_st; int tmp_errno; /* When the input to patch modifies the same file more than once, patch only backs up the initial version of each file. To figure out which fi...
0
21,453
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static size_t all_data_cb(const void *ptr, size_t size, size_t nmemb, void *user_data) { struct data_buffer *db = (struct data_buffer *)user_data; size_t len = size * nmemb; size_t oldlen, newlen; void *newmem; static const unsigned char zero = 0; oldlen = db->len; newlen = oldlen + len; newmem = r...
0
11,882
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst, const void *daddr) { struct neigh_table *tbl = &arp_tbl; static const __be32 inaddr_any = 0; struct net_device *dev = dst->dev; const __be32 *pkey = daddr; struct neighbour *n; #if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MOD...
0
1,237
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void FileEnumerator::GetFindInfo(FindInfo* info) { DCHECK(info); if (current_directory_entry_ >= directory_entries_.size()) return; DirectoryEntryInfo* cur_entry = &directory_entries_[current_directory_entry_]; memcpy(&(info->stat), &(cur_entry->stat), sizeof(info->stat)); info->filename.assign(cu...
0
6,557
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: ext4_file_write_iter(struct kiocb *iocb, struct iov_iter *from) { struct file *file = iocb->ki_filp; struct inode *inode = file_inode(iocb->ki_filp); struct mutex *aio_mutex = NULL; struct blk_plug plug; int o_direct = file->f_flags & O_DIRECT; int overwrite = 0; size_t length = iov_iter_count(from); ssiz...
0
13,270
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void hardware_disable(void *junk) { raw_spin_lock(&kvm_lock); hardware_disable_nolock(junk); raw_spin_unlock(&kvm_lock); } Commit Message: KVM: unmap pages from the iommu when slots are removed commit 32f6daad4651a748a58a3ab6da0611862175722f upstream. We've been adding new mappings, but not destroyin...
0
23,585
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static UPNP_INLINE int get_alias( /*! [in] request file passed in to be compared with. */ const char *request_file, /*! [out] xml alias object which has a file name stored. */ struct xml_alias_t *alias, /*! [out] File information object which will be filled up if the file * comparison succeeds. */ UpnpFil...
0
4,952
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void coroutine_fn v9fs_setattr(void *opaque) { int err = 0; int32_t fid; V9fsFidState *fidp; size_t offset = 7; V9fsIattr v9iattr; V9fsPDU *pdu = opaque; err = pdu_unmarshal(pdu, offset, "dI", &fid, &v9iattr); if (err < 0) { goto out_nofid; } fidp = get_fid...
0
29,671
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bool CompareData(const CompoundBuffer& buffer, char* data, int size) { scoped_refptr<IOBuffer> buffer_data = buffer.ToIOBufferWithSize(); return buffer.total_bytes() == size && memcmp(buffer_data->data(), data, size) == 0; } Commit Message: iwyu: Include callback_old.h where appropriate, fina...
0
29,695
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: SWFShape_getLines(SWFShape shape, SWFLineStyle** lines, int* nLines) { *lines = shape->lines; *nLines = shape->nLines; } Commit Message: SWFShape_setLeftFillStyle: prevent fill overflow CWE ID: CWE-119
0
18,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'.
Code: GLuint GetSamplerServiceID(GLuint client_id, PassthroughResources* resources) { return resources->sampler_id_map.GetServiceIDOrInvalid(client_id); } Commit Message: Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM This makes the query of GL_COMPLETION_STATUS_KHR to programs much cheaper by minimizing the round-trip t...
0
4,152
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int sctp_setsockopt_default_send_param(struct sock *sk, char __user *optval, int optlen) { struct sctp_sndrcvinfo info; struct sctp_association *asoc; struct sctp_sock *sp = sctp_sk(sk); if (optlen != sizeof(struct sctp_sndrcvinfo)) return -EINVAL; if (copy_from_user(&info, optval, optlen)) ...
0
29,513
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: ssize_t AMediaCodec_dequeueOutputBuffer(AMediaCodec *mData, AMediaCodecBufferInfo *info, int64_t timeoutUs) { size_t idx; size_t offset; size_t size; uint32_t flags; int64_t presentationTimeUs; status_t ret = mData->mCodec->dequeueOutputBuffer(&idx, &offset, &size, &presentationTimeUs, &flags, timeoutUs);...
0
22,046
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void put_mspel8_mc20_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) { wmv2_mspel8_h_lowpass(dst, src, stride, stride, 8); } Commit Message: avcodec/dsputil: fix signedness in sizeof() comparissions Signed-off-by: Michael Niedermayer <michaelni@gmx.at> CWE ID: CWE-189
0
8,038
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bool Layer::OpacityIsAnimating() const { return layer_animation_controller_->IsAnimatingProperty(Animation::Opacity); } Commit Message: Removed pinch viewport scroll offset distribution The associated change in Blink makes the pinch viewport a proper ScrollableArea meaning the normal path for synchronizing la...
0
15,733
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static ssize_t uart_mode_store(struct device *dev, struct device_attribute *attr, const char *valbuf, size_t count) { struct usb_serial_port *port = to_usb_serial_port(dev); struct edgeport_port *edge_port = usb_get_serial_port_data(port); unsigned int v = simple_strtoul(valbuf, NULL, 0); dev_dbg(dev, "%s: ...
0
15,599
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void BrowserWindowGtk::InvalidateInfoBarBits() { gtk_widget_queue_draw(toolbar_border_); gtk_widget_queue_draw(toolbar_->widget()); if (bookmark_bar_.get() && browser_->bookmark_bar_state() != BookmarkBar::DETACHED) { gtk_widget_queue_draw(bookmark_bar_->widget()); } } Commit Message: Remove Ta...
0
15,236
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bool IsFormTextArea(PDFiumPage::Area area, int form_type) { if (form_type == FPDF_FORMFIELD_UNKNOWN) return false; DCHECK_EQ(area, PDFiumPage::FormTypeToArea(form_type)); return area == PDFiumPage::FORM_TEXT_AREA; } Commit Message: [pdf] Use a temporary list when unloading pages When traversing the |...
0
24,787
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: vips_foreign_load_gif_load( VipsForeignLoad *load ) { VipsForeignLoadGifClass *class = (VipsForeignLoadGifClass *) VIPS_OBJECT_GET_CLASS( load ); VipsForeignLoadGif *gif = (VipsForeignLoadGif *) load; VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( load ), 4 ); /* Rewind. */ if(...
0
23,627
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: NetworkActionPredictor::TransitionalMatch::TransitionalMatch() { } Commit Message: Removing dead code from NetworkActionPredictor. BUG=none Review URL: http://codereview.chromium.org/9358062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121926 0039d316-1c4b-4281-b951-d872f2087c98 CWE ID: CWE-20
0
29,652
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: COMPAT_SYSCALL_DEFINE4(rt_tgsigqueueinfo, compat_pid_t, tgid, compat_pid_t, pid, int, sig, struct compat_siginfo __user *, uinfo) { siginfo_t info = {}; if (copy_siginfo_from_user32(&info, uinfo)) return -EFAULT; return do_rt_tgsigqueueinfo(tgid, pid, sig, &info); } Commit Message: kernel/signa...
0
14,815
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: R_API RConfigNode* r_config_set(RConfig *cfg, const char *name, const char *value) { RConfigNode *node = NULL; char *ov = NULL; ut64 oi; if (!cfg || STRNULL (name)) { return NULL; } node = r_config_node_get (cfg, name); if (node) { if (node->flags & CN_RO) { eprintf ("(error: '%s' config key is read...
1
6,361
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: int is_fault_pfn(pfn_t pfn) { return pfn == fault_pfn; } Commit Message: KVM: unmap pages from the iommu when slots are removed commit 32f6daad4651a748a58a3ab6da0611862175722f upstream. We've been adding new mappings, but not destroying old mappings. This can lead to a page leak as pages are pinned using get_...
0
15,779
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int do_recv_XMotionEvent(rpc_message_t *message, XEvent *xevent) { char is_hint; int32_t x, y, x_root, y_root, same_screen; uint32_t root, subwindow, time, state; int error; if ((error = do_recv_XAnyEvent(message, xevent)) < 0) return error; if ((error = rpc_message_recv_uint32(message, &root)...
0
25,363
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: xps_find_sfnt_table(xps_font_t *font, const char *name, int *lengthp) { int offset; int ntables; int i; if (font->length < 12) return -1; if (!memcmp(font->data, "ttcf", 4)) { int nfonts = u32(font->data + 8); if (font->subfontid < 0 || font->subfontid >= nfonts) ...
0
19,382
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static inline Eina_Bool _ewk_frame_handle_key_scrolling(WebCore::Frame* frame, const WebCore::PlatformKeyboardEvent& keyEvent) { WebCore::ScrollDirection direction; WebCore::ScrollGranularity granularity; int keyCode = keyEvent.windowsVirtualKeyCode(); switch (keyCode) { case VK_SPACE: ...
0
5,628
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bool GLES2DecoderPassthroughImpl::HasPendingQueries() const { return !pending_queries_.empty(); } Commit Message: Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM This makes the query of GL_COMPLETION_STATUS_KHR to programs much cheaper by minimizing the round-trip to the GPU thread. Bug: 881152, 957001 Change-Id: I...
0
2,102
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: ofproto_type_wait(const char *datapath_type) { const struct ofproto_class *class; datapath_type = ofproto_normalize_type(datapath_type); class = ofproto_class_find__(datapath_type); if (class->type_wait) { class->type_wait(datapath_type); } } Commit Message: ofproto: Fix OVS crash w...
0
8,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'.
Code: static unsigned int floppy_check_events(struct gendisk *disk, unsigned int clearing) { int drive = (long)disk->private_data; if (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags) || test_bit(FD_VERIFY_BIT, &UDRS->flags)) return DISK_EVENT_MEDIA_CHANGE; if (time_after(jiffies, UDRS->last_checked + UDP->...
0
5,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'.
Code: static uint8_t single_lfe_channel_element(NeAACDecStruct *hDecoder, bitfile *ld, uint8_t channel, uint8_t *tag) { uint8_t retval = 0; element sce = {0}; ic_stream *ics = &(sce.ics1); ALIGN int16_t spec_data[1024] = {0}; sce.element_instance_tag = (uin...
0
28,889
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void WebRuntimeFeatures::EnableWorkStealingInScriptRunner(bool enable) { RuntimeEnabledFeatures::SetWorkStealingInScriptRunnerEnabled(enable); } Commit Message: Remove RequireCSSExtensionForFile runtime enabled flag. The feature has long since been stable (since M64) and doesn't seem to be a need for this fla...
0
6,095
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: status_t SoftAVC::setParams(size_t stride) { ivd_ctl_set_config_ip_t s_ctl_ip; ivd_ctl_set_config_op_t s_ctl_op; IV_API_CALL_STATUS_T status; s_ctl_ip.u4_disp_wd = (UWORD32)stride; s_ctl_ip.e_frm_skip_mode = IVD_SKIP_NONE; s_ctl_ip.e_frm_out_mode = IVD_DISPLAY_FRAME_OUT; s_ctl_ip.e_vid_dec_...
0
18,622
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: nfsd4_encode_layoutcommit(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_layoutcommit *lcp) { struct xdr_stream *xdr = &resp->xdr; __be32 *p; if (nfserr) return nfserr; p = xdr_reserve_space(xdr, 4); if (!p) return nfserr_resource; *p++ = cpu_to_be32(lcp->lc_size_chg); if (lcp->lc_s...
0
11,930
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: int main (int argc, char **argv) { int c; bool lock_memory = false; bool do_daemonize = false; bool preallocate = false; int maxcore = 0; char *username = NULL; char *pid_file = NULL; struct passwd *pw; struct rlimit rlim; char *buf; char unit = '\0'; int size_max =...
0
6,287
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bgp_attr_parse (struct peer *peer, struct attr *attr, bgp_size_t size, struct bgp_nlri *mp_update, struct bgp_nlri *mp_withdraw) { int ret; u_char flag = 0; u_char type = 0; bgp_size_t length; u_char *startp, *endp; u_char *attr_endp; u_char seen[BGP_ATTR_BITMAP_SIZE]; /* we need the as4_path on...
0
26,947
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static input_translation_t *setup_translation_table (exporter_ipfix_domain_t *exporter, uint16_t id) { input_translation_t *table; extension_map_t *extension_map; uint32_t i, ipv6, offset, next_extension; size_t size_required; ipv6 = 0; table = GetTranslationTable(exporter, id); if ( !table ) { LogIn...
0
7,639
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: status_t OMXCodec::getVideoProfileLevel( const sp<MetaData>& meta, const CodecProfileLevel& defaultProfileLevel, CodecProfileLevel &profileLevel) { CODEC_LOGV("Default profile: %u, level #x%x", defaultProfileLevel.mProfile, defaultProfileLevel.mLevel); int32_t profile, level; if (!meta->find...
0
5,891
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static ssize_t aio_run_iocb(struct kiocb *req, unsigned opcode, char __user *buf, bool compat) { struct file *file = req->ki_filp; ssize_t ret; unsigned long nr_segs; int rw; fmode_t mode; aio_rw_op *rw_op; struct iovec inline_vec, *iovec = &inline_vec; switch (opcode) { case IOCB_CMD_PREAD: cas...
0
22,496
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static int lua_translate_name_harness(request_rec *r) { return lua_request_rec_hook_harness(r, "translate_name", APR_HOOK_MIDDLE); } Commit Message: Merge r1642499 from trunk: *) SECURITY: CVE-2014-8109 (cve.mitre.org) mod_lua: Fix handling of the Require line when a LuaAuthzProvider is used in ...
0
23,156
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: scpio(void *_cnt, size_t s) { off_t *cnt = (off_t *)_cnt; *cnt += s; if (limit_kbps > 0) bandwidth_limit(&bwlimit, s); return 0; } Commit Message: upstream: disallow empty incoming filename or ones that refer to the current directory; based on report/patch from Harry Sintonen OpenBSD-Commit-ID: f27651b3...
0
9,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'.
Code: compat_do_ip6t_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 IP6T_SO_GET_INFO: ret = get_info(sock_net(sk), user, len, 1); break; case IP6T_SO_GET_ENTRIES: ret = compat_get_entries(...
0
26,287
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: gst_tag_to_vorbis_tag (const gchar * gst_tag) { int i = 0; g_return_val_if_fail (gst_tag != NULL, NULL); gst_tag_register_musicbrainz_tags (); while (tag_matches[i].gstreamer_tag != NULL) { if (strcmp (gst_tag, tag_matches[i].gstreamer_tag) == 0) { return tag_matches[i].original_tag; } ...
0
12,897
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: bool RenderProcessHostImpl::Send(IPC::Message* msg) { if (!channel_.get()) { if (!is_initialized_) { queued_messages_.push(msg); return true; } else { delete msg; return false; } } if (child_process_launcher_.get() && child_process_launcher_->IsStarting()) { queued_m...
0
9,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'.
Code: bool ContextualSearchFieldTrial::IsSendBasePageURLDisabled() { return GetBooleanParam(kContextualSearchSendURLDisabledParamName, &is_send_base_page_url_disabled_cached_, &is_send_base_page_url_disabled_); } Commit Message: [Contextual Search] Change "Now on Tap...
0
3,571
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: TestInterceptor() : intercept_main_request_(false), restart_main_request_(false), cancel_main_request_(false), cancel_then_restart_main_request_(false), simulate_main_network_error_(false), intercept_redirect_(false), cancel_redirect_request_(false), intercept_final_respons...
0
25,711
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: poppler_page_get_text_page (PopplerPage *page) { if (page->text == NULL) { cairo_t *cr; cairo_surface_t *surface; surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, 1, 1); cr = cairo_create (surface); poppler_page_render (page, cr); cairo_destroy (cr); cairo_surface_destroy (...
0
20,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'.
Code: size_t AppendDataInBuilder(BlobDataBuilder* builder, size_t index, disk_cache::Entry* cache_entry) { size_t size = 0; if (index % 2 != 0) { builder->AppendFutureData(5u); size += 5u; if (index % 3 == 1) { builder->AppendData("abcdefghij",...
0
23,775
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: hugetlb_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { struct mm_struct *mm = current->mm; struct vm_area_struct *vma; unsigned long start_addr; struct hstate *h = hstate_file(file); if (len & ~huge_page_mask(h)) return -EINVAL; i...
0
21,278
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: static void airo_process_scan_results (struct airo_info *ai) { union iwreq_data wrqu; BSSListRid bss; int rc; BSSListElement * loop_net; BSSListElement * tmp_net; /* Blow away current list of scan results */ list_for_each_entry_safe (loop_net, tmp_net, &ai->network_list, list) { list_move_tail (&loop_ne...
0
16,527
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: SPL_METHOD(SplDoublyLinkedList, offsetGet) { zval *zindex; zend_long index; spl_dllist_object *intern; spl_ptr_llist_element *element; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zindex) == FAILURE) { return; } intern = Z_SPLDLLIST_P(getThis()); index = spl...
0
23,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'.
Code: void PrintRenderFrameHelper::PrintPreviewContext::ClearContext() { prep_frame_view_.reset(); metafile_.reset(); pages_to_render_.clear(); error_ = PREVIEW_ERROR_NONE; } Commit Message: Correct mojo::WrapSharedMemoryHandle usage Fixes some incorrect uses of mojo::WrapSharedMemoryHandle which were assumin...
0
12,160
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: void ChromeClientImpl::MainFrameScrollOffsetChanged() const { web_view_->MainFrameScrollOffsetChanged(); } Commit Message: If a page calls |window.focus()|, kick it out of fullscreen. BUG=776418, 800056 Change-Id: I1880fe600e4814c073f247c43b1c1ac80c8fc017 Reviewed-on: https://chromium-review.googlesource.com...
0
19,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'.
Code: void ptrace_notify(int exit_code) { siginfo_t info; BUG_ON((exit_code & (0x7f | ~0xffff)) != SIGTRAP); memset(&info, 0, sizeof info); info.si_signo = SIGTRAP; info.si_code = exit_code; info.si_pid = task_pid_vnr(current); info.si_uid = current_uid(); /* Let the debugger run. */ spin_lock_irq(&current...
0
23,646
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'.
Code: content::ResourceRequestInfo::WebContentsGetter GetWebContentsGetter( content::WebContents* web_contents) { int frame_tree_node_id = web_contents->GetMainFrame()->GetFrameTreeNodeId(); if (frame_tree_node_id != -1) { return base::Bind(content::WebContents::FromFrameTreeNodeId, fr...
0
9,077