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: static void vmx_inject_irq(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
uint32_t intr;
int irq = vcpu->arch.interrupt.nr;
trace_kvm_inj_virq(irq);
++vcpu->stat.irq_injections;
if (vmx->rmode.vm86_active) {
int inc_eip = 0;
if (vcpu->arch.interrupt.soft)
inc_eip = vcpu->arch.event_e... | 0 | 3,170 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: QQuickWebPage* QQuickWebView::page()
{
Q_D(QQuickWebView);
return d->pageView.data();
}
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 QQuickWebViewExperimental.
This uses the exi... | 0 | 2,552 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PHP_RSHUTDOWN_FUNCTION(phar) /* {{{ */
{
int i;
PHAR_GLOBALS->request_ends = 1;
if (PHAR_GLOBALS->request_init)
{
phar_release_functions(TSRMLS_C);
zend_hash_destroy(&(PHAR_GLOBALS->phar_alias_map));
PHAR_GLOBALS->phar_alias_map.arBuckets = NULL;
zend_hash_destroy(&(PHAR_GLOBALS->phar_fname_map));
... | 0 | 4,855 |
Analyze the following 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 __sock_recvmsg_nosec(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t size, int flags)
{
return sock->ops->recvmsg(iocb, sock, msg, size, flags);
}
Commit Message: net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom
Cc: stable@vger.kerne... | 0 | 10,819 |
Analyze the following 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 cm_send_handler(struct ib_mad_agent *mad_agent,
struct ib_mad_send_wc *mad_send_wc)
{
struct ib_mad_send_buf *msg = mad_send_wc->send_buf;
struct cm_port *port;
u16 attr_index;
port = mad_agent->context;
attr_index = be16_to_cpu(((struct ib_mad_hdr *)
msg->mad)->attr_id) - CM_ATTR_I... | 0 | 7,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: xsltFreeExtData(xsltExtDataPtr ext)
{
if (ext == NULL)
return;
xmlFree(ext);
}
Commit Message: Roll libxslt to 891681e3e948f31732229f53cb6db7215f740fc7
BUG=583156,583171
Review URL: https://codereview.chromium.org/1853083002
Cr-Commit-Position: refs/heads/master@{#385338}
CWE ID: CWE-119 | 0 | 22,081 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ResourceFetcher::RevalidationPolicy ResourceFetcher::determineRevalidationPolicy(Resource::Type type, ResourceRequest& request, bool forPreload, Resource* existingResource, FetchRequest::DeferOption defer, const ResourceLoaderOptions& options) const
{
if (!existingResource)
return Load;
if (forPr... | 0 | 23,894 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool PermissionsData::HasHostPermission(const GURL& url) const {
base::AutoLock auto_lock(runtime_lock_);
return active_permissions_unsafe_->HasExplicitAccessToOrigin(url) &&
!IsPolicyBlockedHostUnsafe(url);
}
Commit Message: Call CanCaptureVisiblePage in page capture API.
Currently the pageCapture... | 0 | 10,574 |
Analyze the following 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* hashbin_remove( hashbin_t* hashbin, long hashv, const char* name)
{
int bin, found = FALSE;
unsigned long flags = 0;
irda_queue_t* entry;
IRDA_ASSERT( hashbin != NULL, return NULL;);
IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;);
/*
* Locate hashbin
*/
if ( name )
hashv = hash( name ... | 0 | 411 |
Analyze the following 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 arcmsr_write_ioctldata2iop_in_DWORD(struct AdapterControlBlock *acb)
{
uint8_t *pQbuffer;
struct QBUFFER __iomem *pwbuffer;
uint8_t *buf1 = NULL;
uint32_t __iomem *iop_data;
uint32_t allxfer_len = 0, data_len, *buf2 = NULL, data;
if (acb->acb_flags & ACB_F_MESSAGE_WQBUFFER_READED) {
buf1 = km... | 0 | 19,647 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: OMX_ERRORTYPE SoftVPXEncoder::internalGetParameter(OMX_INDEXTYPE index,
OMX_PTR param) {
const int32_t indexFull = index;
switch (indexFull) {
case OMX_IndexParamVideoBitrate: {
OMX_VIDEO_PARAM_BITRATETYPE *bitrate =
(OMX_VIDEO_PARAM_BITRATETYPE ... | 0 | 4,056 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: long long Cluster::GetElementSize() const { return m_element_size; }
Commit Message: external/libvpx/libwebm: Update snapshot
Update libwebm snapshot. This update contains security fixes from upstream.
Upstream git hash: 229f49347d19b0ca0941e072b199a242ef6c5f2b
BUG=23167726
Change-Id: Id3e140e7b31ae11294724... | 0 | 8,979 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: raptor_turtle_writer_set_option_string(raptor_turtle_writer *turtle_writer,
raptor_option option,
const unsigned char *value)
{
if(!value ||
!raptor_option_is_valid_for_area(option, RAPTOR_OPTION_AREA_TURTLE_WRITER))
retu... | 0 | 26,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'. | Code: static int handle_dr(struct kvm_vcpu *vcpu)
{
unsigned long exit_qualification;
int dr, reg;
/* Do not handle if the CPL > 0, will trigger GP on re-entry */
if (!kvm_require_cpl(vcpu, 0))
return 1;
dr = vmcs_readl(GUEST_DR7);
if (dr & DR7_GD) {
/*
* As the vm-exit takes precedence over the debug tra... | 0 | 3,339 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: uint32_t radeon_atom_get_memory_clock(struct radeon_device *rdev)
{
GET_MEMORY_CLOCK_PS_ALLOCATION args;
int index = GetIndexIntoMasterTable(COMMAND, GetMemoryClock);
atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
return args.ulReturnMemoryClock;
}
Commit Message: drivers/gpu/dr... | 0 | 11,736 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void ssl_write_max_fragment_length_ext( mbedtls_ssl_context *ssl,
unsigned char *buf,
size_t *olen )
{
unsigned char *p = buf;
if( ssl->session_negotiate->mfl_code == MBEDTLS_SSL_MAX_FRAG_LEN_NONE )
{... | 0 | 23,629 |
Analyze the following 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 MediaInterfaceProxy::CreateVideoDecoder(
media::mojom::VideoDecoderRequest request) {
DCHECK(thread_checker_.CalledOnValidThread());
GetMediaInterfaceFactory()->CreateVideoDecoder(std::move(request));
}
Commit Message: media: Support hosting mojo CDM in a standalone service
Currently when mojo CDM ... | 0 | 27,669 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: RedirectTest() {}
Commit Message: Revert "Don't sniff HTML from documents delivered via the file protocol"
This reverts commit 3519e867dc606437f804561f889d7ed95b95876a.
Reason for revert: crbug.com/786150. Application compatibility for Android WebView applications means we need to allow sniffing on that plat... | 0 | 10,383 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void AppLauncherHandler::OnExtensionPreferenceChanged() {
base::DictionaryValue dictionary;
FillAppDictionary(&dictionary);
web_ui()->CallJavascriptFunction("ntp.appsPrefChangeCallback", dictionary);
}
Commit Message: Remove --disable-app-shims.
App shims have been enabled by default for 3 milestones
(sin... | 0 | 19,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: 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 | 25,692 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int fuse_notify_retrieve(struct fuse_conn *fc, unsigned int size,
struct fuse_copy_state *cs)
{
struct fuse_notify_retrieve_out outarg;
struct inode *inode;
int err;
err = -EINVAL;
if (size != sizeof(outarg))
goto copy_finish;
err = fuse_copy_one(cs, &outarg, sizeof(outarg));
if (err)
goto... | 0 | 25,963 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Browser::Type SessionService::BrowserTypeForWindowType(WindowType type) {
switch (type) {
case TYPE_POPUP:
return Browser::TYPE_POPUP;
case TYPE_TABBED:
default:
return Browser::TYPE_TABBED;
}
}
Commit Message: Metrics for measuring how much overhead reading compressed content states ... | 0 | 15,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: const std::vector<bool>& resource_is_associated_with_main_frame() const {
return resource_is_associated_with_main_frame_;
}
Commit Message: Security drop fullscreen for any nested WebContents level.
This relands 3dcaec6e30feebefc11e with a fix to the test.
BUG=873080
TEST=as in bug
Change-Id: Ie68b197... | 0 | 5,280 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: u8 kvm_get_guest_memory_type(struct kvm_vcpu *vcpu, gfn_t gfn)
{
u8 mtrr;
mtrr = get_mtrr_type(&vcpu->arch.mtrr_state, gfn << PAGE_SHIFT,
(gfn << PAGE_SHIFT) + PAGE_SIZE);
if (mtrr == 0xfe || mtrr == 0xff)
mtrr = MTRR_TYPE_WRBACK;
return mtrr;
}
Commit Message: nEPT: Nested INVEPT
If we let L1 us... | 0 | 28,542 |
Analyze the following 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 set_sec_attr_from_acl(sc_card_t *card, sc_file_t *file)
{
const sc_acl_entry_t *entry;
u8 sec_attr[SC_RTECP_SEC_ATTR_SIZE] = { 0 };
int r;
assert(card && card->ctx && file);
assert(!file->sec_attr && file->sec_attr_len == 0);
assert(1 + 6 < sizeof(sec_attr));
entry = sc_file_get_acl_entry(fi... | 0 | 28,243 |
Analyze the following 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 SetAutoplayPrefValue(bool value) {
profile()->GetPrefs()->SetBoolean(prefs::kBlockAutoplayEnabled, value);
}
Commit Message: Revert "PageInfo: decouple safe browsing and TLS statii."
This reverts commit ee95bc44021230127c7e6e9a8cf9d3820760f77c.
Reason for revert: suspect causing unit_tests failure... | 0 | 14,498 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: qreal OxideQQuickWebView::contentWidth() const {
Q_D(const OxideQQuickWebView);
if (!d->proxy_) {
return 0.f;
}
return const_cast<OxideQQuickWebViewPrivate*>(
d)->proxy_->compositorFrameContentSize().width();
}
Commit Message:
CWE ID: CWE-20 | 0 | 18,476 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Framebuffer* FramebufferManager::GetFramebuffer(
GLuint client_id) {
FramebufferMap::iterator it = framebuffers_.find(client_id);
return it != framebuffers_.end() ? it->second.get() : NULL;
}
Commit Message: Framebuffer clear() needs to consider the situation some draw buffers are disabled.
This is when... | 0 | 18,900 |
Analyze the following 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 ForwardShapeDetectionRequest(R request) {
service_manager::Connector* connector =
ServiceManagerConnection::GetForProcess()->GetConnector();
connector->BindInterface(shape_detection::mojom::kServiceName,
std::move(request));
}
Commit Message: Switching AudioOutputAuthori... | 0 | 274 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PassRefPtr<Blob> Blob::slice(long long start, long long end, const String& contentType) const
{
long long size;
double modificationTime;
if (isFile()) {
toFile(this)->captureSnapshot(size, modificationTime);
} else {
ASSERT(m_size != -1);
size = m_size;
}
if (star... | 0 | 6,474 |
Analyze the following 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 cryptd_hash_init(struct crypto_async_request *req_async, int err)
{
struct cryptd_hash_ctx *ctx = crypto_tfm_ctx(req_async->tfm);
struct crypto_shash *child = ctx->child;
struct ahash_request *req = ahash_request_cast(req_async);
struct cryptd_hash_request_ctx *rctx = ahash_request_ctx(req);
stru... | 0 | 28,128 |
Analyze the following 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 ACodec::configureBitrate(
int32_t bitrate, OMX_VIDEO_CONTROLRATETYPE bitrateMode) {
OMX_VIDEO_PARAM_BITRATETYPE bitrateType;
InitOMXParams(&bitrateType);
bitrateType.nPortIndex = kPortIndexOutput;
status_t err = mOMX->getParameter(
mNode, OMX_IndexParamVideoBitrate,
&bitrateType,... | 0 | 25,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 void spl_array_it_dtor(zend_object_iterator *iter TSRMLS_DC) /* {{{ */
{
spl_array_it *iterator = (spl_array_it *)iter;
zend_user_it_invalidate_current(iter TSRMLS_CC);
zval_ptr_dtor((zval**)&iterator->intern.it.data);
efree(iterator);
}
/* }}} */
Commit Message:
CWE ID: | 0 | 21,899 |
Analyze the following 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 lbs_rdmac_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
struct lbs_private *priv = file->private_data;
ssize_t pos = 0;
int ret;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
u32 val = 0;
if (!buf)
return -ENOMEM;
ret = l... | 0 | 25,976 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: IntSize PaintLayerScrollableArea::PixelSnappedContentsSize(
const LayoutPoint& paint_offset) const {
return PixelSnappedIntSize(overflow_rect_.Size(), paint_offset);
}
Commit Message: Always call UpdateCompositedScrollOffset, not just for the root layer
Bug: 927560
Change-Id: I1d5522aae4f11dd3f5b8947bb089... | 0 | 21,579 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderFrameImpl::didStartProvisionalLoad(blink::WebLocalFrame* frame) {
DCHECK(!frame_ || frame_ == frame);
WebDataSource* ds = frame->provisionalDataSource();
if (!ds)
return;
DocumentState* document_state = DocumentState::FromDataSource(ds);
CHECK((ds->request().url() != GURL(kSwappedOutUR... | 0 | 22,593 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: G_DEFINE_TYPE (RSFilter, rs_filter, G_TYPE_OBJECT)
enum {
CHANGED_SIGNAL,
LAST_SIGNAL
};
Commit Message: Fixes insecure use of temporary file (CVE-2014-4978).
CWE ID: CWE-59 | 0 | 26,807 |
Analyze the following 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 rfcomm_dev_data_ready(struct rfcomm_dlc *dlc, struct sk_buff *skb)
{
struct rfcomm_dev *dev = dlc->owner;
struct tty_struct *tty;
if (!dev) {
kfree_skb(skb);
return;
}
tty = dev->port.tty;
if (!tty || !skb_queue_empty(&dev->pending)) {
skb_queue_tail(&dev->pending, skb);
return;
}
B... | 0 | 26,187 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: xmlBufFree(xmlBufPtr buf) {
if (buf == NULL) {
#ifdef DEBUG_BUFFER
xmlGenericError(xmlGenericErrorContext,
"xmlBufFree: buf == NULL\n");
#endif
return;
}
if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
(buf->contentIO != NULL)) {
xmlFree(buf->contentIO);
} else if ((buf->con... | 0 | 23,181 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: vrrp_garp_lower_prio_rep_handler(vector_t *strvec)
{
vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp);
unsigned garp_lower_prio_rep;
if (!read_unsigned_strvec(strvec, 1, &garp_lower_prio_rep, 0, INT_MAX, true)) {
report_config_error(CONFIG_GENERAL_ERROR, "(%s): Invalid garp_lower_prio_repeat '%s'", vrrp->inam... | 0 | 1,006 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: gx_device_raster_chunky(const gx_device * dev, bool pad)
{
ulong bits = (ulong) dev->width * dev->color_info.depth;
ulong raster;
int l2align;
raster = (uint)((bits + 7) >> 3);
if (!pad)
return raster;
l2align = dev->log2_align_mod;
if (l2align < log2_align_bitmap_mod)
... | 0 | 25,441 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: virtual void SetUpCommandLine(CommandLine* command_line) {
EnableDOMAutomation();
InProcessBrowserTest::SetUpCommandLine(command_line);
if (!command_line->HasSwitch("enable-gpu")) {
#if !defined(OS_MACOSX)
CHECK(test_launcher_utils::OverrideGLImplementation(
command_line, gfx::kGLI... | 0 | 3,664 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Compute_Point_Displacement( EXEC_OP_ FT_F26Dot6* x,
FT_F26Dot6* y,
TT_GlyphZone zone,
FT_UShort* refp )
{
TT_GlyphZoneRec zp;
FT_UShort p;
FT_F26Dot6 d;
... | 0 | 20,789 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void GLES2Implementation::GenVertexArraysOESHelper(GLsizei n,
const GLuint* arrays) {
vertex_array_object_manager_->GenVertexArrays(n, arrays);
}
Commit Message: Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
This makes the query of GL_COMPLETION_STATUS_KHR to prog... | 0 | 19,033 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static bool nl80211_valid_cipher_suite(u32 cipher)
{
return cipher == WLAN_CIPHER_SUITE_WEP40 ||
cipher == WLAN_CIPHER_SUITE_WEP104 ||
cipher == WLAN_CIPHER_SUITE_TKIP ||
cipher == WLAN_CIPHER_SUITE_CCMP ||
cipher == WLAN_CIPHER_SUITE_AES_CMAC;
}
Commit Message: nl80211: fix check for valid SSID size in... | 0 | 18,674 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GF_SceneManager *gf_sm_new(GF_SceneGraph *graph)
{
GF_SceneManager *tmp;
if (!graph) return NULL;
GF_SAFEALLOC(tmp, GF_SceneManager);
if (!tmp) return NULL;
tmp->streams = gf_list_new();
tmp->scene_graph = graph;
return tmp;
}
Commit Message: fix some overflows due to strcpy
fixes #1184, #1186, #1187 am... | 0 | 27,899 |
Analyze the following 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 RenderFrameHostManager::IsBrowsingInstanceSwapAllowedForPageTransition(
ui::PageTransition transition,
const GURL& dest_url) {
if (!frame_tree_node_->IsMainFrame())
return false;
if (dest_url.SchemeIsFile() || dest_url.SchemeIs(url::kDataScheme))
return false;
switch (ui::PageTransiti... | 0 | 19,014 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void gtco_disconnect(struct usb_interface *interface)
{
/* Grab private device ptr */
struct gtco *gtco = usb_get_intfdata(interface);
struct usb_device *udev = interface_to_usbdev(interface);
/* Now reverse all the registration stuff */
if (gtco) {
input_unregister_device(gtco->inputdevice);
usb... | 0 | 6,196 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void Browser::AddNewContents(TabContents* source,
TabContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
bool user_gesture) {
DCHECK(disposition != SAVE_TO_DIS... | 0 | 14,228 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void AudioRendererHost::OnSetVolume(int stream_id, double volume) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
AudioOutputDelegate* delegate = LookupById(stream_id);
if (!delegate) {
SendErrorMessage(stream_id);
return;
}
if (volume < 0 || volume > 1.0)
return;
delegate->OnSetVolume(volume)... | 0 | 20,750 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ASCII85Encoder::~ASCII85Encoder() {
if (str->isEncoder())
delete str;
}
Commit Message:
CWE ID: CWE-119 | 0 | 7,875 |
Analyze the following 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 Ins_IDEF( INS_ARG )
{
if (CUR.countIDefs >= CUR.numIDefs || args[0] > 255)
CUR.error = TT_Err_Storage_Overflow;
else
{
PDefRecord pTDR;
CUR.IDefPtr[(Byte)(args[0])] = CUR.countIDefs;
pTDR = &CUR.IDefs[CUR.countIDefs++];
pTDR->Opc = (Byte)(... | 0 | 365 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static MagickBooleanType Huffman2DEncodeImage(const ImageInfo *image_info,
Image *image,Image *inject_image,ExceptionInfo *exception)
{
Image
*group4_image;
ImageInfo
*write_info;
MagickBooleanType
status;
size_t
length;
unsigned char
*group4;
status=MagickTrue;
write_info... | 0 | 4,325 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: polkit_backend_interactive_authority_enumerate_actions (PolkitBackendAuthority *authority,
PolkitSubject *caller,
const gchar *interactivee,
... | 0 | 15,785 |
Analyze the following 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 task_clock_event_update(struct perf_event *event, u64 now)
{
u64 prev;
s64 delta;
prev = local64_xchg(&event->hw.prev_count, now);
delta = now - prev;
local64_add(delta, &event->count);
}
Commit Message: perf: Remove the nmi parameter from the swevent and overflow interface
The nmi parameter i... | 0 | 21,179 |
Analyze the following 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 feh_wm_get_num_desks(void)
{
char *buf, *ptr;
int desks;
if (!feh_wm_get_wm_is_e())
return(-1);
buf = enl_send_and_wait("num_desks ?");
if (buf == IPC_FAKE) /* Fake E17 IPC */
return(-1);
D(("Got from E IPC: %s\n", buf));
ptr = buf;
while (ptr && !isdigit(*ptr))
ptr++;
desks = atoi(ptr);
re... | 0 | 13,519 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: CStarter::getMySlotNumber( void )
{
char *logappend = param("STARTER_LOG");
char const *tmp = NULL;
int slot_number = 0; // default to 0, let our caller decide how to
if ( logappend ) {
char const *log_basename = condor_basename(logappend);
MyString prefix;
char* resource_prefix = param("ST... | 0 | 13,780 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void sas_revalidate_domain(struct work_struct *work)
{
int res = 0;
struct sas_discovery_event *ev = to_sas_discovery_event(work);
struct asd_sas_port *port = ev->port;
struct sas_ha_struct *ha = port->ha;
struct domain_device *ddev = port->port_dev;
/* prevent revalidation from finding sata links i... | 1 | 4,224 |
Analyze the following 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 extent_buffer *btrfs_read_lock_root_node(struct btrfs_root *root)
{
struct extent_buffer *eb;
while (1) {
eb = btrfs_root_node(root);
btrfs_tree_read_lock(eb);
if (eb == root->node)
break;
btrfs_tree_read_unlock(eb);
free_extent_buffer(eb);
}
return eb;
}
Commit Message: Btrfs: ma... | 0 | 22,301 |
Analyze the following 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 ChromeContentClient::CanHandleWhileSwappedOut(
const IPC::Message& msg) {
switch (msg.type()) {
case ChromeViewHostMsg_Snapshot::ID:
return true;
default:
break;
}
return false;
}
Commit Message: Convert plugin and GPU process to brokered handle duplication.
BUG=119250
Review ... | 0 | 13,224 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: do_ghash (unsigned char *hsub, unsigned char *result, const unsigned char *buf)
{
unsigned long V[4];
int i, j;
byte *p;
#ifdef WORDS_BIGENDIAN
p = result;
#else
unsigned long T[4];
cipher_block_xor (V, result, buf, 16);
for (i = 0; i < 4; i++)
{
V[i] = (V[i] & 0x00ff00ff) << 8 | (V[i] &... | 0 | 24,655 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool AppListControllerDelegateImpl::ShouldShowUserIcon() {
return g_browser_process->profile_manager()->GetNumberOfProfiles() > 1;
}
Commit Message: [Extensions] Add GetInstalledExtension() method to ExtensionRegistry
This CL adds GetInstalledExtension() method to ExtensionRegistry and
uses it instead of depr... | 0 | 22,397 |
Analyze the following 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 RegisterChromeDownloadDelegate(JNIEnv* env) {
return RegisterNativesImpl(env);
}
Commit Message: Clean up Android DownloadManager code as most download now go through Chrome Network stack
The only exception is OMA DRM download.
And it only applies to context menu download interception.
Clean up the remai... | 0 | 5,743 |
Analyze the following 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 efx_remove_tx_queue(struct efx_tx_queue *tx_queue)
{
if (!tx_queue->buffer)
return;
netif_dbg(tx_queue->efx, drv, tx_queue->efx->net_dev,
"destroying TX queue %d\n", tx_queue->queue);
efx_nic_remove_tx(tx_queue);
kfree(tx_queue->buffer);
tx_queue->buffer = NULL;
}
Commit Message: sfc: Fix maxim... | 0 | 18,809 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: free_urlpos (struct urlpos *l)
{
while (l)
{
struct urlpos *next = l->next;
if (l->url)
url_free (l->url);
xfree (l->local_name);
xfree (l);
l = next;
}
}
Commit Message:
CWE ID: CWE-119 | 0 | 15,463 |
Analyze the following 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 do_perf_sw_event(enum perf_type_id type, u32 event_id,
u64 nr,
struct perf_sample_data *data,
struct pt_regs *regs)
{
struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable);
struct perf_event *event;
struct hlist_head *head;
rcu_read_lock();
head = find_swevent_hea... | 0 | 1,273 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: MemoryInfo* Performance::memory() const {
return nullptr;
}
Commit Message: Fix timing allow check algorithm for service workers
This CL uses the OriginalURLViaServiceWorker() in the timing allow check
algorithm if the response WasFetchedViaServiceWorker(). This way, if a
service worker changes a same origin ... | 0 | 24,006 |
Analyze the following 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 WebGL2RenderingContextBase::uniform1iv(
const WebGLUniformLocation* location,
const FlexibleInt32ArrayView& v) {
WebGLRenderingContextBase::uniform1iv(location, v);
}
Commit Message: Reset ES3 pixel pack parameters and PIXEL_PACK_BUFFER binding in DrawingBuffer before ReadPixels() and recover them... | 0 | 4,045 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
STACK_OF(X509) *certs,
X509_STORE *store, unsigned int flags)
{
int r;
flags &= ~(CMS_DETACHED | CMS_TEXT);
r = CMS_verify(rcms, certs, store, NULL, NULL, flags);
if (r <= 0)
... | 0 | 17,291 |
Analyze the following 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 AwContents::SmoothScroll(JNIEnv* env,
jobject obj,
jint target_x,
jint target_y,
jlong duration_ms) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
float scale = browser_view_renderer_.dip_s... | 0 | 13,518 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: base::StringPiece TestContentClient::GetDataResource(int resource_id) const {
base::StringPiece resource;
data_pack_.GetStringPiece(resource_id, &resource);
return resource;
}
Commit Message: Allow browser to handle all WebUI navigations.
BUG=113496
TEST="Google Dashboard" link in Sync settings loads in n... | 0 | 20,519 |
Analyze the following 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 CLASS parse_thumb_note (int base, unsigned toff, unsigned tlen)
{
unsigned entries, tag, type, len, save;
entries = get2();
while (entries--) {
tiff_get (base, &tag, &type, &len, &save);
if (tag == toff) thumb_offset = get4()+base;
if (tag == tlen) thumb_length = get4();
fseek (ifp, sa... | 0 | 4,971 |
Analyze the following 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 xenvif_down(struct xenvif *vif)
{
disable_irq(vif->irq);
xen_netbk_deschedule_xenvif(vif);
xen_netbk_remove_xenvif(vif);
}
Commit Message: xen/netback: shutdown the ring if it contains garbage.
A buggy or malicious frontend should not be able to confuse netback.
If we spot anything which is not a... | 0 | 25,788 |
Analyze the following 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 inet_netconf_get_devconf(struct sk_buff *in_skb,
struct nlmsghdr *nlh)
{
struct net *net = sock_net(in_skb->sk);
struct nlattr *tb[NETCONFA_MAX+1];
struct netconfmsg *ncm;
struct sk_buff *skb;
struct ipv4_devconf *devconf;
struct in_device *in_dev;
struct net_device *dev;
int ifindex;
... | 0 | 518 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: nfsd4_free_slabs(void)
{
kmem_cache_destroy(odstate_slab);
kmem_cache_destroy(openowner_slab);
kmem_cache_destroy(lockowner_slab);
kmem_cache_destroy(file_slab);
kmem_cache_destroy(stateid_slab);
kmem_cache_destroy(deleg_slab);
}
Commit Message: Merge tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux
... | 0 | 28,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'. | Code: static void MSLReference(void *context,const xmlChar *name)
{
MSLInfo
*msl_info;
xmlParserCtxtPtr
parser;
/*
Called when an entity reference is detected.
*/
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" SAX.reference(%s)",name);
msl_info=(MSLInfo *) context;
parser=msl_inf... | 0 | 8,273 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int __init fscrypt_init(void)
{
fscrypt_read_workqueue = alloc_workqueue("fscrypt_read_queue",
WQ_HIGHPRI, 0);
if (!fscrypt_read_workqueue)
goto fail;
fscrypt_ctx_cachep = KMEM_CACHE(fscrypt_ctx, SLAB_RECLAIM_ACCOUNT);
if (!fscrypt_ctx_cachep)
goto fail_free_queue;
fscrypt_info_cachep = K... | 0 | 11,277 |
Analyze the following 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 ssl3_do_write(SSL *s, int type)
{
int ret;
ret=ssl3_write_bytes(s,type,&s->init_buf->data[s->init_off],
s->init_num);
if (ret < 0) return(-1);
if (type == SSL3_RT_HANDSHAKE)
/* should not be done for 'Hello Request's, but in that case
* we'll ignore the result anyway */
ssl3... | 0 | 21,460 |
Analyze the following 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 av_cold int dct_init(MpegEncContext *s)
{
ff_blockdsp_init(&s->bdsp, s->avctx);
ff_h264chroma_init(&s->h264chroma, 8); //for lowres
ff_hpeldsp_init(&s->hdsp, s->avctx->flags);
ff_mpegvideodsp_init(&s->mdsp);
ff_videodsp_init(&s->vdsp, s->avctx->bits_per_raw_sample);
if (s->avctx->d... | 0 | 11,094 |
Analyze the following 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 ip_dev_loopback_xmit(struct sk_buff *newskb)
{
skb_reset_mac_header(newskb);
__skb_pull(newskb, skb_network_offset(newskb));
newskb->pkt_type = PACKET_LOOPBACK;
newskb->ip_summed = CHECKSUM_UNNECESSARY;
WARN_ON(!skb_dst(newskb));
netif_rx_ni(newskb);
return 0;
}
Commit Message: inet: add RCU pr... | 0 | 20,268 |
Analyze the following 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 fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter,
loff_t *ppos, int flags)
{
int write = flags & FUSE_DIO_WRITE;
int cuse = flags & FUSE_DIO_CUSE;
struct file *file = io->file;
struct inode *inode = file->f_mapping->host;
struct fuse_file *ff = file->private_data;
struct fuse_c... | 0 | 25,362 |
Analyze the following 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::SetVolume(float volume) {
base::AutoLock auto_lock(lock_);
if (state_ == UNINITIALIZED)
return;
sink_->SetVolume(volume);
}
Commit Message: Avoids crash in WebRTC audio clients for 96kHz render rate on Mac OSX.
TBR=xians
BUG=166523
TEST=Misc set of WebRTC audio clients on Ma... | 0 | 3,204 |
Analyze the following 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 IRCView::append(const QString& nick, const QString& message)
{
QString channelColor = Preferences::self()->color(Preferences::ChannelMessage).name();
m_tabNotification = Konversation::tnfNormal;
QString nickLine = createNickLine(nick, channelColor);
QChar::Direction dir;
QString text(f... | 0 | 29,937 |
Analyze the following 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 void LOAD_OP(int I, u32 *W, const u8 *input)
{
W[I] = get_unaligned_be32((__u32 *)input + I);
}
Commit Message: crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so we never run
the risk of exposing module auto-loading to userspace via a crypt... | 0 | 5,358 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static struct sadb_msg *pfkey_get_base_msg(struct sk_buff *skb, int *errp)
{
struct sadb_msg *hdr = NULL;
if (skb->len < sizeof(*hdr)) {
*errp = -EMSGSIZE;
} else {
hdr = (struct sadb_msg *) skb->data;
if (hdr->sadb_msg_version != PF_KEY_V2 ||
hdr->sadb_msg_reserved != 0 ||
(hdr->sadb_msg_ty... | 0 | 25,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: CCLayerTreeHostTestCommitingWithContinuousRedraw()
: m_numCompleteCommits(0)
, m_numDraws(0)
{
}
Commit Message: [chromium] Fix shutdown race when posting main thread task to CCThreadProxy and enable tests
https://bugs.webkit.org/show_bug.cgi?id=70161
Reviewed by David Levin.
Source... | 0 | 7,873 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static MagickBooleanType WritePTIFImage(const ImageInfo *image_info,
Image *image)
{
ExceptionInfo
*exception;
Image
*images,
*next,
*pyramid_image;
ImageInfo
*write_info;
MagickBooleanType
status;
PointInfo
resolution;
size_t
columns,
rows;
/*
Create ... | 0 | 28,135 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void PerformSelectAll() {
const base::string16 expected_title =
base::UTF8ToUTF16("SELECTION_CHANGED");
content::TitleWatcher title_watcher(shell()->web_contents(),
expected_title);
RenderFrameHostImpl* rfh =
static_cast<RenderFrameHostImpl*>(i... | 0 | 18,757 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: sp<IMediaSource> AMRExtractor::getTrack(size_t index) {
if (mInitCheck != OK || index != 0) {
return NULL;
}
return new AMRSource(mDataSource, mMeta, mIsWide,
mOffsetTable, mOffsetTableLength);
}
Commit Message: Fix integer overflow and divide-by-zero
Bug: 35763994
Test: ran CTS with and withou... | 0 | 9,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: static int android_net_wifi_getInterfaces(JNIEnv *env, jclass cls) {
int n = 0;
JNIHelper helper(env);
wifi_handle halHandle = getWifiHandle(helper, cls);
wifi_interface_handle *ifaceHandles = NULL;
int result = hal_fn.wifi_get_ifaces(halHandle, &n, &ifaceHandles);
if (result < 0) {
return result;
... | 0 | 26,758 |
Analyze the following 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 WebPage::isDNSPrefetchEnabled() const
{
return d->m_page->settings()->dnsPrefetchingEnabled();
}
Commit Message: [BlackBerry] Adapt to new BlackBerry::Platform::TouchPoint API
https://bugs.webkit.org/show_bug.cgi?id=105143
RIM PR 171941
Reviewed by Rob Buis.
Internally reviewed by George Staikos.
Sour... | 0 | 28,065 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Decimal InputType::FindStepBase(const Decimal& default_value) const {
Decimal step_base =
ParseToNumber(GetElement().FastGetAttribute(minAttr), Decimal::Nan());
if (!step_base.IsFinite())
step_base =
ParseToNumber(GetElement().FastGetAttribute(valueAttr), default_value);
return step_base;
... | 0 | 23,261 |
Analyze the following 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 SystemClipboard::WriteImage(Image* image,
const KURL& url,
const String& title) {
DCHECK(image);
PaintImage paint_image = image->PaintImageForCurrentFrame();
SkBitmap bitmap;
if (sk_sp<SkImage> sk_image = paint_image.GetSkImage())
... | 1 | 13,308 |
Analyze the following 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 PasswordAutofillAgent::IsUsernameOrPasswordField(
const WebInputElement& element) {
if (element.IsPasswordFieldForAutofill())
return true;
if (AutocompleteFlagForElement(element) == AutocompleteFlag::USERNAME)
return true;
std::unique_ptr<PasswordForm> password_form;
if (element.Form().... | 0 | 22,905 |
Analyze the following 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 _nfs4_proc_lookup(struct rpc_clnt *clnt, struct inode *dir,
const struct qstr *name, struct nfs_fh *fhandle,
struct nfs_fattr *fattr)
{
struct nfs_server *server = NFS_SERVER(dir);
int status;
struct nfs4_lookup_arg args = {
.bitmask = server->attr_bitmask,
.dir_fh = NFS_FH(dir),
.... | 0 | 15,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'. | Code: views::View* PageInfoBubbleView::CreateSiteSettingsView(int side_margin) {
views::View* site_settings_view = new views::View();
views::BoxLayout* box_layout = new views::BoxLayout(
views::BoxLayout::kVertical, gfx::Insets(0, side_margin),
ChromeLayoutProvider::Get()->GetDistanceMetric(
D... | 0 | 28,664 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SplashPath *Splash::makeDashedPath(SplashPath *path) {
SplashPath *dPath;
SplashCoord lineDashTotal;
SplashCoord lineDashStartPhase, lineDashDist, segLen;
SplashCoord x0, y0, x1, y1, xa, ya;
GBool lineDashStartOn, lineDashOn, newPath;
int lineDashStartIdx, lineDashIdx;
int i, j, k;
lineDashTotal ... | 0 | 29,663 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: long Segment::DoLoadClusterUnknownSize(
long long& pos,
long& len)
{
assert(m_pos < 0);
assert(m_pUnknownSize);
#if 0
assert(m_pUnknownSize->GetElementSize() < 0); //TODO: verify this
const long long element_start = m_pUnknownSize->m_element_start;
pos = -m_pos;
assert(pos > el... | 1 | 9,560 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void WebMediaPlayerMS::Play() {
DVLOG(1) << __func__;
DCHECK(thread_checker_.CalledOnValidThread());
media_log_->AddEvent(media_log_->CreateEvent(media::MediaLogEvent::PLAY));
if (!paused_)
return;
if (video_frame_provider_)
video_frame_provider_->Resume();
compositor_->StartRendering();
... | 0 | 26,477 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: iasecc_se_get_info()
{
return SC_ERROR_NOT_SUPPORTED;
}
Commit Message: fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes.
CWE ID: CWE-125 | 0 | 20,870 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.