instruction stringclasses 1
value | input stringlengths 64 129k | output int64 0 1 | __index_level_0__ int64 0 30k |
|---|---|---|---|
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool CheckAccessControlHeaders(const char* header_name, bool exposed) {
std::string id("http://www.other.com/CheckAccessControlExposeHeaders_");
id.append(header_name);
if (exposed)
id.append("-Exposed");
id.append(".html");
KURL url = ToKURL(id);
WebURLRequest request(url);
r... | 0 | 28,546 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: spnego_gss_set_sec_context_option(
OM_uint32 *minor_status,
gss_ctx_id_t *context_handle,
const gss_OID desired_object,
const gss_buffer_t value)
{
OM_uint32 ret;
ret = gss_set_sec_context_option(minor_status,
context_handle,
desired_object,
value);
return (ret);
}
Commit Message:... | 0 | 23,706 |
Analyze the following 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 mp_chars_in_buffer(struct tty_struct *tty)
{
struct sb_uart_state *state = tty->driver_data;
return uart_circ_chars_pending(&state->info->xmit);
}
Commit Message: Staging: sb105x: info leak in mp_get_count()
The icount.reserved[] array isn't initialized so it leaks stack
information to userspace.
... | 0 | 15,719 |
Analyze the following 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 TestChangeDrawingInSubsequence() {
FakeDisplayItemClient first("first");
GraphicsContext context(GetPaintController());
InitRootChunk();
{
SubsequenceRecorder r(context, first);
first.SetVisualRect(LayoutRect(100, 100, 300, 300));
DrawRect(context, first, kBackgroundType, ... | 0 | 5,417 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static bool CheckAac(const uint8* buffer, int buffer_size) {
RCHECK(buffer_size > 6);
int offset = 0;
while (offset + 6 < buffer_size) {
BitReader reader(buffer + offset, 6);
RCHECK(ReadBits(&reader, 12) == 0xfff);
reader.SkipBits(1);
RCHECK(ReadBits(&reader, 2) == 0);
reader.SkipBi... | 0 | 24,820 |
Analyze the following 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::OnSwapOutACK(bool timed_out) {
decrement_in_flight_event_count();
StopHangMonitorTimeout();
is_waiting_for_unload_ack_ = false;
has_timed_out_on_unload_ = timed_out;
delegate_->SwappedOut(this);
}
Commit Message: Filter more incoming URLs in the CreateWindow path.
BUG=170532
... | 0 | 14,056 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int task_switch_interception(struct vcpu_svm *svm)
{
u16 tss_selector;
int reason;
int int_type = svm->vmcb->control.exit_int_info &
SVM_EXITINTINFO_TYPE_MASK;
int int_vec = svm->vmcb->control.exit_int_info & SVM_EVTINJ_VEC_MASK;
uint32_t type =
svm->vmcb->control.exit_int_info & SVM_EXITINTINFO_T... | 0 | 18,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'. | Code: gfx::Size AutofillDialogViews::SuggestionView::GetPreferredSize() const {
return gfx::Size();
}
Commit Message: Clear out some minor TODOs.
BUG=none
Review URL: https://codereview.chromium.org/1047063002
Cr-Commit-Position: refs/heads/master@{#322959}
CWE ID: CWE-20 | 0 | 24,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'. | Code: static void GetNonpeakPixelList(PixelList *pixel_list,MagickPixelPacket *pixel)
{
register SkipList
*list;
register ssize_t
channel;
size_t
color,
next,
previous;
ssize_t
count;
unsigned short
channels[5];
/*
Finds the non peak value for each of the colors.
*/
... | 0 | 6,709 |
Analyze the following 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 ChromeContentBrowserClient::RequestDesktopNotificationPermission(
const GURL& source_origin,
int callback_context,
int render_process_id,
int render_view_id) {
#if defined(ENABLE_NOTIFICATIONS)
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
WebContents* contents =
tab_util::... | 0 | 7,658 |
Analyze the following 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 v8::Handle<v8::Value> postMessageCallback(const v8::Arguments& args)
{
INC_STATS("DOM.TestActiveDOMObject.postMessage");
if (args.Length() < 1)
return V8Proxy::throwNotEnoughArgumentsError();
TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(args.Holder());
STRING_TO_V... | 1 | 2,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'. | Code: bool ChromeMetricsServiceClient::RegisterForNotifications() {
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED,
content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED,
content::NotificationService::AllSo... | 0 | 15,844 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjectPythonV8Internal::testInterfaceEmptyArrayMethodMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
Commit Message... | 0 | 1,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 perf_event_ctx_unlock(struct perf_event *event,
struct perf_event_context *ctx)
{
mutex_unlock(&ctx->mutex);
put_ctx(ctx);
}
Commit Message: perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in... | 0 | 24,595 |
Analyze the following 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 GraphicsContext::translate(float w, float h)
{
if (paintingDisabled())
return;
platformContext()->canvas()->translate(WebCoreFloatToSkScalar(w),
WebCoreFloatToSkScalar(h));
}
Commit Message: [skia] not all convex paths are convex, so recompute conv... | 0 | 2,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'. | Code: WebContentsImpl::WebContentsImpl(
BrowserContext* browser_context,
WebContentsImpl* opener)
: delegate_(NULL),
controller_(this, browser_context),
render_view_host_delegate_view_(NULL),
opener_(opener),
#if defined(OS_WIN) && defined(USE_AURA)
accessible_parent_(NULL),
#endif
... | 0 | 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'. | Code: bool InitializeSDK() {
SetUpV8();
FPDF_LIBRARY_CONFIG config;
config.version = 2;
config.m_pUserFontPaths = nullptr;
config.m_pIsolate = v8::Isolate::GetCurrent();
config.m_v8EmbedderSlot = gin::kEmbedderPDFium;
FPDF_InitLibraryWithConfig(&config);
#if defined(OS_LINUX)
FPDF_SetSystemFontInfo(&g... | 0 | 19,208 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static inline void hwsim_set_chanctx_magic(struct ieee80211_chanctx_conf *c)
{
struct hwsim_chanctx_priv *cp = (void *)c->drv_priv;
cp->magic = HWSIM_CHANCTX_MAGIC;
}
Commit Message: mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl()
'hwname' is malloced in hwsim_new_radio_nl() and should be fre... | 0 | 24,682 |
Analyze the following 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 loff_t get_loop_size(struct loop_device *lo, struct file *file)
{
return get_size(lo->lo_offset, lo->lo_sizelimit, file);
}
Commit Message: loop: fix concurrent lo_open/lo_release
范龙飞 reports that KASAN can report a use-after-free in __lock_acquire.
The reason is due to insufficient serialization in lo_... | 0 | 1,145 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: TIFFReadRawTile1(TIFF* tif, uint32 tile, void* buf, tmsize_t size, const char* module)
{
TIFFDirectory *td = &tif->tif_dir;
if (!_TIFFFillStriles( tif ))
return ((tmsize_t)(-1));
assert((tif->tif_flags&TIFF_NOREADRAW)==0);
if (!isMapped(tif)) {
tmsize_t cc;
if (!SeekOK(tif, td->td_stripoffse... | 0 | 797 |
Analyze the following 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 RenderFrameHostManager::CreateProxiesForChildFrame(FrameTreeNode* child) {
RenderFrameProxyHost* outer_delegate_proxy =
ForInnerDelegate() ? GetProxyToOuterDelegate() : nullptr;
for (const auto& pair : proxy_hosts_) {
if (pair.second.get() == outer_delegate_proxy)
continue;
child->re... | 0 | 14,180 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static long do_mincore(unsigned long addr, unsigned long pages, unsigned char *vec)
{
struct vm_area_struct *vma;
unsigned long end;
vma = find_vma(current->mm, addr);
if (!vma || addr < vma->vm_start)
return -ENOMEM;
end = min(vma->vm_end, addr + (pages << PAGE_SHIFT));
if (is_vm_hugetlb_page(vma)) {
... | 0 | 14,332 |
Analyze the following 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 h2c_handle_window_update(struct h2c *h2c, struct h2s *h2s)
{
int32_t inc;
int error;
if (h2c->dfl != 4) {
error = H2_ERR_FRAME_SIZE_ERROR;
goto conn_err;
}
/* process full frame only */
if (h2c->dbuf->i < h2c->dfl)
return 0;
inc = h2_get_n32(h2c->dbuf, 0);
if (h2c->dsi != 0) {
/* st... | 0 | 20,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: GF_Err drep_Size(GF_Box *s)
{
s->size += 8;
return GF_OK;
}
Commit Message: fixed 2 possible heap overflows (inc. #1088)
CWE ID: CWE-125 | 0 | 4,078 |
Analyze the following 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 page_mapped_in_vma(struct page *page, struct vm_area_struct *vma)
{
unsigned long address;
pte_t *pte;
spinlock_t *ptl;
address = __vma_address(page, vma);
if (unlikely(address < vma->vm_start || address >= vma->vm_end))
return 0;
pte = page_check_address(page, vma->vm_mm, address, &ptl, 1);
if (!pt... | 0 | 23,743 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjectPythonV8Internal::activityLoggingGetterF... | 0 | 7,628 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void FileSelectionCanceled() {
proxy_ = nullptr;
if (!render_frame_host_)
return;
std::move(callback_).Run(nullptr);
}
Commit Message: Convert FrameHostMsg_DidAddMessageToConsole to Mojo.
Note: Since this required changing the test
RenderViewImplTest.DispatchBeforeUnloadCanDetachFrame, I m... | 0 | 12,305 |
Analyze the following 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_init_amos_or_sagem(struct sc_card *card)
{
struct sc_context *ctx = card->ctx;
unsigned int flags;
int rv = 0;
LOG_FUNC_CALLED(ctx);
flags = IASECC_CARD_DEFAULT_FLAGS;
_sc_card_add_rsa_alg(card, 1024, flags, 0x10001);
_sc_card_add_rsa_alg(card, 2048, flags, 0x10001);
card->caps = SC_CARD_CAP_RN... | 0 | 11,449 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: v8::Local<v8::Object> AsObjectOrEmpty(v8::Local<v8::Value> value) {
return value->IsObject() ? value.As<v8::Object>() : v8::Local<v8::Object>();
}
Commit Message: [Extensions] Expand bindings access checks
BUG=601149
BUG=601073
Review URL: https://codereview.chromium.org/1866103002
Cr-Commit-Position: refs/... | 0 | 13,184 |
Analyze the following 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 GLES2Util::ComputeImagePaddedRowSize(int width,
int format,
int type,
int alignment,
uint32_t* padded_row_size) {
uint32_t bytes_per_group ... | 0 | 8,971 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool PopupContainer::handleMouseMoveEvent(const PlatformMouseEvent& event)
{
UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
return m_listBox->handleMouseMoveEvent(
constructRelativeMouseEvent(event, this, m_listBox.get()));
}
Commit Message: [REGRESSION] Refreshed autofil... | 0 | 15,338 |
Analyze the following 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 cmd_syncget(const char *tag, struct dlist *kin)
{
struct sync_state sync_state = {
imapd_userid,
imapd_userisadmin || imapd_userisproxyadmin,
imapd_authstate,
&imapd_namespace,
imapd_out,
0 /* local_only */
};
/* administrators only please *... | 0 | 6,408 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static bool emulator_io_port_access_allowed(struct x86_emulate_ctxt *ctxt,
u16 port, u16 len)
{
struct x86_emulate_ops *ops = ctxt->ops;
struct desc_struct tr_seg;
u32 base3;
int r;
u16 tr, io_bitmap_ptr, perm, bit_idx = port & 0x7;
unsigned mask = (1 << len) - 1;
unsigned long base;
ops->get_se... | 0 | 2,234 |
Analyze the following 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::OnDidChangeScrollOffsetPinningForMainFrame(
bool is_pinned_to_left, bool is_pinned_to_right) {
if (view_)
view_->SetScrollOffsetPinning(is_pinned_to_left, is_pinned_to_right);
}
Commit Message: Filter more incoming URLs in the CreateWindow path.
BUG=170532
Review URL: https:/... | 0 | 4,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: static bool cmd_read_multiple(IDEState *s, uint8_t cmd)
{
bool lba48 = (cmd == WIN_MULTREAD_EXT);
if (!s->blk || !s->mult_sectors) {
ide_abort_command(s);
return true;
}
ide_cmd_lba48_transform(s, lba48);
s->req_nb_sectors = s->mult_sectors;
ide_sector_read(s);
return... | 0 | 28,926 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: wb_print(netdissect_options *ndo,
register const void *hdr, register u_int len)
{
register const struct pkt_hdr *ph;
ph = (const struct pkt_hdr *)hdr;
if (len < sizeof(*ph) || !ND_TTEST(*ph)) {
ND_PRINT((ndo, "%s", tstr));
return;
}
len -= sizeof(*ph);
if (ph->ph_flags)
ND_PRINT((ndo, "*"))... | 0 | 13,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'. | Code: on_user_property_notify (User *user)
{
if (user->changed_timeout_id != 0)
return;
user->changed_timeout_id = g_timeout_add (250, (GSourceFunc) on_user_changed_timeout, user);
}
Commit Message:
CWE ID: CWE-22 | 0 | 20,579 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int IncrementEventListenerCount(ScriptContext* script_context,
const std::string& event_name) {
return ++g_listener_counts
.Get()[GetKeyForScriptContext(script_context)][event_name];
}
Commit Message: Ignore filtered event if an event matcher cannot be added.
BUG... | 0 | 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: static void __exit exit_o2nm(void)
{
/* XXX sync with hb callbacks and shut down hb? */
o2net_unregister_hb_callbacks();
configfs_unregister_subsystem(&o2nm_cluster_group.cs_subsys);
o2cb_sys_shutdown();
o2net_exit();
o2hb_exit();
}
Commit Message: ocfs2: subsystem.su_mutex is required while accessing the... | 0 | 13,526 |
Analyze the following 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 pdf_run_gs_OP(fz_context *ctx, pdf_processor *proc, int b)
{
pdf_run_processor *pr = (pdf_run_processor *)proc;
pdf_gstate *gstate = pdf_flush_text(ctx, pr);
gstate->stroke.color_params.op = b;
gstate->fill.color_params.op = b;
}
Commit Message:
CWE ID: CWE-416 | 0 | 1,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'. | Code: static void clear_system_oom(void)
{
struct zone *zone;
spin_lock(&zone_scan_lock);
for_each_populated_zone(zone)
zone_clear_flag(zone, ZONE_OOM_LOCKED);
spin_unlock(&zone_scan_lock);
}
Commit Message: oom: fix integer overflow of points in oom_badness
commit ff05b6f7ae762b6eb464183eec994b28ea09f6dd upst... | 0 | 9,353 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ASessionDescription::~ASessionDescription() {
}
Commit Message: Fix corruption via buffer overflow in mediaserver
change unbound sprintf() to snprintf() so network-provided values
can't overflow the buffers.
Applicable to all K/L/M/N branches.
Bug: 25747670
Change-Id: Id6a5120c2d08a6fbbd47deffb680ecf82015f4f6... | 0 | 29,867 |
Analyze the following 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 mapped_hostid(unsigned id, struct lxc_conf *conf, enum idtype idtype)
{
struct lxc_list *it;
struct id_map *map;
lxc_list_for_each(it, &conf->id_map) {
map = it->elem;
if (map->idtype != idtype)
continue;
if (id >= map->hostid && id < map->hostid + map->range)
return (id - map->hostid) + map->n... | 0 | 1,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'. | Code: check_file_permissions(i_ctx_t *i_ctx_p, const char *fname, int len,
const char *permitgroup)
{
char fname_reduced[gp_file_name_sizeof];
uint rlen = sizeof(fname_reduced);
if (gp_file_name_reduce(fname, len, fname_reduced, &rlen) != gp_combine_success)
return gs_error_... | 0 | 15,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: ClientGpuFence GpuFence::AsClientGpuFence() {
return reinterpret_cast<ClientGpuFence>(this);
}
Commit Message: gfx: Add GpuFence::Wait() method
Provide a GpuFence::Wait() method to hide the implementation details of
waiting for a GpuFence object.
Bug: 828393
Change-Id: I2153ebcb4b8cca6bb43c827fb0a9740f6a6cc2... | 0 | 2,065 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static netdev_tx_t hwsim_mon_xmit(struct sk_buff *skb,
struct net_device *dev)
{
/* TODO: allow packet injection */
dev_kfree_skb(skb);
return NETDEV_TX_OK;
}
Commit Message: mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl()
'hwname' is malloced in hwsim_new_radio_nl() and should be freed... | 0 | 8,883 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
size_t size, off_t fsize, int *flags, int mach, int strtab)
{
Elf32_Shdr sh32;
Elf64_Shdr sh64;
int stripped = 1;
void *nbuf;
off_t noff, coff, name_off;
uint64_t cap_hw1 = 0; /* SunOS 5.x hardware capabilites */
uint64_... | 1 | 29,385 |
Analyze the following 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 cirrus_vga_register_types(void)
{
type_register_static(&isa_cirrus_vga_info);
type_register_static(&cirrus_vga_info);
}
Commit Message:
CWE ID: CWE-119 | 0 | 28,776 |
Analyze the following 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 ssl_parse_max_fragment_length_ext( mbedtls_ssl_context *ssl,
const unsigned char *buf,
size_t len )
{
if( len != 1 || buf[0] >= MBEDTLS_SSL_MAX_FRAG_LEN_INVALID )
{
MBEDTLS_SSL_DEBUG_MSG( 1, ( "b... | 0 | 20,270 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static inline u32 nfsd4_layoutcommit_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op)
{
return (op_encode_hdr_size +
1 /* locr_newsize */ +
2 /* ns_size */) * sizeof(__be32);
}
Commit Message: Merge tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux
Pull nfsd updates from Bruce Fields:
"Another RDMA ... | 0 | 6,100 |
Analyze the following 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 AreURLsInPageNavigation(const GURL& existing_url,
const GURL& new_url,
bool renderer_says_in_page,
NavigationType navigation_type) {
if (existing_url == new_url)
return renderer_says_in_page;
if (!new_url.has_ref(... | 0 | 25,996 |
Analyze the following 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 RendererSchedulerImpl::EndIdlePeriodForTesting(
const base::Closure& callback,
base::TimeTicks time_remaining) {
main_thread_only().in_idle_period_for_testing = false;
EndIdlePeriod();
callback.Run();
}
Commit Message: [scheduler] Remove implicit fallthrough in switch
Bail out early when a co... | 0 | 2,841 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void UnloadController::ProcessPendingTabs() {
if (!is_attempting_to_close_browser_) {
return;
}
if (HasCompletedUnloadProcessing()) {
browser_->OnWindowClosing();
return;
}
if (!tabs_needing_before_unload_fired_.empty()) {
content::WebContents* web_contents =
*(tabs_needing_be... | 0 | 28,049 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ScopedRenderBufferBinder::ScopedRenderBufferBinder(ContextState* state,
ErrorState* error_state,
GLuint id)
: state_(state), error_state_(error_state) {
ScopedGLErrorSuppressor suppressor("ScopedRenderBuffe... | 0 | 7,386 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void Add(const std::string& event) {
base::AutoLock lock(lock_);
log_ += event + "\n";
}
Commit Message: Disable all DRP URL fetches when holdback is enabled
Disable secure proxy checker, warmup url fetcher
and client config fetch when the client is in DRP
(Data Reduction Proxy) holdback.
This CL d... | 0 | 8,243 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void vmacache_update(unsigned long addr, struct vm_area_struct *newvma)
{
if (vmacache_valid_mm(newvma->vm_mm))
current->vmacache.vmas[VMACACHE_HASH(addr)] = newvma;
}
Commit Message: mm: get rid of vmacache_flush_all() entirely
Jann Horn points out that the vmacache_flush_all() function is not only
potentia... | 0 | 9,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: bool did_replace_entry() {
EXPECT_EQ(1U, did_replace_entries_.size());
return did_replace_entries_[0];
}
Commit Message: Abort navigations on 304 responses.
A recent change (https://chromium-review.googlesource.com/1161479)
accidentally resulted in treating 304 responses as downloads. This CL
treats... | 0 | 7,568 |
Analyze the following 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 ndp_sock_recv(struct ndp *ndp)
{
struct ndp_msg *msg;
enum ndp_msg_type msg_type;
size_t len;
int err;
msg = ndp_msg_alloc();
if (!msg)
return -ENOMEM;
len = ndp_msg_payload_maxlen(msg);
err = myrecvfrom6(ndp->sock, msg->buf, &len, 0,
&msg->addrto, &msg->ifindex);
if (err) {
er... | 1 | 10,855 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static MagickBooleanType JPEGWarningHandler(j_common_ptr jpeg_info,int level)
{
#define JPEGExcessiveWarnings 1000
char
message[JMSG_LENGTH_MAX];
ErrorManager
*error_manager;
ExceptionInfo
*exception;
Image
*image;
*message='\0';
error_manager=(ErrorManager *) jpeg_info->client_d... | 0 | 29,208 |
Analyze the following 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 CairoImageOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
int width, int height,
GfxImageColorMap *colorMap,
Stream *maskStr,
int maskWidth, int maskHeight,
GfxImageColorMap *maskColorMap)
{
cairo_t *cr;
cairo_surface_t *sur... | 0 | 8,729 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ModuleExport size_t RegisterPCDImage(void)
{
MagickInfo
*entry;
entry=AcquireMagickInfo("PCD","PCD","Photo CD");
entry->decoder=(DecodeImageHandler *) ReadPCDImage;
entry->encoder=(EncodeImageHandler *) WritePCDImage;
entry->magick=(IsImageFormatHandler *) IsPCD;
entry->flags^=CoderAdjoinFlag;
... | 0 | 18,018 |
Analyze the following 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 sctp_disposition_t sctp_sf_do_dupcook_c(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
struct sctp_chunk *chunk,
sctp_cmd_seq_t *commands,
struct sctp_association *new_asoc)
{
/* The cookie should be silently discarded.
* The endpoint SHOUL... | 0 | 19,673 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf,
unsigned long addr, unsigned len)
{
void *opfunc = get_call_destination(type);
unsigned ret;
if (opfunc == NULL)
/* If there's no function, patch it with a ud2a (BUG) */
ret = paravirt_patch_insns(insnbuf, len, ud2a, ud2a+sizeof(ud2... | 0 | 3,033 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: gfx::Size PageInfoBubbleView::CalculatePreferredSize() const {
if (header_ == nullptr && site_settings_view_ == nullptr) {
return views::View::CalculatePreferredSize();
}
int height = views::View::CalculatePreferredSize().height();
int width = kMinBubbleWidth;
if (site_settings_view_) {
width =... | 0 | 11,205 |
Analyze the following 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 jsvAppendPrintf(JsVar *var, const char *fmt, ...) {
JsvStringIterator it;
jsvStringIteratorNew(&it, var, 0);
jsvStringIteratorGotoEnd(&it);
va_list argp;
va_start(argp, fmt);
vcbprintf((vcbprintf_callback)jsvStringIteratorPrintfCallback,&it, fmt, argp);
va_end(argp);
jsvStringIteratorFree(&... | 0 | 17,745 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void LayerTreeHostQt::removeTile(WebLayerID layerID, int tileID)
{
m_webPage->send(Messages::LayerTreeHostProxy::RemoveTileForLayer(layerID, tileID));
}
Commit Message: [Qt][WK2] Allow transparent WebViews
https://bugs.webkit.org/show_bug.cgi?id=80608
Reviewed by Tor Arne Vestbø.
Added support for transpar... | 0 | 26,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'. | Code: DictionaryValue* TabNavigationToValue(
const sync_pb::TabNavigation& proto) {
DictionaryValue* value = new DictionaryValue();
SET_STR(virtual_url);
SET_STR(referrer);
SET_STR(title);
SET_STR(state);
SET_ENUM(page_transition, GetPageTransitionString);
SET_ENUM(navigation_qualifier, GetPageTransit... | 0 | 9,959 |
Analyze the following 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 cdrom_read_subchannel(struct cdrom_device_info *cdi,
struct cdrom_subchnl *subchnl, int mcn)
{
const struct cdrom_device_ops *cdo = cdi->ops;
struct packet_command cgc;
char buffer[32];
int ret;
init_cdrom_command(&cgc, buffer, 16, CGC_DATA_READ);
cgc.cmd[0] = GPCMD_READ_SUBCHANNEL;
cgc.cm... | 0 | 19,702 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ModuleExport void UnregisterFITSImage(void)
{
(void) UnregisterMagickInfo("FITS");
(void) UnregisterMagickInfo("FTS");
}
Commit Message:
CWE ID: CWE-119 | 0 | 4,622 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: struct sctp_chunkhdr *sctp_inq_peek(struct sctp_inq *queue)
{
struct sctp_chunk *chunk;
sctp_chunkhdr_t *ch = NULL;
chunk = queue->in_progress;
/* If there is no more chunks in this packet, say so */
if (chunk->singleton ||
chunk->end_of_packet ||
chunk->pdiscard)
return NULL;
ch = (sctp_c... | 0 | 2,010 |
Analyze the following 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 dtls1_check_timeout_num(SSL *s)
{
s->d1->timeout.num_alerts++;
/* Reduce MTU after 2 unsuccessful retransmissions */
if (s->d1->timeout.num_alerts > 2)
{
s->d1->mtu = BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_GET_FALLBACK_MTU, 0, NULL);
}
if (s->d1->timeout.num_alerts > DTLS1_TMO_ALERT_COUNT)
... | 0 | 4,780 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static struct sco_conn *sco_conn_add(struct hci_conn *hcon, __u8 status)
{
struct hci_dev *hdev = hcon->hdev;
struct sco_conn *conn = hcon->sco_data;
if (conn || status)
return conn;
conn = kzalloc(sizeof(struct sco_conn), GFP_ATOMIC);
if (!conn)
return NULL;
spin_lock_init(&conn->lock);
hcon->sco_... | 0 | 29,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: explicit FileURLLoaderFactory(int child_id) : child_id_(child_id) {}
Commit Message: Move IsDataSaverEnabledByUser to be a static method and use it
This method now officially becomes the source of truth that
everything in the code base eventually calls into to determine whether
or not DataSaver is enabled.
B... | 0 | 1,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: bool BackendImpl::OpenFollowingEntryFromList(
Rankings::List list,
CacheRankingsBlock** from_entry,
scoped_refptr<EntryImpl>* next_entry) {
if (disabled_)
return false;
if (!new_eviction_ && Rankings::NO_USE != list)
return false;
Rankings::ScopedRankingsBlock rankings(&rankings_, *fro... | 0 | 11,246 |
Analyze the following 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 Com_Frame( void ) {
int msec, minMsec;
int timeVal, timeValSV;
static int lastTime = 0, bias = 0;
int timeBeforeFirstEvents;
int timeBeforeServer;
int timeBeforeEvents;
int timeBeforeClient;
int timeAfter;
if ( setjmp (abortframe) ) {
return; // an ERR_DROP was thrown
}
timeBefo... | 0 | 9,308 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool hasErrorInfo(ExecState* exec, JSObject* error)
{
return error->hasProperty(exec, Identifier(exec, linePropertyName))
|| error->hasProperty(exec, Identifier(exec, sourceURLPropertyName));
}
Commit Message: [JSC] Implement a helper method createNotEnoughArgumentsError()
https://bugs.webkit.org/sho... | 0 | 28,843 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: FileTransfer::SaveTransferInfo(bool success,bool try_again,int hold_code,int hold_subcode,char const *hold_reason)
{
Info.success = success;
Info.try_again = try_again;
Info.hold_code = hold_code;
Info.hold_subcode = hold_subcode;
if( hold_reason ) {
Info.error_desc = hold_reason;
}
}
Commit Message:
CW... | 0 | 27,694 |
Analyze the following 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 __bio_clone_fast(struct bio *bio, struct bio *bio_src)
{
BUG_ON(bio->bi_pool && BVEC_POOL_IDX(bio));
/*
* most users will be overriding ->bi_disk with a new target,
* so we don't set nor calculate new physical/hw segment counts here
*/
bio->bi_disk = bio_src->bi_disk;
bio_set_flag(bio, BIO_CLONED)... | 0 | 8,498 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: parserInit(XML_Parser parser, const XML_Char *encodingName) {
parser->m_processor = prologInitProcessor;
XmlPrologStateInit(&parser->m_prologState);
if (encodingName != NULL) {
parser->m_protocolEncodingName = copyString(encodingName, &(parser->m_mem));
}
parser->m_curBase = NULL;
XmlInitEncoding(... | 0 | 28,702 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PHPAPI zend_bool append_user_shutdown_function(php_shutdown_function_entry shutdown_function_entry TSRMLS_DC) /* {{{ */
{
if (!BG(user_shutdown_function_names)) {
ALLOC_HASHTABLE(BG(user_shutdown_function_names));
zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_func... | 0 | 18,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: void GraphicsContext3DPrivate::createGraphicsSurfaces(const IntSize& size)
{
#if USE(GRAPHICS_SURFACE)
if (size.isEmpty())
m_graphicsSurface.clear();
else
m_graphicsSurface = GraphicsSurface::create(size, m_surfaceFlags, m_platformContext);
#endif
}
Commit Message: [Qt] Remove an unnecess... | 0 | 19,803 |
Analyze the following 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 nfc_genl_dump_ses(struct sk_buff *skb,
struct netlink_callback *cb)
{
struct class_dev_iter *iter = (struct class_dev_iter *) cb->args[0];
struct nfc_dev *dev = (struct nfc_dev *) cb->args[1];
bool first_call = false;
if (!iter) {
first_call = true;
iter = kmalloc(sizeof(struct class_dev_... | 0 | 2,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: virtual void Trace(blink::Visitor* visitor) {
visitor->Trace(next_);
visitor->Trace(obj_);
}
Commit Message: [oilpan] Fix GCInfoTable for multiple threads
Previously, grow and access from different threads could lead to a race
on the table backing; see bug.
- Rework the table to work on an existing... | 0 | 20,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'. | Code: static int addrconf_ifid_gre(u8 *eui, struct net_device *dev)
{
return __ipv6_isatap_ifid(eui, *(__be32 *)dev->dev_addr);
}
Commit Message: ipv6: addrconf: validate new MTU before applying it
Currently we don't check if the new MTU is valid or not and this allows
one to configure a smaller than minimum allowed... | 0 | 13,669 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Context(base::Time begin_time, BrowserContext* browser_context)
: event_(new base::WaitableEvent(true, false)),
begin_time_(begin_time),
is_removing_(false),
browser_context_path_(browser_context->GetPath()),
resource_context_(browser_context->GetResourceContext()) {
DC... | 0 | 12,646 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ofputil_decode_hello(const struct ofp_header *oh, uint32_t *allowed_versions)
{
struct ofpbuf msg = ofpbuf_const_initializer(oh, ntohs(oh->length));
ofpbuf_pull(&msg, sizeof *oh);
*allowed_versions = version_bitmap_from_version(oh->version);
bool ok = true;
while (msg.size) {
const s... | 0 | 26,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: ActiveTabDelegateTest() {
auto delegate = std::make_unique<ActiveTabPermissionGranterTestDelegate>();
test_delegate_ = delegate.get();
ActiveTabPermissionGranter::SetPlatformDelegate(std::move(delegate));
}
Commit Message: Call CanCaptureVisiblePage in page capture API.
Currently the pageCapture... | 0 | 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: static void omninet_process_read_urb(struct urb *urb)
{
struct usb_serial_port *port = urb->context;
const struct omninet_header *hdr = urb->transfer_buffer;
const unsigned char *data;
size_t data_len;
if (urb->actual_length <= OMNINET_HEADERLEN || !hdr->oh_len)
return;
data = (char *)urb->transfer_buff... | 0 | 12,784 |
Analyze the following 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 nci_clear_target_list(struct nci_dev *ndev)
{
memset(ndev->targets, 0,
(sizeof(struct nfc_target)*NCI_MAX_DISCOVERED_TARGETS));
ndev->n_targets = 0;
}
Commit Message: NFC: Prevent multiple buffer overflows in NCI
Fix multiple remotely-exploitable stack-based buffer overflows due to
the NCI code ... | 0 | 10,355 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: RTCPeerConnectionHandler::CreateNativeSessionDescription(
const std::string& sdp, const std::string& type,
webrtc::SdpParseError* error) {
webrtc::SessionDescriptionInterface* native_desc =
dependency_factory_->CreateSessionDescription(type, sdp, error);
LOG_IF(ERROR, !native_desc) << "Failed t... | 0 | 9,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: static inline struct shmid_kernel *shm_obtain_object(struct ipc_namespace *ns, int id)
{
struct kern_ipc_perm *ipcp = ipc_obtain_object_idr(&shm_ids(ns), id);
if (IS_ERR(ipcp))
return ERR_CAST(ipcp);
return container_of(ipcp, struct shmid_kernel, shm_perm);
}
Commit Message: Initialize msg/shm IPC objects... | 0 | 11,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'. | Code: void GLES2DecoderImpl::DoCopyBufferSubData(GLenum readtarget,
GLenum writetarget,
GLintptr readoffset,
GLintptr writeoffset,
GLsizeiptr size) ... | 0 | 26,251 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderFrameImpl::OnSaveImageAt(int x, int y) {
blink::WebFloatRect viewport_position(x, y, 0, 0);
GetLocalRootRenderWidget()->ConvertWindowToViewport(&viewport_position);
frame_->SaveImageAt(WebPoint(viewport_position.x, viewport_position.y));
}
Commit Message: Convert FrameHostMsg_DidAddMessageToCons... | 0 | 12,327 |
Analyze the following 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 GpuChannel::DestroySoon() {
MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&GpuChannel::OnDestroy, this));
}
Commit Message: Convert plugin and GPU process to brokered handle duplication.
BUG=119250
Review URL: https://chromiumcodereview.appspot.com/9958034
git-svn-id: svn://svn.chromium.... | 0 | 5,095 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void gd_error(const char *format, ...)
{
va_list args;
va_start(args, format);
gd_error_ex(GD_WARNING, format, args);
va_end(args);
}
Commit Message: fix #215 gdImageFillToBorder stack-overflow when invalid color is used
CWE ID: CWE-119 | 0 | 5,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: xmlPushInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr input) {
int ret;
if (input == NULL) return(-1);
if (xmlParserDebugEntities) {
if ((ctxt->input != NULL) && (ctxt->input->filename))
xmlGenericError(xmlGenericErrorContext,
"%s(%d): ", ctxt->input->filename,
ctxt->input->line);
... | 1 | 17,541 |
Analyze the following 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 GetSchema(const v8::FunctionCallbackInfo<v8::Value>& args) {
args.GetReturnValue().Set(
registry_->GetSchema(*v8::String::Utf8Value(args[0])));
}
Commit Message: [Extensions] Finish freezing schema
BUG=604901
BUG=603725
BUG=591164
Review URL: https://codereview.chromium.org/1906593002
Cr-... | 0 | 19,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'. | Code: static unsigned long php_curl_ssl_id(void)
{
return (unsigned long) tsrm_thread_id();
}
Commit Message:
CWE ID: | 0 | 2,711 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void OnUpdateViewportIntersectionOnUI(const gfx::Rect& viewport_intersection,
const gfx::Rect& compositing_rect,
bool occluded_or_obscured) {
viewport_intersection_ = viewport_intersection;
compositing_rect_ = compositing_re... | 0 | 8,792 |
Analyze the following 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 decode_attr_mounted_on_fileid(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *fileid)
{
__be32 *p;
*fileid = 0;
if (unlikely(bitmap[1] & (FATTR4_WORD1_MOUNTED_ON_FILEID - 1U)))
return -EIO;
if (likely(bitmap[1] & FATTR4_WORD1_MOUNTED_ON_FILEID)) {
READ_BUF(8);
READ64(*fileid);
bitmap[1... | 0 | 23,342 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.