instruction stringclasses 1
value | input stringlengths 56 241k | 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'. | Code: WebsiteSettingsTest() : cert_id_(0), url_("http://www.example.com") {}
Commit Message: Fix UAF in Origin Info Bubble and permission settings UI.
In addition to fixing the UAF, will this also fix the problem of the bubble
showing over the previous tab (if the bubble is open when the tab it was opened
for close... | 0 | 125,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'. | Code: OperationID FileSystemOperationRunner::CreateSnapshotFile(
const FileSystemURL& url,
SnapshotFileCallback callback) {
base::File::Error error = base::File::FILE_OK;
std::unique_ptr<FileSystemOperation> operation = base::WrapUnique(
file_system_context_->CreateFileSystemOperation(url, &error));
... | 0 | 152,172 |
Analyze the 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 ResourceDispatcherHostImpl::OnCancelRequest(int request_id) {
CancelRequest(filter_->child_id(), request_id, true);
}
Commit Message: Make chrome.appWindow.create() provide access to the child window at a predictable time.
When you first create a window with chrome.appWindow.create(), it won't have
loade... | 0 | 105,399 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: iasecc_pin_is_verified(struct sc_card *card, struct sc_pin_cmd_data *pin_cmd_data,
int *tries_left)
{
struct sc_context *ctx = card->ctx;
struct sc_pin_cmd_data pin_cmd;
struct sc_acl_entry acl = pin_cmd_data->pin1.acls[IASECC_ACLS_CHV_VERIFY];
int rv = SC_ERROR_SECURITY_STATUS_NOT_SATISFIED;
LOG_F... | 0 | 78,503 |
Analyze the 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 snd_usbmidi_us122l_output(struct snd_usb_midi_out_endpoint *ep,
struct urb *urb)
{
int count;
if (!ep->ports[0].active)
return;
switch (snd_usb_get_speed(ep->umidi->dev)) {
case USB_SPEED_HIGH:
case USB_SPEED_SUPER:
count = 1;
break;
default:
count = 2;
}
count = snd_rawmidi... | 0 | 54,814 |
Analyze the 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_share(sa_share_impl_t impl_share) {
sa_fstype_t *fstype;
fstype = fstypes;
while (fstype != NULL) {
fstype->ops->clear_shareopts(impl_share);
free(FSINFO(impl_share, fstype)->resource);
fstype = fstype->next;
}
free(impl_share->sharepath);
free(impl_share->dataset);
free(impl_share->fsinfo);... | 0 | 96,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: static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
{
unsigned long flags;
struct sk_buff *skb;
int count = 0;
spin_lock_irqsave (&q->lock, flags);
while (!skb_queue_empty(q)) {
struct skb_data *entry;
struct urb *urb;
int retval;
skb_queue_walk(q, skb) {
entry = (struct ... | 0 | 94,888 |
Analyze the 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 vpx_codec_err_t vp8_destroy(vpx_codec_alg_priv_t *ctx)
{
vp8_remove_decoder_instances(&ctx->yv12_frame_buffers);
vpx_free(ctx);
return VPX_CODEC_OK;
}
Commit Message: DO NOT MERGE | libvpx: Cherry-pick 0f42d1f from upstream
Description from upstream:
vp8: fix decoder crash with invalid leading... | 0 | 157,769 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: cvt_64(union VALUETYPE *p, const struct magic *m)
{
DO_CVT(q, (uint64_t));
}
Commit Message:
CWE ID: CWE-20 | 0 | 14,825 |
Analyze the 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::DoParseNext(const Cluster*& pResult, long long& pos, long& len) {
long long total, avail;
long status = m_pReader->Length(&total, &avail);
if (status < 0) // error
return status;
assert((total < 0) || (avail <= total));
const long long segment_stop = (m_size < 0) ? -1 : m_start + m_size;
... | 0 | 164,199 |
Analyze the 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 BackFramebuffer::Invalidate() {
id_ = 0;
}
Commit Message: Framebuffer clear() needs to consider the situation some draw buffers are disabled.
This is when we expose DrawBuffers extension.
BUG=376951
TEST=the attached test case, webgl conformance
R=kbr@chromium.org,bajones@chromium.org
Review URL: http... | 0 | 120,987 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void *Type_DateTime_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag)
{
cmsDateTimeNumber timestamp;
struct tm * NewDateTime;
*nItems = 0;
NewDateTime = (struct tm*) _cmsMalloc(self ->ContextID, sizeof(struct tm));
if (NewDateTime... | 0 | 70,990 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool ExtensionTabsZoomTest::RunSetZoom(int tab_id, double zoom_factor) {
scoped_refptr<TabsSetZoomFunction> set_zoom_function(
new TabsSetZoomFunction());
set_zoom_function->set_extension(extension_.get());
set_zoom_function->set_has_callback(true);
return utils::RunFunction(
set_zoom_functio... | 0 | 144,835 |
Analyze the 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 TRBCCode xhci_disable_ep(XHCIState *xhci, unsigned int slotid,
unsigned int epid)
{
XHCISlot *slot;
XHCIEPContext *epctx;
trace_usb_xhci_ep_disable(slotid, epid);
assert(slotid >= 1 && slotid <= xhci->numslots);
assert(epid >= 1 && epid <= 31);
slot ... | 0 | 5,695 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int build_acquire(struct sk_buff *skb, struct xfrm_state *x,
struct xfrm_tmpl *xt, struct xfrm_policy *xp)
{
__u32 seq = xfrm_get_acqseq();
struct xfrm_user_acquire *ua;
struct nlmsghdr *nlh;
int err;
nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_ACQUIRE, sizeof(*ua), 0);
if (nlh == NULL)
return -EMSGSI... | 0 | 59,326 |
Analyze the 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 l2tp_eth_create(struct net *net, u32 tunnel_id, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg)
{
struct net_device *dev;
char name[IFNAMSIZ];
struct l2tp_tunnel *tunnel;
struct l2tp_session *session;
struct l2tp_eth *priv;
struct l2tp_eth_sess *spriv;
int rc;
struct l2tp_eth... | 0 | 24,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: static void *pppol2tp_seq_next(struct seq_file *m, void *v, loff_t *pos)
{
(*pos)++;
return NULL;
}
Commit Message: net/l2tp: don't fall back on UDP [get|set]sockopt
The l2tp [get|set]sockopt() code has fallen back to the UDP functions
for socket option levels != SOL_PPPOL2TP since day one, but that has
never... | 0 | 36,414 |
Analyze the 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_write_done(struct rpc_task *task, struct nfs_write_data *data)
{
if (!nfs4_sequence_done(task, &data->res.seq_res))
return -EAGAIN;
return data->write_done_cb ? data->write_done_cb(task, data) :
nfs4_write_done_cb(task, data);
}
Commit Message: Fix length of buffer copied in __nfs4_get_acl_... | 0 | 20,039 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool GLES2DecoderImpl::ValidateTextureParameters(
const char* function_name,
GLenum target, GLenum format, GLenum type, GLint level) {
if (!feature_info_->GetTextureFormatValidator(format).IsValid(type)) {
SetGLError(GL_INVALID_OPERATION, function_name,
(std::string("invalid type ... | 0 | 103,701 |
Analyze the 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 cgm_attach(const char *name, const char *lxcpath, pid_t pid)
{
bool pass = true;
char *cgroup = NULL;
char **slist = subsystems;
int i;
if (!cgm_dbus_connect()) {
ERROR("Error connecting to cgroup manager");
return false;
}
for (i = 0; slist[i]; i++) {
cgroup = try_get_abs_cgroup(name, ... | 0 | 44,515 |
Analyze the 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 netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct ip_tunnel *tunnel = netdev_priv(dev);
const struct iphdr *tiph = &tunnel->parms.iph;
const struct ipv6hdr *iph6 = ipv6_hdr(skb);
u8 tos = tunnel->parms.iph.tos;
__be16 df = tiph->frag_off;
struct rtable ... | 0 | 87,712 |
Analyze the 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 get_nents(struct scatterlist *sg, int nbytes)
{
int nents = 0;
while (nbytes > 0) {
nbytes -= sg->length;
sg = scatterwalk_sg_next(sg);
nents++;
}
return nents;
}
Commit Message: crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so we ... | 0 | 47,504 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: mm_record_login(Session *s, struct passwd *pw)
{
socklen_t fromlen;
struct sockaddr_storage from;
if (options.use_login)
return;
/*
* Get IP address of client. If the connection is not a socket, let
* the address be 0.0.0.0.
*/
memset(&from, 0, sizeof(from));
fromlen = sizeof(from);
if (packet_co... | 0 | 42,113 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int update_process_messages(rdpUpdate* update)
{
return update_message_queue_process_pending_messages(update);
}
Commit Message: Fixed CVE-2018-8786
Thanks to Eyal Itkin from Check Point Software Technologies.
CWE ID: CWE-119 | 0 | 83,563 |
Analyze the 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 GURL& WaitForUpdatedTargetURL() {
if (updated_target_url_.has_value())
return updated_target_url_.value();
runner_ = new MessageLoopRunner();
runner_->Run();
return updated_target_url_.value();
}
Commit Message: Security drop fullscreen for any nested WebContents level.
This rel... | 0 | 145,980 |
Analyze the 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 timelib_eat_spaces(char **ptr)
{
while (**ptr == ' ' || **ptr == '\t') {
++*ptr;
}
}
Commit Message:
CWE ID: CWE-119 | 0 | 68 |
Analyze the 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 EditorClientBlackBerry::handleKeyboardEvent(KeyboardEvent* event)
{
ASSERT(event);
const PlatformKeyboardEvent* platformEvent = event->keyEvent();
if (!platformEvent)
return;
ASSERT(event->target()->toNode());
Frame* frame = event->target()->toNode()->document()->frame();
AS... | 0 | 104,748 |
Analyze the 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: SystemKeyEventListener* SystemKeyEventListener::GetInstance() {
VLOG_IF(1, !g_system_key_event_listener)
<< "SystemKeyEventListener::GetInstance() with NULL global instance.";
return g_system_key_event_listener;
}
Commit Message: chromeos: Move audio, power, and UI files into subdirs.
This moves more ... | 0 | 109,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: void InitializeOriginStatFromOriginRequestSummary(
OriginStat* origin,
const OriginRequestSummary& summary) {
origin->set_origin(summary.origin.spec());
origin->set_number_of_hits(1);
origin->set_average_position(summary.first_occurrence + 1);
origin->set_always_access_network(summary.always... | 1 | 172,379 |
Analyze the 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: ofpacts_put_openflow_actions(const struct ofpact ofpacts[], size_t ofpacts_len,
struct ofpbuf *openflow,
enum ofp_version ofp_version)
{
const struct ofpact *a;
size_t start_size = openflow->size;
OFPACT_FOR_EACH (a, ofpacts, ofpacts_len) {
... | 0 | 77,028 |
Analyze the 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: ui::ResourceManager& CompositorImpl::GetResourceManager() {
return resource_manager_;
}
Commit Message: gpu/android : Add support for partial swap with surface control.
Add support for PostSubBuffer to GLSurfaceEGLSurfaceControl. This should
allow the display compositor to draw the minimum sub-rect necessary ... | 0 | 130,827 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int read_spaninfo(struct mschm_decompressor_p *self,
struct mschmd_sec_mscompressed *sec,
off_t *length_ptr)
{
struct mspack_system *sys = self->system;
unsigned char *data;
/* find SpanInfo file */
int err = find_sys_file(self, sec, &sec->spaninfo, spaninfo_name);
if (err)... | 0 | 76,344 |
Analyze the 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: iperf_send(struct iperf_test *test, fd_set *write_setP)
{
register int multisend, r, streams_active;
register struct iperf_stream *sp;
struct timeval now;
/* Can we do multisend mode? */
if (test->settings->burst != 0)
multisend = test->settings->burst;
else if (test->settings->ra... | 0 | 53,416 |
Analyze the 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 ShellSurface::OnMouseEvent(ui::MouseEvent* event) {
if (!resizer_) {
views::View::OnMouseEvent(event);
return;
}
if (event->handled())
return;
if ((event->flags() &
(ui::EF_MIDDLE_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON)) != 0)
return;
if (event->type() == ui::ET_MOUSE_CA... | 0 | 120,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: void RenderFrameSubmissionObserver::WaitForAnyFrameSubmission() {
break_on_any_frame_ = true;
Wait();
break_on_any_frame_ = false;
}
Commit Message: Apply ExtensionNavigationThrottle filesystem/blob checks to all frames.
BUG=836858
Change-Id: I34333a72501129fd40b5a9aa6378c9f35f1e7fc2
Reviewed-on: https:/... | 0 | 156,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: static int ipgre_open(struct net_device *dev)
{
struct ip_tunnel *t = netdev_priv(dev);
if (ipv4_is_multicast(t->parms.iph.daddr)) {
struct flowi fl = {
.oif = t->parms.link,
.fl4_dst = t->parms.iph.daddr,
.fl4_src = t->parms.iph.saddr,
.fl4_tos = RT_TOS(t->parms.iph.tos),
.proto = IPPROTO_GRE... | 0 | 35,323 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderWidgetHostImpl::RestartHangMonitorTimeoutIfNecessary() {
if (hang_monitor_timeout_ && in_flight_event_count_ > 0 && !is_hidden_)
hang_monitor_timeout_->Restart(hung_renderer_delay_);
}
Commit Message: Force a flush of drawing to the widget when a dialog is shown.
BUG=823353
TEST=as in bug
Chan... | 0 | 155,604 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderThread::DoNotNotifyWebKitOfModalLoop() {
notify_webkit_of_modal_loop_ = false;
}
Commit Message: DevTools: move DevToolsAgent/Client into content.
BUG=84078
TEST=
Review URL: http://codereview.chromium.org/7461019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93596 0039d316-1c4b-4281-b951-d... | 0 | 98,871 |
Analyze the 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 ClassicPendingScript::CancelStreaming() {
if (!streamer_)
return;
streamer_->Cancel();
streamer_ = nullptr;
streamer_done_.Reset();
is_currently_streaming_ = false;
DCHECK(!IsCurrentlyStreaming());
}
Commit Message: Check CORS using PassesAccessControlCheck() with supplied SecurityOrigin
P... | 0 | 149,684 |
Analyze the 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: WebMediaPlayer* RenderFrameImpl::CreateWebMediaPlayerForMediaStream(
WebMediaPlayerClient* client) {
#if defined(ENABLE_WEBRTC)
#if defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL)
bool found_neon =
(android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0;
UMA_HISTOGRAM_BOOLEAN("Platform.WebRtcN... | 0 | 123,113 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: free_email(void *data)
{
FREE(data);
}
Commit Message: Add command line and configuration option to set umask
Issue #1048 identified that files created by keepalived are created
with mode 0666. This commit changes the default to 0644, and also
allows the umask to be specified in the configuration or as a comma... | 0 | 75,798 |
Analyze the 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 btrfs_set_bit_hook(struct inode *inode,
struct extent_state *state, unsigned *bits)
{
if ((*bits & EXTENT_DEFRAG) && !(*bits & EXTENT_DELALLOC))
WARN_ON(1);
/*
* set_bit and clear bit hooks normally require _irqsave/restore
* but in this case, we are only testing for the DELALLOC
... | 0 | 41,675 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int parse_path_selector(struct dm_arg_set *as, struct priority_group *pg,
struct dm_target *ti)
{
int r;
struct path_selector_type *pst;
unsigned ps_argc;
static struct dm_arg _args[] = {
{0, 1024, "invalid number of path selector args"},
};
pst = dm_get_path_selector(dm_shift_arg(as));... | 0 | 23,606 |
Analyze the 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_Err trgr_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_TrackGroupBox *ptr = (GF_TrackGroupBox *) s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
return gf_isom_box_array_write(s, ptr->groups, bs);
}
Commit Message: fixed 2 possible heap overflows (inc. #1088)
CW... | 0 | 80,597 |
Analyze the 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 kernel_halt(void)
{
kernel_shutdown_prepare(SYSTEM_HALT);
migrate_to_reboot_cpu();
syscore_shutdown();
printk(KERN_EMERG "System halted.\n");
kmsg_dump(KMSG_DUMP_HALT);
machine_halt();
}
Commit Message: mm: fix prctl_set_vma_anon_name
prctl_set_vma_anon_name could attempt to set the name across
two v... | 0 | 162,050 |
Analyze the 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: extract_header_length(uint16_t fc)
{
int len = 0;
switch ((fc >> 10) & 0x3) {
case 0x00:
if (fc & (1 << 6)) /* intra-PAN with none dest addr */
return -1;
break;
case 0x01:
return -1;
case 0x02:
len += 4;
break;
case 0x03:
len += 10;
break;
}
switch ((fc >> 14) & 0x3) {
case 0x00:
brea... | 1 | 170,029 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: find_prev_fhdr(struct sk_buff *skb, u8 *prevhdrp, int *prevhoff, int *fhoff)
{
u8 nexthdr = ipv6_hdr(skb)->nexthdr;
const int netoff = skb_network_offset(skb);
u8 prev_nhoff = netoff + offsetof(struct ipv6hdr, nexthdr);
int start = netoff + sizeof(struct ipv6hdr);
int len = skb->len - start;
u8 prevhdr = NE... | 0 | 19,621 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void LocalDOMWindow::cancelIdleCallback(int id) {
if (Document* document = this->document())
document->CancelIdleCallback(id);
}
Commit Message: MacViews: Enable secure text input for password Textfields.
In Cocoa the NSTextInputContext automatically enables secure text input
when activated and it's in th... | 0 | 125,929 |
Analyze the 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 RenderSVGImage::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint&, const RenderLayerModelObject*)
{
IntRect contentRect = enclosingIntRect(repaintRectInLocalCoordinates());
if (!contentRect.isEmpty())
rects.append(contentRect);
}
Commit Message: Avoid drawing SVG image content whe... | 0 | 123,630 |
Analyze the 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 CSoundFile::Panbrello(ModChannel *p, uint32 param) const
{
if (param & 0x0F) p->nPanbrelloDepth = param & 0x0F;
if (param & 0xF0) p->nPanbrelloSpeed = (param >> 4) & 0x0F;
}
Commit Message: [Fix] Possible out-of-bounds read when computing length of some IT files with pattern loops (OpenMPT: formats that a... | 0 | 83,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'. | Code: static irda_queue_t *dequeue_first(irda_queue_t **queue)
{
irda_queue_t *ret;
pr_debug("dequeue_first()\n");
/*
* Set return value
*/
ret = *queue;
if ( *queue == NULL ) {
/*
* Queue was empty.
*/
} else if ( (*queue)->q_next == *queue ) {
/*
* Queue only contained a single element. It... | 0 | 68,150 |
Analyze the 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 MainThreadFrameObserver::Wait() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
render_widget_host_->Send(new ViewMsg_WaitForNextFrameForTests(
render_widget_host_->GetRoutingID(), routing_id_));
run_loop_.reset(new base::RunLoop());
run_loop_->Run();
run_loop_.reset(nullptr);
}
Commit Message: Ap... | 0 | 156,186 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RunTaskOnUIThread(const base::Closure& task) {
RunTaskOnThread(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), task);
}
Commit Message: Remove parent* arg from GDataEntry ctor.
* Remove static FromDocumentEntry from GDataEntry, GDataFile, GDataDirectory. Replace with InitFromDocume... | 0 | 117,046 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: tt_cmap14_char_map_def_binary( FT_Byte *base,
FT_UInt32 char_code )
{
FT_UInt32 numRanges = TT_PEEK_ULONG( base );
FT_UInt32 max, min;
min = 0;
max = numRanges;
base += 4;
/* binary search */
while ( min < max )
{
FT_UInt32 mid... | 0 | 7,098 |
Analyze the 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: string16 URLFixerUpper::SegmentURL(const string16& text,
url_parse::Parsed* parts) {
std::string text_utf8 = UTF16ToUTF8(text);
url_parse::Parsed parts_utf8;
std::string scheme_utf8 = SegmentURL(text_utf8, &parts_utf8);
UTF8PartsToUTF16Parts(text_utf8, parts_utf8, parts)... | 0 | 99,447 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ChunkedUploadDataStream::~ChunkedUploadDataStream() {
}
Commit Message: Replace base::MakeUnique with std::make_unique in net/.
base/memory/ptr_util.h includes will be cleaned up later.
Bug: 755727
Change-Id: Ibaf46f05c9b02b76f9a91e819984b087a8c0d434
Reviewed-on: https://chromium-review.googlesource.com/627300... | 0 | 156,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 DelegatedFrameHost::EvictDelegatedFrame() {
client_->GetLayer()->SetShowPaintedContent();
frame_provider_ = NULL;
if (!surface_id_.is_null()) {
surface_factory_->Destroy(surface_id_);
surface_id_ = cc::SurfaceId();
}
delegated_frame_evictor_->DiscardedFrame();
}
Commit Message: repairs Cop... | 0 | 111,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'. | Code: static void vmxnet3_cleanup(NetClientState *nc)
{
VMXNET3State *s = qemu_get_nic_opaque(nc);
s->nic = NULL;
}
Commit Message:
CWE ID: CWE-20 | 0 | 15,580 |
Analyze the 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 shm_set_policy(struct vm_area_struct *vma, struct mempolicy *new)
{
struct file *file = vma->vm_file;
struct shm_file_data *sfd = shm_file_data(file);
int err = 0;
if (sfd->vm_ops->set_policy)
err = sfd->vm_ops->set_policy(vma, new);
return err;
}
Commit Message: ipc,shm: fix shm_file deletion ... | 0 | 27,984 |
Analyze the 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::TabClosingAt(TabStripModel* tab_strip_model,
TabContentsWrapper* contents,
int index) {
NotificationService::current()->Notify(
NotificationType::TAB_CLOSING,
Source<NavigationController>(&contents->controller()),
Notification... | 0 | 98,330 |
Analyze the 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 BnGraphicBufferConsumer::onTransact(
uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
{
switch(code) {
case ACQUIRE_BUFFER: {
CHECK_INTERFACE(IGraphicBufferConsumer, data, reply);
BufferItem item;
int64_t presentWhen = data.readInt64();
uint64_t maxFrameNumber = data.re... | 1 | 173,877 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: size_t tls12_get_psigalgs(SSL *s, int sent, const unsigned char **psigs)
{
/*
* If Suite B mode use Suite B sigalgs only, ignore any other
* preferences.
*/
#ifndef OPENSSL_NO_EC
switch (tls1_suiteb(s)) {
case SSL_CERT_FLAG_SUITEB_128_LOS:
*psigs = suiteb_sigalgs;
return... | 0 | 69,304 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int shmem_radix_tree_replace(struct address_space *mapping,
pgoff_t index, void *expected, void *replacement)
{
void **pslot;
void *item = NULL;
VM_BUG_ON(!expected);
pslot = radix_tree_lookup_slot(&mapping->page_tree, index);
if (pslot)
item = radix_tree_deref_slot_protected(pslot,
&mapp... | 0 | 33,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'. | Code: void userfaultfd_unmap_complete(struct mm_struct *mm, struct list_head *uf)
{
struct userfaultfd_unmap_ctx *ctx, *n;
struct userfaultfd_wait_queue ewq;
list_for_each_entry_safe(ctx, n, uf, list) {
msg_init(&ewq.msg);
ewq.msg.event = UFFD_EVENT_UNMAP;
ewq.msg.arg.remove.start = ctx->start;
ewq.msg.arg... | 0 | 76,465 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: size_t UrlData::CachedSize() {
DCHECK(thread_checker_.CalledOnValidThread());
return multibuffer()->map().size();
}
Commit Message: Simplify "WouldTaintOrigin" concept in media/blink
Currently WebMediaPlayer has three predicates:
- DidGetOpaqueResponseFromServiceWorker
- HasSingleSecurityOrigin
- DidPass... | 0 | 144,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'. | Code: static bool ExecuteYankAndSelect(LocalFrame& frame,
Event*,
EditorCommandSource,
const String&) {
const String& yank_string = frame.GetEditor().GetKillRing().Yank();
if (DispatchBeforeInputInsertText(
... | 0 | 128,627 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool RootWindow::ProcessGestures(ui::GestureRecognizer::Gestures* gestures) {
if (!gestures)
return false;
bool handled = false;
for (unsigned int i = 0; i < gestures->size(); i++) {
GestureEvent* gesture =
static_cast<GestureEvent*>(gestures->get().at(i));
if (DispatchGestureEvent(gestu... | 0 | 103,958 |
Analyze the 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 RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
if (!render_frame_created_)
return false;
ScopedActiveURL scoped_active_url(this);
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(RenderFrameHostImpl, msg)
IPC_MESSAGE_HANDLER(FrameHostMsg_RenderProcessGone, OnRenderProcessGone)
... | 1 | 172,717 |
Analyze the 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 TabsCaptureVisibleTabFunction::OnCaptureFailure(CaptureResult result) {
Respond(Error(CaptureResultToErrorMessage(result)));
}
Commit Message: Call CanCaptureVisiblePage in page capture API.
Currently the pageCapture permission allows access
to arbitrary local files and chrome:// pages which
can be a sec... | 0 | 151,504 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ChromeContentBrowserClient::CreateThrottlesForNavigation(
content::NavigationHandle* handle) {
std::vector<std::unique_ptr<content::NavigationThrottle>> throttles;
if (handle->IsInMainFrame()) {
throttles.push_back(
page_load_metrics::MetricsNavigationThrottle::Create(handle));
}
#if BUILD... | 0 | 142,615 |
Analyze the 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 __net_init ip6_frags_ns_sysctl_register(struct net *net)
{
struct ctl_table *table;
struct ctl_table_header *hdr;
table = ip6_frags_ns_ctl_table;
if (!net_eq(net, &init_net)) {
table = kmemdup(table, sizeof(ip6_frags_ns_ctl_table), GFP_KERNEL);
if (table == NULL)
goto err_alloc;
table[0]... | 0 | 18,724 |
Analyze the 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 CheckThrottleResults(
NavigationThrottle::ThrottleCheckResult result1,
NavigationThrottle::ThrottleCheckResult result2,
NavigationThrottle::ThrottleCheckResult result3,
size_t loading_slots) {
EXPECT_EQ(content::NavigationThrottle::PROCEED, result1);
switch (loading_... | 0 | 132,152 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void *set_eth_seg(struct mlx5_wqe_eth_seg *eseg,
const struct ib_send_wr *wr, void *qend,
struct mlx5_ib_qp *qp, int *size)
{
void *seg = eseg;
memset(eseg, 0, sizeof(struct mlx5_wqe_eth_seg));
if (wr->send_flags & IB_SEND_IP_CSUM)
eseg->cs_flags = MLX5_ETH_WQE_L3_CSUM |
MLX5_ETH_WQE_L4... | 0 | 92,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'. | Code: xar_cleanup(struct archive_read *a)
{
struct xar *xar;
struct hdlink *hdlink;
int i;
int r;
xar = (struct xar *)(a->format->data);
checksum_cleanup(a);
r = decompression_cleanup(a);
hdlink = xar->hdlink_list;
while (hdlink != NULL) {
struct hdlink *next = hdlink->next;
free(hdlink);
hdlink = next... | 0 | 61,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: static int ssh_rportcmp_ssh2(void *av, void *bv)
{
struct ssh_rportfwd *a = (struct ssh_rportfwd *) av;
struct ssh_rportfwd *b = (struct ssh_rportfwd *) bv;
int i;
if ( (i = strcmp(a->shost, b->shost)) != 0)
return i < 0 ? -1 : +1;
if (a->sport > b->sport)
return +1;
if (a->sport < b->sp... | 0 | 8,588 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: status_t SoftAACEncoder2::setAudioParams() {
ALOGV("setAudioParams: %u Hz, %u channels, %u bps, %i sbr mode, %i sbr ratio",
mSampleRate, mNumChannels, mBitRate, mSBRMode, mSBRRatio);
if (AACENC_OK != aacEncoder_SetParam(mAACEncoder, AACENC_AOT,
getAOTFromProfile(mAACProfile))) {
... | 0 | 162,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: PAM_EXTERN int pam_sm_open_session(pam_handle_t * pamh, int flags, int argc,
const char **argv)
{
pam_syslog(pamh, LOG_DEBUG,
"Function pam_sm_open_session() is not implemented in this module");
return PAM_SERVICE_ERR;
}
Commit Message: Use EVP_PKEY_size() to allocate correct size of signature buffer. (#1... | 0 | 87,898 |
Analyze the 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: zfilenamelistseparator(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
push(1);
make_const_string(op, avm_foreign | a_readonly, 1,
(const byte *)&gp_file_name_list_separator);
return 0;
}
Commit Message:
CWE ID: | 0 | 3,361 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ServiceWorkerContainer::ServiceWorkerContainer(ExecutionContext* executionContext)
: ContextLifecycleObserver(executionContext)
, m_provider(0)
{
if (!executionContext)
return;
if (ServiceWorkerContainerClient* client = ServiceWorkerContainerClient::from(executionContext)) {
m_pr... | 0 | 156,551 |
Analyze the 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 Splash::pipeRunSimpleCMYK8(SplashPipe *pipe) {
if (state->overprintMask & 1) {
pipe->destColorPtr[0] = (state->overprintAdditive) ?
std::min<int>(pipe->destColorPtr[0] + state->cmykTransferC[pipe->cSrc[0]], 255) :
state->cmykTransferC[pipe->cSrc[0]];
}
if (state->overpr... | 0 | 4,126 |
Analyze the 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: GpuProcessHost::GpuProcessHost(int host_id, GpuProcessKind kind)
: host_id_(host_id),
in_process_(false),
software_rendering_(false),
kind_(kind),
process_launched_(false) {
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess) ||
CommandLine::ForCurrentProc... | 0 | 102,954 |
Analyze the 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 RenderViewHostImpl::OnDidRedirectProvisionalLoad(
int32 page_id,
const GURL& source_url,
const GURL& target_url) {
delegate_->DidRedirectProvisionalLoad(
this, page_id, source_url, target_url);
}
Commit Message: Filter more incoming URLs in the CreateWindow path.
BUG=170532
Review URL:... | 0 | 117,237 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
unsigned int flags, struct timespec *timeout)
{
int fput_needed, err, datagrams;
struct socket *sock;
struct mmsghdr __user *entry;
struct compat_mmsghdr __user *compat_entry;
struct msghdr msg_sys;
struct timespec64 end_time;
... | 0 | 82,242 |
Analyze the 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 GIFNextPixel(gdImagePtr im, GifCtx *ctx)
{
int r;
if(ctx->CountDown == 0) {
return EOF;
}
--(ctx->CountDown);
r = gdImageGetPixel(im, ctx->curx, ctx->cury);
BumpPixel(ctx);
return r;
}
Commit Message: Fix #492: Potential double-free in gdImage*Ptr()
Whenever `gdImage*Ptr()` calls `gdIma... | 0 | 97,060 |
Analyze the 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 iriap_connect_indication(void *instance, void *sap,
struct qos_info *qos, __u32 max_seg_size,
__u8 max_header_size,
struct sk_buff *skb)
{
struct iriap_cb *self, *new;
IRDA_DEBUG(1, "%s()\n", __func__);
self = (struct iriap_cb *) instance;
IRDA_ASSERT(skb != NULL, ret... | 0 | 35,202 |
Analyze the 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: GLint GLES2Implementation::GetFragDataIndexEXT(GLuint program,
const char* name) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetFragDataIndexEXT(" << program
<< ", " << name << ")");
TRACE_EVENT0("gpu", ... | 0 | 140,987 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void HTMLFormElement::ScheduleFormSubmission(FormSubmission* submission) {
DCHECK(submission->Method() == FormSubmission::kPostMethod ||
submission->Method() == FormSubmission::kGetMethod);
DCHECK(submission->Data());
DCHECK(submission->Form());
if (submission->Action().IsEmpty())
return;
i... | 1 | 173,032 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: nfsd4_encode_access(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_access *access)
{
struct xdr_stream *xdr = &resp->xdr;
__be32 *p;
if (!nfserr) {
p = xdr_reserve_space(xdr, 8);
if (!p)
return nfserr_resource;
*p++ = cpu_to_be32(access->ac_supported);
*p++ = cpu_to_be32(access->ac_res... | 0 | 65,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: int nlmsg_padlen(int payload)
{
return nlmsg_total_size(payload) - nlmsg_msg_size(payload);
}
Commit Message:
CWE ID: CWE-190 | 0 | 12,924 |
Analyze the 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: std::unique_ptr<BlobDataHandle> BlobStorageContext::AddFinishedBlob(
const BlobDataBuilder& external_builder) {
TRACE_EVENT0("Blob", "Context::AddFinishedBlob");
return BuildBlob(external_builder, TransportAllowedCallback());
}
Commit Message: [BlobStorage] Fixing potential overflow
Bug: 779314
Change-I... | 0 | 150,271 |
Analyze the 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 normal_ecc_mulmod(mp_int* k, ecc_point *G, ecc_point *R,
mp_int* a, mp_int* modulus, int map,
void* heap)
#else
int wc_ecc_mulmod_ex(mp_int* k, ecc_point *G, ecc_point *R,
mp_int* a, mp_int* modulus, int map,
void* heap)
#endif
{
#... | 0 | 81,846 |
Analyze the 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 __be64 sig_mkey_mask(void)
{
u64 result;
result = MLX5_MKEY_MASK_LEN |
MLX5_MKEY_MASK_PAGE_SIZE |
MLX5_MKEY_MASK_START_ADDR |
MLX5_MKEY_MASK_EN_SIGERR |
MLX5_MKEY_MASK_EN_RINVAL |
MLX5_MKEY_MASK_KEY |
MLX5_MKEY_MASK_LR |
MLX5_MKEY_MASK_LW |
MLX5_MKEY_MASK_RR |
MLX5_MKEY_MASK_RW |... | 0 | 92,203 |
Analyze the 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 get_int(char **p, int DefaultValue)
{
uint32_t Value = 0;
unsigned char UseDefault;
UseDefault = 1;
skip_blanks(p);
while ( ((**p)<= '9' && (**p)>= '0') )
{
Value = Value * 10 + (**p) - '0';
UseDefault = 0;
(*p)++;
}
if (UseDefault)
return DefaultValue;
else
return Value;
}
Commit Mess... | 0 | 159,731 |
Analyze the 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: EXPORTED int mboxlist_changesub(const char *name, const char *userid,
const struct auth_state *auth_state,
int add, int force, int notify)
{
mbentry_t *mbentry = NULL;
int r;
struct db *subs;
struct mboxevent *mboxevent;
if ((r =... | 0 | 61,248 |
Analyze the 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 RenderView::ApplyWebPreferences(const WebPreferences& prefs,
WebView* web_view) {
WebSettings* settings = web_view->GetSettings();
ApplyFontsFromMap(prefs.standard_font_family_map,
SetStandardFontFamilyWrapper, settings);
ApplyFontsFromMap(prefs.... | 0 | 147,946 |
Analyze the 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 Document::setXMLStandalone(bool standalone, ExceptionState& es)
{
if (!implementation()->hasFeature("XML", String())) {
es.throwUninformativeAndGenericDOMException(NotSupportedError);
return;
}
m_xmlStandalone = standalone ? Standalone : NotStandalone;
}
Commit Message: Refactor... | 0 | 102,884 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void __net_init fib6_tables_init(struct net *net)
{
fib6_link_table(net, net->ipv6.fib6_main_tbl);
}
Commit Message: net: fib: fib6_add: fix potential NULL pointer dereference
When the kernel is compiled with CONFIG_IPV6_SUBTREES, and we return
with an error in fn = fib6_add_1(), then error codes are en... | 0 | 28,430 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void SyncManager::SyncInternal::RefreshEncryption() {
DCHECK(initialized_);
WriteTransaction trans(FROM_HERE, GetUserShare());
WriteNode node(&trans);
if (node.InitByTagLookup(kNigoriTag) != sync_api::BaseNode::INIT_OK) {
NOTREACHED() << "Unable to set encrypted datatypes because Nigori node not "
... | 0 | 105,154 |
Analyze the 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_Err stsg_Read(GF_Box *s, GF_BitStream *bs)
{
u32 i;
GF_SubTrackSampleGroupBox *ptr = (GF_SubTrackSampleGroupBox *)s;
ISOM_DECREASE_SIZE(s, 6);
ptr->grouping_type = gf_bs_read_u32(bs);
ptr->nb_groups = gf_bs_read_u16(bs);
ISOM_DECREASE_SIZE(s, ptr->nb_groups*4);
GF_SAFE_ALLOC_N(ptr->group_description_ind... | 0 | 80,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'. | Code: nonmagic(const char *str)
{
const char *p;
size_t rv = 0;
for (p = str; *p; p++)
switch (*p) {
case '\\': /* Escaped anything counts 1 */
if (!*++p)
p--;
rv++;
continue;
case '?': /* Magic characters count 0 */
case '*':
case '.':
case '+':
case '^':
case '$':
continue;
case ... | 0 | 37,975 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.