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: RenderView* RenderView::FromWebView(WebKit::WebView* webview) {
return RenderViewImpl::FromWebView(webview);
}
Commit Message: Let the browser handle external navigations from DevTools.
BUG=180555
Review URL: https://chromiumcodereview.appspot.com/12531004
git-svn-id: svn://svn.chromium.org/chrome/trunk/sr... | 0 | 115,509 |
Analyze the 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_send_asconf_del_ip(struct sock *sk,
struct sockaddr *addrs,
int addrcnt)
{
struct net *net = sock_net(sk);
struct sctp_sock *sp;
struct sctp_endpoint *ep;
struct sctp_association *asoc;
struct sctp_transport *transport;
struct sctp_bind_addr *bp;
struct sctp_chunk *chunk;
... | 0 | 43,558 |
Analyze the 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_xdr_enc_open_confirm(struct rpc_rqst *req,
struct xdr_stream *xdr,
struct nfs_open_confirmargs *args)
{
struct compound_hdr hdr = {
.nops = 0,
};
encode_compound_hdr(xdr, req, &hdr);
encode_putfh(xdr, args->fh, &hdr);
encode_open_confirm(xdr, args, &hdr);
encode_nop... | 0 | 23,478 |
Analyze the 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 ExpectUpgrade(const char* input, const char* expected) {
ExpectUpgrade(input, WebURLRequest::kRequestContextScript,
WebURLRequest::kFrameTypeNone, expected);
}
Commit Message: DevTools: send proper resource type in Network.RequestWillBeSent
This patch plumbs resoure type into the ... | 0 | 138,791 |
Analyze the 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 BrowserRenderProcessHost::WidgetRestored() {
DCHECK_EQ(backgrounded_, (visible_widgets_ == 0));
visible_widgets_++;
SetBackgrounded(false);
}
Commit Message: DevTools: move DevToolsAgent/Client into content.
BUG=84078
TEST=
Review URL: http://codereview.chromium.org/7461019
git-svn-id: svn://svn.ch... | 0 | 98,813 |
Analyze the 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: CURLcode Curl_protocol_doing(struct connectdata *conn, bool *done)
{
CURLcode result = CURLE_OK;
if(conn && conn->handler->doing) {
*done = FALSE;
result = conn->handler->doing(conn, done);
}
else
*done = TRUE;
return result;
}
Commit Message: Curl_close: clear data->multi_easy on free to... | 0 | 77,773 |
Analyze the 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: ScreenOrientationDispatcherHost::ScreenOrientationDispatcherHost(
WebContents* web_contents)
: WebContentsObserver(web_contents),
current_lock_(NULL) {
provider_.reset(ScreenOrientationProvider::Create(this, web_contents));
}
Commit Message: Cleanups in ScreenOrientationDispatcherHost.
BUG=None
Rev... | 0 | 111,198 |
Analyze the 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: gfx::Rect RenderWidgetHostViewAura::GetCaretBounds() {
const gfx::Rect rect =
gfx::UnionRects(selection_start_rect_, selection_end_rect_);
return ConvertRectToScreen(rect);
}
Commit Message: Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantages:
- allow tearing d... | 0 | 114,818 |
Analyze the 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: png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
png_size_t buffer_length)
{
/* The caller checks for a non-zero buffer length. */
if (!(buffer_length > 0) || buffer == NULL)
png_error(png_ptr, "No IDAT data (internal error)");
/* This routine must process all the data it has been g... | 0 | 131,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 int bnep_rx_extension(struct bnep_session *s, struct sk_buff *skb)
{
struct bnep_ext_hdr *h;
int err = 0;
do {
h = (void *) skb->data;
if (!skb_pull(skb, sizeof(*h))) {
err = -EILSEQ;
break;
}
BT_DBG("type 0x%x len %d", h->type, h->len);
switch (h->type & BNEP_TYPE_MASK) {
case BNEP... | 0 | 60,400 |
Analyze the 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: _dbus_lookup_launchd_socket (DBusString *socket_path,
const char *launchd_env_var,
DBusError *error)
{
#ifdef DBUS_ENABLE_LAUNCHD
char *argv[4];
int i;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
if (_dbus_check_setuid ())
{
dbus_set_error_co... | 0 | 3,749 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: intel_pebs_constraints(struct perf_event *event)
{
struct event_constraint *c;
if (!event->attr.precise_ip)
return NULL;
if (x86_pmu.pebs_constraints) {
for_each_event_constraint(c, x86_pmu.pebs_constraints) {
if ((event->hw.config & c->cmask) == c->code)
return c;
}
}
return &emptyconstraint... | 0 | 25,832 |
Analyze the 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 bool tcp_ecn_rcv_ecn_echo(const struct tcp_sock *tp, const struct tcphdr *th)
{
if (th->ece && !th->syn && (tp->ecn_flags & TCP_ECN_OK))
return true;
return false;
}
Commit Message: tcp: make challenge acks less predictable
Yue Cao claims that current host rate limiting of challenge ACKS
(RFC 5961) c... | 0 | 51,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'. Remember, I want response in '1' or '0', No explanation. | Code: static void mpol_relative_nodemask(nodemask_t *ret, const nodemask_t *orig,
const nodemask_t *rel)
{
nodemask_t tmp;
nodes_fold(tmp, *orig, nodes_weight(*rel));
nodes_onto(*ret, tmp, *rel);
}
Commit Message: mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
commit 1a5a9906d4e8... | 0 | 21,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: bool HTMLInputElement::canBeSuccessfulSubmitButton() const
{
return m_inputType->canBeSuccessfulSubmitButton();
}
Commit Message: Add HTMLFormControlElement::supportsAutofocus to fix a FIXME comment.
This virtual function should return true if the form control can hanlde
'autofocucs' attribute if it is spec... | 0 | 113,961 |
Analyze the 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: my_snprintf( char* str, size_t size, const char* format, ... )
{
va_list ap;
int r;
va_start( ap, format );
#ifdef HAVE_VSNPRINTF
r = vsnprintf( str, size, format, ap );
#else /* HAVE_VSNPRINTF */
r = vsprintf( str, format, ap );
#endif /* HAVE_VSNPRINTF */
va_end( ap );
return r;... | 0 | 63,831 |
Analyze the 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 Browser::CanDuplicateContentsAt(int index) {
NavigationController& nc = GetTabContentsAt(index)->controller();
return nc.tab_contents() && nc.GetLastCommittedEntry();
}
Commit Message: Implement a bubble that appears at the top of the screen when a tab enters
fullscreen mode via webkitRequestFullScreen... | 0 | 97,146 |
Analyze the 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 DevToolsWindow::InterceptPageBeforeUnload(content::WebContents* contents) {
DevToolsWindow* window =
DevToolsWindow::GetInstanceForInspectedRenderViewHost(
contents->GetRenderViewHost());
if (!window || window->intercepted_page_beforeunload_)
return false;
window->intercepted_page_... | 0 | 113,178 |
Analyze the 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: png_set_rgb_to_gray(png_structp png_ptr, int error_action, double red,
double green)
{
int red_fixed, green_fixed;
if (png_ptr == NULL)
return;
if (red > 21474.83647 || red < -21474.83648 ||
green > 21474.83647 || green < -21474.83648)
{
png_warning(png_ptr, "ignoring out of rang... | 0 | 131,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: Profile* GetStartupProfile(const base::FilePath& user_data_dir,
const base::CommandLine& command_line) {
ProfileManager* profile_manager = g_browser_process->profile_manager();
base::FilePath profile_path =
GetStartupProfilePath(user_data_dir, command_line);
Profile* profil... | 0 | 137,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'. Remember, I want response in '1' or '0', No explanation. | Code: static long madvise_behavior(struct vm_area_struct *vma,
struct vm_area_struct **prev,
unsigned long start, unsigned long end, int behavior)
{
struct mm_struct *mm = vma->vm_mm;
int error = 0;
pgoff_t pgoff;
unsigned long new_flags = vma->vm_flags;
switch (behavior) {
case MADV_NORMAL:
new_... | 0 | 85,774 |
Analyze the 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 SimulateMouseClick(RenderWidgetHost* rwh, int x, int y) {
blink::WebMouseEvent mouse_event(
blink::WebInputEvent::kMouseDown, blink::WebInputEvent::kNoModifiers,
blink::WebInputEvent::GetStaticTimeStampForTests());
mouse_event.button = blink::WebPointerProperties::Button::kLeft;
mouse_event... | 0 | 143,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'. Remember, I want response in '1' or '0', No explanation. | Code: void GLES2Implementation::MultiDrawArraysWEBGLHelper(GLenum mode,
const GLint* firsts,
const GLsizei* counts,
GLsizei drawcount) {
DCHECK_GT(drawcount, 0... | 0 | 141,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'. Remember, I want response in '1' or '0', No explanation. | Code: sp<IOMXObserver> OMXNodeInstance::observer() {
return mObserver;
}
Commit Message: IOMX: Enable buffer ptr to buffer id translation for arm32
Bug: 20634516
Change-Id: Iac9eac3cb251eccd9bbad5df7421a07edc21da0c
(cherry picked from commit 2d6b6601743c3c6960c6511a2cb774ef902759f4)
CWE ID: CWE-119 | 0 | 157,570 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: static bool vrend_is_timer_query(GLenum gltype)
{
return gltype == GL_TIMESTAMP ||
gltype == GL_TIME_ELAPSED;
}
Commit Message:
CWE ID: CWE-772 | 0 | 8,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'. Remember, I want response in '1' or '0', No explanation. | Code: static void __exit prng_mod_fini(void)
{
crypto_unregister_algs(rng_algs, ARRAY_SIZE(rng_algs));
}
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 crypto API,
as d... | 0 | 47,115 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: struct dentry *lock_rename(struct dentry *p1, struct dentry *p2)
{
struct dentry *p;
if (p1 == p2) {
inode_lock_nested(p1->d_inode, I_MUTEX_PARENT);
return NULL;
}
mutex_lock(&p1->d_sb->s_vfs_rename_mutex);
p = d_ancestor(p2, p1);
if (p) {
inode_lock_nested(p2->d_inode, I_MUTEX_PARENT);
inode_loc... | 0 | 67,439 |
Analyze the 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: js_Environment *jsR_newenvironment(js_State *J, js_Object *vars, js_Environment *outer)
{
js_Environment *E = js_malloc(J, sizeof *E);
E->gcmark = 0;
E->gcnext = J->gcenv;
J->gcenv = E;
++J->gccounter;
E->outer = outer;
E->variables = vars;
return E;
}
Commit Message:
CWE ID: CWE-119 | 0 | 13,407 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
unsigned long arg)
{
struct packet_command cgc;
void __user *userptr = (void __user *)arg;
memset(&cgc, 0, sizeof(cgc));
/* build a unified command and queue it through
cdo->generic_packet() */
switch (cmd) {
case CDROMREADRA... | 0 | 76,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'. Remember, I want response in '1' or '0', No explanation. | Code: void ExtensionWebRequestTest::FireURLRequestWithData(
const std::string& method,
const char* content_type,
const std::vector<char>& bytes_1,
const std::vector<char>& bytes_2) {
GURL request_url("http://www.example.com");
std::unique_ptr<net::URLRequest> request(
context_->CreateRequest(r... | 0 | 119,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: _PUBLIC_ size_t strlen_m_term_null(const char *s)
{
return strlen_m_ext_term_null(s, CH_UNIX, CH_UTF16LE);
}
Commit Message:
CWE ID: CWE-200 | 0 | 2,319 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: static void tcp_reqsk_record_syn(const struct sock *sk,
struct request_sock *req,
const struct sk_buff *skb)
{
if (tcp_sk(sk)->save_syn) {
u32 len = skb_network_header_len(skb) + tcp_hdrlen(skb);
u32 *copy;
copy = kmalloc(len + sizeof(u32), GFP_ATOMIC);
if (copy) {
copy[0] = len;
memcpy(... | 0 | 51,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'. Remember, I want response in '1' or '0', No explanation. | Code: bool SupportsSeparateFramebufferBinds() const {
return (feature_info_->feature_flags().chromium_framebuffer_multisample ||
feature_info_->IsWebGL2OrES3Context());
}
Commit Message: Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
This makes the query of GL_COMPLETION_STATUS_KHR to programs much
chea... | 0 | 141,679 |
Analyze the 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 handle_NP_Shutdown(rpc_connection_t *connection)
{
D(bug("handle_NP_Shutdown\n"));
int error = rpc_method_get_args(connection, RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NP_Shutdown() get args", error);
return error;
}
/* Clear any NPP_Destroys we may have delayed. ... | 0 | 27,114 |
Analyze the 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: decode_NXAST_RAW_STACK_PUSH(const struct nx_action_stack *nasp,
enum ofp_version ofp_version OVS_UNUSED,
const struct vl_mff_map *vl_mff_map,
uint64_t *tlv_bitmap, struct ofpbuf *ofpacts)
{
struct ofpact_stack *push = ofpact_p... | 0 | 76,817 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: best_name (char *const *name, int const *ignore)
{
enum nametype i;
int components[3];
int components_min = INT_MAX;
size_t basename_len[3];
size_t basename_len_min = SIZE_MAX;
size_t len[3];
size_t len_min = SIZE_MAX;
for (i = OLD; i <= INDEX; i++)
if (name[i] && !ignore[i])
{
/* Ta... | 0 | 5,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'. Remember, I want response in '1' or '0', No explanation. | Code: void CoordinatorImpl::BindCoordinatorRequest(
mojom::CoordinatorRequest request,
const service_manager::BindSourceInfo& source_info) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
bindings_.AddBinding(this, std::move(request), source_info.identity);
}
Commit Message: Fix heap-use-after-free by usi... | 0 | 155,378 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: unsigned CSSComputedStyleDeclaration::length() const
{
Node* node = m_node.get();
if (!node)
return 0;
RenderStyle* style = node->computedStyle(m_pseudoElementSpecifier);
if (!style)
return 0;
return numComputedProperties;
}
Commit Message: Rename isPositioned to isOutOfFlow... | 0 | 99,492 |
Analyze the 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::DidRemoveAllPendingBodyStylesheets() {
if (ScriptableDocumentParser* parser = GetScriptableDocumentParser())
parser->DidLoadAllBodyStylesheets();
}
Commit Message: Cleanup and remove dead code in SetFocusedElement
This early-out was added in:
https://crrev.com/ce8ea3446283965c7eabab592cbff... | 0 | 129,657 |
Analyze the 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 req_assbackwards_field(request_rec *r)
{
return r->assbackwards;
}
Commit Message: *) SECURITY: CVE-2015-0228 (cve.mitre.org)
mod_lua: A maliciously crafted websockets PING after a script
calls r:wsupgrade() can cause a child process crash.
[Edward Lu <Chaosed0 gmail.com>]
Discov... | 0 | 45,121 |
Analyze the 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 ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, ExceptionCode& ec, bool shouldLazyAttach)
{
ASSERT(refCount() || parentOrHostNode());
RefPtr<Node> protect(this);
ec = 0;
if (oldChild == newChild) // nothing to do
return true;
checkReplaceChild(newChild.g... | 1 | 170,321 |
Analyze the 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 hugetlbfs_migrate_page(struct address_space *mapping,
struct page *newpage, struct page *page,
enum migrate_mode mode)
{
int rc;
rc = migrate_huge_page_move_mapping(mapping, newpage, page);
if (rc)
return rc;
migrate_page_copy(newpage, page);
return 0;
}
Commit Message: hugepages: fix... | 0 | 20,227 |
Analyze the 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 xfrm_get_sadinfo(struct sk_buff *skb, struct nlmsghdr *nlh,
struct nlattr **attrs)
{
struct net *net = sock_net(skb->sk);
struct sk_buff *r_skb;
u32 *flags = nlmsg_data(nlh);
u32 spid = NETLINK_CB(skb).pid;
u32 seq = nlh->nlmsg_seq;
r_skb = nlmsg_new(xfrm_sadinfo_msgsize(), GFP_ATOMIC);
if (r... | 0 | 33,155 |
Analyze the 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: TabContents* CreateTabContents() {
return chrome::TabContentsFactory(profile(), NULL, MSG_ROUTING_NONE, NULL);
}
Commit Message: Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.appspot.com/11293205
git-svn-id: svn:... | 0 | 118,262 |
Analyze the 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: GpuChannelHost* RenderThreadImpl::EstablishGpuChannelSync(
CauseForGpuLaunch cause_for_gpu_launch) {
TRACE_EVENT0("gpu", "RenderThreadImpl::EstablishGpuChannelSync");
if (gpu_channel_.get()) {
if (!gpu_channel_->IsLost())
return gpu_channel_.get();
gpu_channel_ = NULL;
}
int client_id... | 0 | 111,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'. Remember, I want response in '1' or '0', No explanation. | Code: bool SVGLayoutSupport::hasFilterResource(const LayoutObject& object)
{
SVGResources* resources = SVGResourcesCache::cachedResourcesForLayoutObject(&object);
return resources && resources->filter();
}
Commit Message: Avoid using forced layout to trigger paint invalidation for SVG containers
Currently, SV... | 0 | 121,155 |
Analyze the 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 IndexedDBConnection::AbortAllTransactions(
const IndexedDBDatabaseError& error) {
std::unordered_map<int64_t, std::unique_ptr<IndexedDBTransaction>> temp_map;
std::swap(temp_map, transactions_);
for (const auto& pair : temp_map) {
IDB_TRACE1("IndexedDBDatabase::Abort(error)", "txn.id", pair.sec... | 0 | 136,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 int decode_tdlt(GetByteContext *gb, uint8_t *frame, int width, int height)
{
const uint8_t *frame_end = frame + width * height;
uint32_t segments = bytestream2_get_le32(gb);
int skip, copy;
while (segments--) {
if (bytestream2_get_bytes_left(gb) < 2)
return AVERROR_INVA... | 0 | 64,090 |
Analyze the 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 dentry *aio_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
static const struct dentry_operations ops = {
.d_dname = simple_dname,
};
return mount_pseudo(fs_type, "aio:", NULL, &ops, AIO_RING_MAGIC);
}
Commit Message: aio: mark AIO pseudo-fs noexe... | 1 | 168,645 |
Analyze the 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 AutofillDialogViews::SuggestionView::CanUseVerticallyCompactText(
int available_width,
int* resulting_height) const {
if (!calculated_heights_.count(available_width)) {
SuggestionView sizing_view(NULL);
sizing_view.SetLabelText(state_.vertically_compact_text);
sizing_view.SetIcon(state_... | 0 | 109,941 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: void UiSceneCreator::CreateWebVRExitWarning() {
auto scrim = base::MakeUnique<FullScreenRect>();
scrim->SetName(kScreenDimmer);
scrim->SetDrawPhase(kPhaseOverlayBackground);
scrim->SetVisible(false);
scrim->set_hit_testable(false);
scrim->SetOpacity(kScreenDimmerOpacity);
scrim->SetCenterColor(model... | 0 | 155,521 |
Analyze the 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: PassRefPtrWillBeRawPtr<Event> Document::createEvent(const String& eventType, ExceptionState& exceptionState)
{
RefPtrWillBeRawPtr<Event> event = nullptr;
for (const auto& factory : eventFactories()) {
event = factory->create(eventType);
if (event)
return event.release();
}
... | 0 | 124,320 |
Analyze the 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: SYSCALL_DEFINE1(exit, int, error_code)
{
do_exit((error_code&0xff)<<8);
}
Commit Message: fix infoleak in waitid(2)
kernel_waitid() can return a PID, an error or 0. rusage is filled in the first
case and waitid(2) rusage should've been copied out exactly in that case, *not*
whenever kernel_waitid() has not re... | 0 | 60,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: bool AudioHandler::PropagatesSilence() const {
return last_non_silent_time_ + LatencyTime() + TailTime() <
Context()->currentTime();
}
Commit Message: Revert "Keep AudioHandlers alive until they can be safely deleted."
This reverts commit 071df33edf2c8b4375fa432a83953359f93ea9e4.
Reason for revert:
... | 0 | 148,821 |
Analyze the 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 proto_register(struct proto *prot, int alloc_slab)
{
if (alloc_slab) {
prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0,
SLAB_HWCACHE_ALIGN | prot->slab_flags,
NULL);
if (prot->slab == NULL) {
pr_crit("%s: Can't create sock SLAB cache!\n",
prot->name);
goto out;
}
if... | 0 | 47,865 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
{
struct sock *sk = sock->sk;
struct net *net = sock_net(sk);
struct unix_sock *u = unix_sk(sk);
struct sockaddr_un *sunaddr = (struct sockaddr_un *)uaddr;
char *sun_path = sunaddr->sun_path;
int err;
unsigned int hash;
struct... | 0 | 46,529 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: void WebContentsImpl::CreateNewWidget(int32_t render_process_id,
int32_t widget_route_id,
mojom::WidgetPtr widget) {
CreateNewWidget(render_process_id, widget_route_id, /*is_fullscreen=*/false,
std::move(widget));
}
C... | 0 | 144,922 |
Analyze the 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::SetFeaturePolicy(const String& feature_policy_header) {
if (!RuntimeEnabledFeatures::FeaturePolicyEnabled())
return;
if (!feature_policy_header.IsEmpty())
UseCounter::Count(*this, WebFeature::kFeaturePolicyHeader);
FeaturePolicy* parent_feature_policy = nullptr;
ParsedFeaturePolic... | 0 | 146,772 |
Analyze the 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: juniper_pppoe_atm_print(netdissect_options *ndo,
const struct pcap_pkthdr *h, register const u_char *p)
{
struct juniper_l2info_t l2info;
uint16_t extracted_ethertype;
l2info.pictype = DLT_JUNIPER_PPPOE_ATM;
if (juniper_parse_header(ndo, p, h, &l2info) == 0)
... | 1 | 167,920 |
Analyze the 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 V8TestObject::IdAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_id_Getter");
test_object_v8_internal::IdAttributeGetter(info);
}
Commit Message: bindings: Support "attribute FrozenArray<T>?"
Ad... | 0 | 134,754 |
Analyze the 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_hash_bucket_renum_swap(Bucket *p, Bucket *q)
{
zval val;
ZVAL_COPY_VALUE(&val, &p->val);
ZVAL_COPY_VALUE(&p->val, &q->val);
ZVAL_COPY_VALUE(&q->val, &val);
}
Commit Message: Fix #73832 - leave the table in a safe state if the size is too big.
CWE ID: CWE-190 | 0 | 69,166 |
Analyze the 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 dcbnl_getpfcstate(struct net_device *netdev, struct nlmsghdr *nlh,
u32 seq, struct nlattr **tb, struct sk_buff *skb)
{
if (!netdev->dcbnl_ops->getpfcstate)
return -EOPNOTSUPP;
return nla_put_u8(skb, DCB_ATTR_PFC_STATE,
netdev->dcbnl_ops->getpfcstate(netdev));
}
Commit Message: dcbnl:... | 0 | 31,099 |
Analyze the 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 *kvm_kvzalloc(unsigned long size)
{
if (size > PAGE_SIZE)
return vzalloc(size);
else
return kzalloc(size, GFP_KERNEL);
}
Commit Message: KVM: perform an invalid memslot step for gpa base change
PPC must flush all translations before the new memory slot
is visible.
Signed-off-by: Marcelo Tosatti <mto... | 0 | 29,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 inline bool allocated(struct pipe_buffer *buf)
{
return buf->ops == &default_pipe_buf_ops;
}
Commit Message: fix a fencepost error in pipe_advance()
The logics in pipe_advance() used to release all buffers past the new
position failed in cases when the number of buffers to release was equal
to pipe->buf... | 0 | 68,714 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: void PaintLayerScrollableArea::UpdateScrollbarEnabledState() {
bool force_disable =
GetPageScrollbarTheme().ShouldDisableInvisibleScrollbars() &&
ScrollbarsHiddenIfOverlay();
if (HorizontalScrollbar())
HorizontalScrollbar()->SetEnabled(HasHorizontalOverflow() &&
... | 0 | 130,151 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: static void iscsi_retry_timer_expired(void *opaque)
{
struct IscsiTask *iTask = opaque;
iTask->complete = 1;
if (iTask->co) {
qemu_coroutine_enter(iTask->co, NULL);
}
}
Commit Message:
CWE ID: CWE-119 | 0 | 10,525 |
Analyze the 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 virtio_gpu_resource_destroy(VirtIOGPU *g,
struct virtio_gpu_simple_resource *res)
{
pixman_image_unref(res->image);
virtio_gpu_cleanup_mapping(res);
QTAILQ_REMOVE(&g->reslist, res, next);
g->hostmem -= res->hostmem;
g_free(res);
}
Commit Mes... | 0 | 6,259 |
Analyze the 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: ppp_output_wakeup(struct ppp_channel *chan)
{
struct channel *pch = chan->ppp;
if (!pch)
return;
ppp_channel_push(pch);
}
Commit Message: ppp: take reference on channels netns
Let channels hold a reference on their network namespace.
Some channel types, like ppp_async and ppp_synctty, can have their
users... | 0 | 52,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: PHP_FUNCTION(curl_copy_handle)
{
CURL *cp;
zval *zid;
php_curl *ch, *dupch;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zid) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
cp = curl_easy_duphandle(ch->cp);
if (!cp) {
php_error_docref(NULL, E_WARN... | 0 | 5,072 |
Analyze the 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: ProcChangeCloseDownMode(ClientPtr client)
{
int rc;
REQUEST(xSetCloseDownModeReq);
REQUEST_SIZE_MATCH(xSetCloseDownModeReq);
rc = XaceHook(XACE_CLIENT_ACCESS, client, client, DixManageAccess);
if (rc != Success)
return rc;
if ((stuff->mode == AllTemporary) ||
(stuff->mod... | 0 | 14,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: CSSStyleSheetResource::CSSStyleSheetResource(
const ResourceRequest& resource_request,
const ResourceLoaderOptions& options,
const TextResourceDecoderOptions& decoder_options)
: TextResource(resource_request,
ResourceType::kCSSStyleSheet,
options,
... | 0 | 154,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'. Remember, I want response in '1' or '0', No explanation. | Code: GF_Err tssy_Size(GF_Box *s)
{
s->size += 1;
return GF_OK;
}
Commit Message: fixed 2 possible heap overflows (inc. #1088)
CWE ID: CWE-125 | 0 | 80,626 |
Analyze the 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 get_openreq4(struct sock *sk, struct request_sock *req,
struct seq_file *f, int i, int uid, int *len)
{
const struct inet_request_sock *ireq = inet_rsk(req);
int ttd = req->expires - jiffies;
seq_printf(f, "%4d: %08X:%04X %08X:%04X"
" %02X %08X:%08X %02X:%08lX %08X %5d %8d %u %d %p%n",
i,
... | 0 | 18,993 |
Analyze the 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: MagickExport MagickBooleanType GetImageKurtosis(const Image *image,
double *kurtosis,double *skewness,ExceptionInfo *exception)
{
ChannelStatistics
*channel_statistics;
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogM... | 0 | 96,726 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: static char *sapi_fcgi_getenv(char *name, size_t name_len TSRMLS_DC)
{
/* when php is started by mod_fastcgi, no regular environment
* is provided to PHP. It is always sent to PHP at the start
* of a request. So we have to do our own lookup to get env
* vars. This could probably be faster somehow. */
... | 0 | 7,272 |
Analyze the 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_FLIPRGOFF( TT_ExecContext exc,
FT_Long* args )
{
FT_UShort I, K, L;
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
/* See `ttinterp.h' for details on backward compatibility mode. */
if ( SUBPIXEL_HINTING_MINIMAL &&
exc->backward_compatibility &&
exc... | 0 | 10,600 |
Analyze the 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 TrackBeforeUnloadEventListener(LocalDOMWindow* dom_window) {
DOMWindowSet& set = WindowsWithBeforeUnloadEventListeners();
if (set.insert(dom_window).is_new_entry) {
UpdateSuddenTerminationStatus(dom_window, true, kBeforeUnloadHandler);
}
}
Commit Message: MacViews: Enable secure text input ... | 0 | 125,915 |
Analyze the 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: MediaStreamDevices MediaStreamManager::GetDevicesOpenedByRequest(
const std::string& label) const {
DeviceRequest* request = FindRequest(label);
if (!request)
return MediaStreamDevices();
return request->devices;
}
Commit Message: Fix MediaObserver notifications in MediaStreamManager.
This CL fixe... | 0 | 148,318 |
Analyze the 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 pharobj_cancompress(HashTable *manifest) /* {{{ */
{
int test;
test = 1;
zend_hash_apply_with_argument(manifest, phar_test_compression, &test);
return test;
}
/* }}} */
Commit Message:
CWE ID: CWE-20 | 0 | 11,193 |
Analyze the 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 iriap_close(struct iriap_cb *self)
{
struct iriap_cb *entry;
IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
if (self->lsap) {
irlmp_close_lsap(self->lsap);
self->lsap = NULL;
}
entry = (struct iriap_cb *) hashbin_remove(ir... | 0 | 35,200 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: void dinf_del(GF_Box *s)
{
GF_DataInformationBox *ptr = (GF_DataInformationBox *)s;
if (ptr == NULL) return;
gf_isom_box_del((GF_Box *)ptr->dref);
gf_free(ptr);
}
Commit Message: fixed 2 possible heap overflows (inc. #1088)
CWE ID: CWE-125 | 0 | 80,055 |
Analyze the 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 choose_devnum(struct usb_device *udev)
{
int devnum;
struct usb_bus *bus = udev->bus;
/* be safe when more hub events are proceed in parallel */
mutex_lock(&bus->usb_address0_mutex);
if (udev->wusb) {
devnum = udev->portnum + 1;
BUG_ON(test_bit(devnum, bus->devmap.devicemap));
} else {
/... | 0 | 56,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'. Remember, I want response in '1' or '0', No explanation. | Code: static void withScriptExecutionContextAndScriptStateAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.TestObj.withScriptExecutionContextAndScriptStateAttribute._set");
TestObj* imp = V8TestObj::toNative(info.Holder());
TestObj* v... | 0 | 109,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 int readBSSListRid(struct airo_info *ai, int first,
BSSListRid *list)
{
Cmd cmd;
Resp rsp;
if (first == 1) {
if (ai->flags & FLAG_RADIO_MASK) return -ENETDOWN;
memset(&cmd, 0, sizeof(cmd));
cmd.cmd=CMD_LISTBSS;
if (down_interruptible(&ai->sem))
return -ERESTARTSYS;
ai->list_bss_tas... | 0 | 24,067 |
Analyze the 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_x509_fingerprint)
{
X509 *cert;
zval **zcert;
long certresource;
zend_bool raw_output = 0;
char *method = "sha1";
int method_len;
char *fingerprint;
int fingerprint_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|sb", &zcert, &method, &method_len, &raw_output) == FAILU... | 0 | 4,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'. Remember, I want response in '1' or '0', No explanation. | Code: static int do_rawv6_setsockopt(struct sock *sk, int level, int optname,
char __user *optval, unsigned int optlen)
{
struct raw6_sock *rp = raw6_sk(sk);
int val;
if (get_user(val, (int __user *)optval))
return -EFAULT;
switch (optname) {
case IPV6_CHECKSUM:
if (inet_sk(sk)->inet_num == IPPROTO_IC... | 0 | 40,183 |
Analyze the 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 __always_inline void vmcs_set_bits(unsigned long field, u32 mask)
{
BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x2000,
"vmcs_set_bits does not support 64-bit fields");
__vmcs_writel(field, __vmcs_readl(field) | mask);
}
Commit Message: kvm: nVMX: Allow L1 to interce... | 0 | 48,103 |
Analyze the 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: ShouldCompareEffectiveURLsForSiteInstanceSelection(
content::BrowserContext* browser_context,
content::SiteInstance* candidate_site_instance,
bool is_main_frame,
const GURL& candidate_url,
const GURL& destination_url) {
DCHECK(browser_context);
DCHECK(candidate_site... | 0 | 142,754 |
Analyze the 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 tee_mmu_is_vbuf_intersect_ta_private(const struct user_ta_ctx *utc,
const void *va, size_t size)
{
struct vm_region *r;
TAILQ_FOREACH(r, &utc->vm_info->regions, link) {
if (r->attr & (TEE_MATTR_EPHEMERAL | TEE_MATTR_PERMANENT))
continue;
if (core_is_buffer_intersect(va, size, r->va, r->size)... | 0 | 86,974 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: Dispatch(void)
{
int *clientReady; /* array of request ready clients */
int result;
ClientPtr client;
int nready;
HWEventQueuePtr *icheck = checkForInput;
long start_tick;
nextFreeClientID = 1;
nClients = 0;
clientReady = malloc(sizeof(int) * MaxClients);
if (!c... | 0 | 14,936 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. Remember, I want response in '1' or '0', No explanation. | Code: struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
unsigned int id)
{
struct kvm_vcpu *vcpu;
unsigned long vm_base = kvm->arch.vm_base;
int r;
int cpu;
BUG_ON(sizeof(struct kvm_vcpu) > VCPU_STRUCT_SIZE/2);
r = -EINVAL;
if (id >= KVM_MAX_VCPUS) {
printk(KERN_ERR"kvm: Can't configure vcpus > %ld",
... | 0 | 20,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'. Remember, I want response in '1' or '0', No explanation. | Code: test_bson_iter_init_from_data_at_offset (void)
{
bson_t *bson = bson_with_all_types ();
/* zero out iter, since bson_iter_init doesn't zero out iter->value. */
bson_iter_t iter = {0};
BSON_ASSERT (bson_iter_init (&iter, bson));
ASSERT_CMPINT (bson_iter_offset (&iter), ==, 0);
while (bson_iter_n... | 0 | 77,919 |
Analyze the 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 DeleteImpl(Handle<JSObject> obj, uint32_t entry) {
ElementsKind kind = KindTraits::Kind;
if (IsFastPackedElementsKind(kind)) {
JSObject::TransitionElementsKind(obj, GetHoleyElementsKind(kind));
}
if (IsFastSmiOrObjectElementsKind(KindTraits::Kind)) {
JSObject::EnsureWritableFastElements(obj);
... | 0 | 163,068 |
Analyze the 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_inet_af_supported(sa_family_t family, struct sctp_sock *sp)
{
/* PF_INET only supports AF_INET addresses. */
return AF_INET == family;
}
Commit Message: sctp: fix race on protocol/netns initialization
Consider sctp module is unloaded and is being requested because an user
is creating a sctp so... | 0 | 42,913 |
Analyze the 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: srcip_matches(struct sockaddr *srcaddr, struct sockaddr *rhs)
{
switch (srcaddr->sa_family) {
case AF_UNSPEC:
return (rhs->sa_family == AF_UNSPEC);
case AF_INET: {
struct sockaddr_in *saddr4 = (struct sockaddr_in *)srcaddr;
struct sockaddr_in *vaddr4 = (struct sockaddr_in *)rhs;
return (saddr4->sin_add... | 0 | 29,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 int ext4_journalled_write_end(struct file *file,
struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
struct page *page, void *fsdata)
{
handle_t *handle = ext4_journal_current_handle();
struct inode *inode = mapping->host;
loff_t old_size = inode->i_size;... | 0 | 67,532 |
Analyze the 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: GF_Err stri_dump(GF_Box *a, FILE * trace)
{
u32 i;
GF_SubTrackInformationBox *p = (GF_SubTrackInformationBox *)a;
gf_isom_box_dump_start(a, "SubTrackInformationBox", trace);
fprintf(trace, "switch_group=\"%d\" alternate_group=\"%d\" sub_track_id=\"%d\">\n", p->switch_group, p->alternate_group, p->sub_track_i... | 0 | 80,851 |
Analyze the 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: syncable::ModelTypeSet ProfileSyncService::GetEncryptedDataTypes() const {
DCHECK(encrypted_types_.Has(syncable::PASSWORDS));
return encrypted_types_;
}
Commit Message: [Sync] Cleanup all tab sync enabling logic now that its on by default.
BUG=none
TEST=
Review URL: https://chromiumcodereview.appspot.com/... | 0 | 104,932 |
Analyze the 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: SchedulerObject::remove(std::string key, std::string &reason, std::string &text)
{
PROC_ID id = getProcByString(key.c_str());
if (id.cluster < 0 || id.proc < 0) {
dprintf(D_FULLDEBUG, "Remove: Failed to parse id: %s\n", key.c_str());
text = "Invalid Id";
... | 1 | 164,834 |
Analyze the 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: AVCodecParserContext *av_parser_init(int codec_id)
{
AVCodecParserContext *s = NULL;
AVCodecParser *parser;
int ret;
if(codec_id == AV_CODEC_ID_NONE)
return NULL;
for(parser = av_first_parser; parser != NULL; parser = parser->next) {
if (parser->codec_ids[0] == codec_id ||
... | 0 | 28,022 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.