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: epass2003_finish(sc_card_t *card)
{
epass2003_exdata *exdata = (epass2003_exdata *)card->drv_data;
if (exdata)
free(exdata);
return SC_SUCCESS;
}
Commit Message: fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes.
CWE ID: CWE-125 | 0 | 78,387 |
Analyze the following 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 nfs4_open_delegation_recall(struct nfs_open_context *ctx, struct nfs4_state *state, const nfs4_stateid *stateid)
{
struct nfs4_exception exception = { };
struct nfs_server *server = NFS_SERVER(state->inode);
int err;
do {
err = _nfs4_open_delegation_recall(ctx, state, stateid);
switch (err) {
case ... | 0 | 19,944 |
Analyze the following 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 RenderBox::styleWillChange(StyleDifference diff, const RenderStyle& newStyle)
{
RenderStyle* oldStyle = style();
if (oldStyle) {
if (diff >= StyleDifferenceRepaint && node() &&
(isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) {
view()->repaint();
... | 1 | 171,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: static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen)
{
struct sock *sk = sock->sk;
struct bt_security sec;
int err = 0;
size_t len;
u32 opt;
BT_DBG("sk %p", sk);
if (level == SOL_RFCOMM)
return rfcomm_sock_setsockopt_old(sock, optname,... | 0 | 30,746 |
Analyze the following 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::RestoreCurrentRenderbufferBindings() {
glBindRenderbufferEXT(
GL_RENDERBUFFER,
bound_renderbuffer_ ? bound_renderbuffer_->service_id() : 0);
}
Commit Message: Revert "Revert 100494 - Fix bug in SimulateAttrib0."""
TEST=none
BUG=95625
TBR=apatrick@chromium.org
Review URL: ht... | 0 | 99,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: void ChildProcessSecurityPolicyImpl::RegisterWebSafeScheme(
const std::string& scheme) {
base::AutoLock lock(lock_);
DCHECK_EQ(0U, web_safe_schemes_.count(scheme)) << "Add schemes at most once.";
DCHECK_EQ(0U, pseudo_schemes_.count(scheme))
<< "Web-safe implies not pseudo.";
web_safe_schemes_.i... | 0 | 125,175 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: char **XGetFontPath(
register Display *dpy,
int *npaths) /* RETURN */
{
xGetFontPathReply rep;
unsigned long nbytes = 0;
char **flist = NULL;
char *ch = NULL;
char *chend;
int count = 0;
register unsigned i;
register int length;
_X_UNUSED register xReq *req;
LockDisplay(dpy);
GetEmptyReq (GetF... | 1 | 164,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: DictionaryValue* ExtensionSettingSpecificsToValue(
const sync_pb::ExtensionSettingSpecifics& proto) {
DictionaryValue* value = new DictionaryValue();
SET_STR(extension_id);
SET_STR(key);
SET_STR(value);
return value;
}
Commit Message: [Sync] Cleanup all tab sync enabling logic now that its on by de... | 0 | 105,228 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void WebContentsImpl::RenderViewReady(RenderViewHost* rvh) {
if (rvh != GetRenderViewHost()) {
return;
}
notify_disconnection_ = true;
NotificationService::current()->Notify(
NOTIFICATION_WEB_CONTENTS_CONNECTED,
Source<WebContents>(this),
NotificationService::NoDetails());
bool w... | 0 | 110,757 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void perf_cgroup_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
{
struct task_struct *task;
cgroup_taskset_for_each(task, cgrp, tset)
task_function_call(task, __perf_cgroup_move, task);
}
Commit Message: perf: Treat attr.config as u64 in perf_swevent_init()
Trinity discovered that we fail ... | 0 | 31,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'. | Code: ChromeExtensionsAPIClient::CreateWebRequestEventRouterDelegate() const {
return base::MakeUnique<ChromeExtensionWebRequestEventRouterDelegate>();
}
Commit Message: Hide DevTools frontend from webRequest API
Prevent extensions from observing requests for remote DevTools frontends
and add regression tests.
And... | 0 | 146,539 |
Analyze the following 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 UserCloudPolicyManagerFactoryChromeOS::SetEmptyTestingFactory(
content::BrowserContext* context) {}
Commit Message: Make the policy fetch for first time login blocking
The CL makes policy fetching for first time login blocking for all users, except the ones that are known to be non-enterprise users.
B... | 0 | 110,411 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int chmd_extract(struct mschm_decompressor *base,
struct mschmd_file *file, const char *filename)
{
struct mschm_decompressor_p *self = (struct mschm_decompressor_p *) base;
struct mspack_system *sys;
struct mschmd_header *chm;
struct mspack_file *fh;
off_t bytes;
if (!... | 0 | 86,816 |
Analyze the following 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 Compositor::DidReceiveCompositorFrameAck() {
++activated_frame_count_;
for (auto& observer : observer_list_)
observer.OnCompositingEnded(this);
}
Commit Message: Fix PIP window being blank after minimize/show
DesktopWindowTreeHostX11::SetVisible only made the call into
OnNativeWidgetVisibilityChang... | 0 | 140,456 |
Analyze the following 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 nfs4_open_delegation_recall(struct nfs_open_context *ctx, struct nfs4_state *state, const nfs4_stateid *stateid)
{
struct nfs4_exception exception = { };
struct nfs_server *server = NFS_SERVER(state->inode);
int err;
do {
err = _nfs4_open_delegation_recall(ctx, state, stateid);
switch (err) {
case ... | 0 | 29,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 int __init ipc_ns_init(void)
{
shm_init_ns(&init_ipc_ns);
return 0;
}
Commit Message: ipc,shm: fix shm_file deletion races
When IPC_RMID races with other shm operations there's potential for
use-after-free of the shm object's associated file (shm_file).
Here's the race before this patch:
TASK 1 ... | 0 | 27,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: ssize_t utf8_length(const char *src)
{
const char *cur = src;
size_t ret = 0;
while (*cur != '\0') {
const char first_char = *cur++;
if ((first_char & 0x80) == 0) { // ASCII
ret += 1;
continue;
}
if ((first_char & 0x40) == 0) {
return -1;
}
int32_t mask, to_ignore_mask;
size_t num_to_read... | 0 | 158,440 |
Analyze the following 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 nf_tables_getrule(struct sock *nlsk, struct sk_buff *skb,
const struct nlmsghdr *nlh,
const struct nlattr * const nla[])
{
const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
const struct nft_af_info *afi;
const struct nft_table *table;
const struct nft_chain *chain;
const struct nft_r... | 0 | 57,973 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void GLES2Implementation::GetTransformFeedbackVaryingsCHROMIUMHelper(
GLuint program,
std::vector<int8_t>* result) {
DCHECK(result);
helper_->SetBucketSize(kResultBucketId, 0);
helper_->GetTransformFeedbackVaryingsCHROMIUM(program, kResultBucketId);
GetBucketContents(kResultBucketId, result);
}
C... | 0 | 141,037 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: OMX_ERRORTYPE omx_vdec::createDivxDrmContext()
{
OMX_ERRORTYPE err = OMX_ErrorNone;
iDivXDrmDecrypt = DivXDrmDecrypt::Create();
if (iDivXDrmDecrypt) {
OMX_ERRORTYPE err = iDivXDrmDecrypt->Init();
if (err!=OMX_ErrorNone) {
DEBUG_PRINT_ERROR("ERROR :iDivXDrmDecrypt->Init %d", err);
de... | 0 | 160,255 |
Analyze the following 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 png_uint_32 png_exp(png_uint_32 x)
{
return (png_uint_32)floor(.5 + exp(x * -LN2) * 0xffffffffU);
}
Commit Message: DO NOT MERGE Update libpng to 1.6.20
BUG:23265085
Change-Id: I85199805636d771f3597b691b63bc0bf46084833
(cherry picked from commit bbe98b40cda082024b669fa508931042eed18f82)
CWE ID: | 0 | 160,092 |
Analyze the following 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 rng_backend_finalize(Object *obj)
{
RngBackend *s = RNG_BACKEND(obj);
rng_backend_free_requests(s);
}
Commit Message:
CWE ID: CWE-119 | 0 | 12,556 |
Analyze the following 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_handler_vanished(GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
struct tcmur_handler *handler = user_data;
struct dbus_info *info = handler->opaque;
if (info->register_invocation) {
char *reason;
reason = g_strdup_printf("Cannot find handler bus name: "
... | 0 | 59,044 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ImportTIFF_Date ( const TIFF_Manager & tiff, const TIFF_Manager::TagInfo & dateInfo,
SXMPMeta * xmp, const char * xmpNS, const char * xmpProp )
{
XMP_Uns16 secID = 0;
switch ( dateInfo.id ) {
case kTIFF_DateTime : secID = kTIFF_SubSecTime; break;
case kTIFF_DateTimeOriginal : secID = kTIFF... | 0 | 15,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: bool UrlData::Valid() {
DCHECK(thread_checker_.CalledOnValidThread());
base::Time now = base::Time::Now();
if (!range_supported_ && !FullyCached())
return false;
if (valid_until_ > now)
return true;
if (now - last_used_ <
base::TimeDelta::FromSeconds(kUrlMappingTimeoutSeconds))
return ... | 0 | 144,348 |
Analyze the following 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 page *balloon_retrieve(bool require_lowmem)
{
struct page *page;
if (list_empty(&ballooned_pages))
return NULL;
page = list_entry(ballooned_pages.next, struct page, lru);
if (require_lowmem && PageHighMem(page))
return NULL;
list_del(&page->lru);
if (PageHighMem(page))
balloon_stats.b... | 0 | 87,387 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: writeSelections(TIFF *in, TIFF **out, struct crop_mask *crop,
struct image_data *image, struct dump_opts *dump,
struct buffinfo seg_buffs[], char *mp, char *filename,
unsigned int *page, unsigned int total_pages)
{
int i, page_count;
int autoindex = 0;
uns... | 0 | 48,292 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: WebviewHandler::WebviewHandler() {
}
Commit Message: <webview>: Update format for local file access in manifest.json
The new format is:
"webview" : {
"partitions" : [
{
"name" : "foo*",
"accessible_resources" : ["a.html", "b.html"]
},
{
"name" : "bar",
... | 0 | 112,443 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: onig_scan(regex_t* reg, const UChar* str, const UChar* end,
OnigRegion* region, OnigOptionType option,
int (*scan_callback)(int, int, OnigRegion*, void*),
void* callback_arg)
{
int r;
int n;
int rs;
const UChar* start;
if (ONIG_IS_OPTION_ON(option, ONIG_OPTION_CHECK_VALIDITY_OF_STRING)) {
... | 0 | 64,683 |
Analyze the following 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 test_mod_mul(BIO *bp, BN_CTX *ctx)
{
BIGNUM *a, *b, *c, *d, *e;
int i, j;
a = BN_new();
b = BN_new();
c = BN_new();
d = BN_new();
e = BN_new();
BN_one(a);
BN_one(b);
BN_zero(c);
if (BN_mod_mul(e, a, b, c, ctx)) {
fprintf(stderr, "BN_mod_mul with zero modul... | 0 | 3,664 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void mp_encode_lua_string(lua_State *L, mp_buf *buf) {
size_t len;
const char *s;
s = lua_tolstring(L,-1,&len);
mp_encode_bytes(L,buf,(const unsigned char*)s,len);
}
Commit Message: Security: more cmsgpack fixes by @soloestoy.
@soloestoy sent me this additional fixes, after searching for simila... | 0 | 83,063 |
Analyze the following 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 ModuleSystem::SetNativeLazyField(v8::Local<v8::Object> object,
const std::string& field,
const std::string& module_name,
const std::string& module_field) {
SetLazyField(object,
f... | 0 | 133,077 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static size_t ZSTD_resetCCtx_usingCDict(ZSTD_CCtx* cctx,
const ZSTD_CDict* cdict,
ZSTD_CCtx_params params,
U64 pledgedSrcSize,
ZSTD_buffered_policy_e zbuff)
{
DEBUGLOG(4, "ZSTD_resetCCtx_usingCDict... | 0 | 90,109 |
Analyze the following 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 free_task(struct task_struct *tsk)
{
account_kernel_stack(tsk->stack, -1);
arch_release_thread_info(tsk->stack);
free_thread_info(tsk->stack);
rt_mutex_debug_task_free(tsk);
ftrace_graph_exit_task(tsk);
put_seccomp_filter(tsk);
arch_release_task_struct(tsk);
free_task_struct(tsk);
}
Commit Message: ... | 0 | 32,881 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: MetadataProvider* SAML_DLLLOCAL DynamicMetadataProviderFactory(const DOMElement* const & e)
{
return new DynamicMetadataProvider(e);
}
Commit Message:
CWE ID: CWE-347 | 0 | 1,315 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void MojoAudioOutputStream::OnStreamError(int stream_id) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
client_->OnError();
OnError();
}
Commit Message: Correct mojo::WrapSharedMemoryHandle usage
Fixes some incorrect uses of mojo::WrapSharedMemoryHandle which
were assuming that the call actually ha... | 0 | 149,543 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GLES2Implementation::DeferErrorCallbacks::~DeferErrorCallbacks() {
DCHECK_EQ(true, gles2_implementation_->deferring_error_callbacks_);
gles2_implementation_->deferring_error_callbacks_ = false;
gles2_implementation_->CallDeferredErrorCallbacks();
}
Commit Message: Add GL_PROGRAM_COMPLETION_QUERY_CHROMIUM
... | 0 | 141,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'. | Code: ProfileImplIOData::LazyParams::~LazyParams() {}
Commit Message: Give the media context an ftp job factory; prevent a browser crash.
BUG=112983
TEST=none
Review URL: http://codereview.chromium.org/9372002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121378 0039d316-1c4b-4281-b951-d872f2087c98
CWE ID: C... | 0 | 108,220 |
Analyze the following 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::~RTCPeerConnectionHandler() {
DCHECK(task_runner_->RunsTasksInCurrentSequence());
Stop();
GetPeerConnectionHandlers()->erase(this);
if (peer_connection_tracker_)
peer_connection_tracker_->UnregisterPeerConnection(this);
UMA_HISTOGRAM_COUNTS_10000(
"WebRTC.NumDataCh... | 0 | 153,021 |
Analyze the following 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 kill_ioctx(struct mm_struct *mm, struct kioctx *ctx,
struct completion *requests_done)
{
if (!atomic_xchg(&ctx->dead, 1)) {
struct kioctx_table *table;
spin_lock(&mm->ioctx_lock);
rcu_read_lock();
table = rcu_dereference(mm->ioctx_table);
WARN_ON(ctx != table->table[ctx->id]);
table->... | 0 | 56,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: bool PropertyKeyIsBlacklisted(const char* key) {
for (size_t i = 0; i < arraysize(kInputMethodPropertyKeysBlacklist); ++i) {
if (!std::strcmp(key, kInputMethodPropertyKeysBlacklist[i])) {
return true;
}
}
return false;
}
Commit Message: Remove use of libcros from InputMethodLibrary.
BUG=chro... | 0 | 100,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 js_tointeger(js_State *J, int idx)
{
return jsV_numbertointeger(jsV_tonumber(J, stackidx(J, idx)));
}
Commit Message:
CWE ID: CWE-119 | 0 | 13,493 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int __sctp_connect(struct sock* sk,
struct sockaddr *kaddrs,
int addrs_size)
{
struct sctp_sock *sp;
struct sctp_endpoint *ep;
struct sctp_association *asoc = NULL;
struct sctp_association *asoc2;
struct sctp_transport *transport;
union sctp_addr to;
struct sctp_af *af;
sctp_scope_t scope... | 0 | 34,988 |
Analyze the following 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 CopyFeatureSwitch(const base::CommandLine& src,
base::CommandLine* dest,
const char* switch_name) {
std::vector<std::string> features = FeaturesFromSwitch(src, switch_name);
if (!features.empty())
dest->AppendSwitchASCII(switch_name, base::JoinString(feat... | 0 | 149,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: static bool check_same_owner(struct task_struct *p)
{
const struct cred *cred = current_cred(), *pcred;
bool match;
rcu_read_lock();
pcred = __task_cred(p);
match = (cred->euid == pcred->euid ||
cred->euid == pcred->uid);
rcu_read_unlock();
return match;
}
Commit Message: Sched: fix skip_clock_update ... | 0 | 22,363 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void mp_throttle(struct tty_struct *tty)
{
struct sb_uart_state *state = tty->driver_data;
if (I_IXOFF(tty))
mp_send_xchar(tty, STOP_CHAR(tty));
if (tty->termios.c_cflag & CRTSCTS)
uart_clear_mctrl(state->port, TIOCM_RTS);
}
Commit Message: Staging: sb105x: info leak in mp_get_count()
The icount... | 0 | 29,405 |
Analyze the following 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 edge_close(struct usb_serial_port *port)
{
struct edgeport_serial *edge_serial;
struct edgeport_port *edge_port;
struct usb_serial *serial = port->serial;
unsigned long flags;
int port_number;
edge_serial = usb_get_serial_data(port->serial);
edge_port = usb_get_serial_port_data(port);
if (edg... | 0 | 66,074 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int usb_enumerate_device_otg(struct usb_device *udev)
{
int err = 0;
#ifdef CONFIG_USB_OTG
/*
* OTG-aware devices on OTG-capable root hubs may be able to use SRP,
* to wake us after we've powered off VBUS; and HNP, switching roles
* "host" to "peripheral". The OTG descriptor helps figure this out... | 1 | 168,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: int v4l2_video_std_construct(struct v4l2_standard *vs,
int id, const char *name)
{
vs->id = id;
v4l2_video_std_frame_period(id, &vs->frameperiod);
vs->framelines = (id & V4L2_STD_525_60) ? 525 : 625;
strlcpy(vs->name, name, sizeof(vs->name));
return 0;
}
Commit Message: [media] v4l: Share code betwe... | 0 | 74,698 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: UserCloudPolicyManagerFactoryChromeOS::CreateManagerForProfile(
Profile* profile,
bool force_immediate_load,
scoped_refptr<base::SequencedTaskRunner> background_task_runner) {
const CommandLine* command_line = CommandLine::ForCurrentProcess();
if (chromeos::ProfileHelper::IsSigninP... | 1 | 171,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 StreamingProcessor::releaseRecordingFrame(const sp<IMemory>& mem) {
ATRACE_CALL();
status_t res;
Mutex::Autolock m(mMutex);
ssize_t offset;
size_t size;
sp<IMemoryHeap> heap = mem->getMemory(&offset, &size);
if (heap->getHeapID() != mRecordingHeap->mHeap->getHeapID()) {
ALOGW("%s: Camer... | 1 | 173,512 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: HTMLMediaElement::~HTMLMediaElement() {
BLINK_MEDIA_LOG << "~HTMLMediaElement(" << (void*)this << ")";
DCHECK(!m_audioSourceNode);
}
Commit Message: [Blink>Media] Allow autoplay muted on Android by default
There was a mistake causing autoplay muted is shipped on Android
but it will be disabled if the chrom... | 0 | 128,964 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: png_handle_IHDR(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
{
png_byte buf[13];
png_uint_32 width, height;
int bit_depth, color_type, compression_type, filter_type;
int interlace_type;
png_debug(1, "in png_handle_IHDR");
if ((png_ptr->mode & PNG_HAVE_IHDR) != 0)
png_ch... | 0 | 79,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: crypto_adjust_frame_parameters(struct frame *frame,
const struct key_type* kt,
bool cipher_defined,
bool use_iv,
bool packet_id,
bool packet_id_long_form)
{
frame_add_to_extra_frame (frame,
(packet_id ? packet_id_size (packet_id_long_form) : 0) +
(... | 0 | 32,004 |
Analyze the following 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 hci_uart_init_work(struct work_struct *work)
{
struct hci_uart *hu = container_of(work, struct hci_uart, init_ready);
int err;
struct hci_dev *hdev;
if (!test_and_clear_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags))
return;
err = hci_register_dev(hu->hdev);
if (err < 0) {
BT_ERR("Can't register HCI... | 0 | 88,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'. | Code: void get_checksum2(char *buf, int32 len, char *sum)
{
md_context m;
switch (xfersum_type) {
case CSUM_MD5: {
uchar seedbuf[4];
md5_begin(&m);
if (proper_seed_order) {
if (checksum_seed) {
SIVALu(seedbuf, 0, checksum_seed);
md5_update(&m, seedbuf, 4);
}
md5_update(&m, (uchar *)buf, len... | 1 | 164,644 |
Analyze the following 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 char* get_cwd(pid_t pid)
{
char buf[sizeof("/proc/%lu/cwd") + sizeof(long)*3];
sprintf(buf, "/proc/%lu/cwd", (long)pid);
return malloc_readlink(buf);
}
Commit Message: ccpp: stop reading hs_error.log from /tmp
The file might contain anything and there is no way to verify its
contents.
Relate... | 0 | 74,342 |
Analyze the following 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 WebMediaPlayerImpl::CreateVideoDecodeStatsReporter() {
if (!HasVideo())
return;
if (!pipeline_metadata_.video_decoder_config.IsValidConfig())
return;
if (is_encrypted_)
return;
mojom::VideoDecodeStatsRecorderPtr recorder;
media_metrics_provider_->AcquireVideoDecodeStatsRecorder(
... | 0 | 144,370 |
Analyze the following 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 is_intra_more_likely(ERContext *s)
{
int is_intra_likely, i, j, undamaged_count, skip_amount, mb_x, mb_y;
if (!s->last_pic.f || !s->last_pic.f->data[0])
return 1; // no previous frame available -> use spatial prediction
if (s->avctx->error_concealment & FF_EC_FAVOR_INTER)
... | 0 | 79,874 |
Analyze the following 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 ScrollHitTestLayerCount() {
return paint_artifact_compositor()
->GetExtraDataForTesting()
->scroll_hit_test_layers.size();
}
Commit Message: [BGPT] Add a fast-path for transform-origin changes.
This patch adds a fast-path for updating composited transform-origin
changes without re... | 0 | 140,120 |
Analyze the following 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_download_request(void *user_data, Evas_Object *webview, void *event_info)
{
Ewk_Download_Job *download = (Ewk_Download_Job *)event_info;
Eina_Strbuf *destination_path = eina_strbuf_new();
const char *suggested_name = ewk_download_job_suggested_filename_get(download);
if (suggested_name && *su... | 0 | 106,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 void load_xref_entries(FILE *fp, xref_t *xref)
{
if (xref->is_stream)
load_xref_from_stream(fp, xref);
else
load_xref_from_plaintext(fp, xref);
}
Commit Message: Zero and sanity check all dynamic allocs.
This addresses the memory issues in Issue #6 expressed in
calloc_some.pdf and mal... | 0 | 88,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: static bool cli_dfs_check_error(struct cli_state *cli, NTSTATUS expected,
NTSTATUS status)
{
/* only deal with DS when we negotiated NT_STATUS codes and UNICODE */
if (!(smbXcli_conn_use_unicode(cli->conn))) {
return false;
}
if (!(smb1cli_conn_capabilities(cli->conn) & CAP_STATUS32)) {
return false;... | 0 | 2,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 int efx_init_port(struct efx_nic *efx)
{
int rc;
netif_dbg(efx, drv, efx->net_dev, "init port\n");
mutex_lock(&efx->mac_lock);
rc = efx->phy_op->init(efx);
if (rc)
goto fail1;
efx->port_initialized = true;
/* Reconfigure the MAC before creating dma queues (required for
* Falcon/A1 where RX_... | 0 | 19,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'. | Code: void srand(unsigned int seed) {
rand_m_w = (seed&0xFFFF) | (seed<<16);
rand_m_z = (seed&0xFFFF0000) | (seed>>16);
}
Commit Message: Fix stack size detection on Linux (fix #1427)
CWE ID: CWE-190 | 0 | 82,619 |
Analyze the following 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 WebLocalFrameImpl::SetAutofillClient(WebAutofillClient* autofill_client) {
autofill_client_ = autofill_client;
}
Commit Message: Inherit CSP when we inherit the security origin
This prevents attacks that use main window navigation to get out of the
existing csp constraints such as the related bug
Bug: 7... | 0 | 134,393 |
Analyze the following 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 RenderWidgetHostViewGuest::UpdateCursor(const WebCursor& cursor) {
NOTIMPLEMENTED();
}
Commit Message: Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantages:
- allow tearing down and recreating the UI parent context without
losing the renderer contexts
- do not requ... | 0 | 115,066 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) {
}
Commit Message: Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantages:
- allow tearing down and recreating the UI parent context without
losing the renderer contexts
- do not require a context to b... | 0 | 114,793 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Result Perform(const ArgumentTuple& args) const {
callback_.Run();
}
Commit Message: P2PQuicStream write functionality.
This adds the P2PQuicStream::WriteData function and adds tests. It also
adds the concept of a write buffered amount, enforcing this at the
P2PQuicStreamImpl.
Bug: 874296
Change-Id: Id... | 0 | 132,752 |
Analyze the following 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 MemBackendImpl::CalculateSizeOfAllEntries(
const CompletionCallback& callback) {
return current_size_;
}
Commit Message: [MemCache] Fix bug while iterating LRU list in eviction
It was possible to reanalyze a previously doomed entry.
Bug: 827492
Change-Id: I5d34d2ae87c96e0d2099e926e6eb2c1b30b01d63
Rev... | 0 | 147,358 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void overloadedStaticMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedStaticMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
exceptionState.throwTypeE... | 0 | 122,486 |
Analyze the following 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 __init create_segment_manager_caches(void)
{
discard_entry_slab = f2fs_kmem_cache_create("discard_entry",
sizeof(struct discard_entry));
if (!discard_entry_slab)
goto fail;
discard_cmd_slab = f2fs_kmem_cache_create("discard_cmd",
sizeof(struct discard_cmd));
if (!discard_cmd_slab)
goto destroy_... | 0 | 85,371 |
Analyze the following 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 unaccount_freq_event_nohz(void)
{
#ifdef CONFIG_NO_HZ_FULL
spin_lock(&nr_freq_lock);
if (atomic_dec_and_test(&nr_freq_events))
tick_nohz_dep_clear(TICK_DEP_BIT_PERF_EVENTS);
spin_unlock(&nr_freq_lock);
#endif
}
Commit Message: perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race... | 0 | 68,432 |
Analyze the following 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 proc_task_readdir(struct file * filp, void * dirent, filldir_t filldir)
{
struct dentry *dentry = filp->f_path.dentry;
struct inode *inode = dentry->d_inode;
struct task_struct *leader = NULL;
struct task_struct *task;
int retval = -ENOENT;
ino_t ino;
int tid;
struct pid_namespace *ns;
task =... | 0 | 26,897 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int oppop(RAsm *a, ut8 *data, const Opcode *op) {
int l = 0;
int offset = 0;
int mod = 0;
if (op->operands[0].type & OT_GPREG) {
if (op->operands[0].type & OT_MEMORY) {
return -1;
}
if (op->operands[0].type & OT_REGTYPE & OT_SEGMENTREG) {
ut8 base;
if (op->operands[0].reg & X86R_FS) {
... | 0 | 75,444 |
Analyze the following 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 SharedMemory::Lock(uint32 timeout_ms, SECURITY_ATTRIBUTES* sec_attr) {
if (lock_ == NULL) {
std::wstring name = name_;
name.append(L"lock");
lock_ = CreateMutex(sec_attr, FALSE, name.c_str());
if (lock_ == NULL) {
DPLOG(ERROR) << "Could not create mutex.";
return false; // ther... | 0 | 118,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 mboxlist_update_entry(const char *name, const mbentry_t *mbentry, struct txn **txn)
{
mbentry_t *old = NULL;
int r = 0;
mboxlist_mylookup(name, &old, txn, 0); // ignore errors, it will be NULL
if (!cyrusdb_fetch(mbdb, "$RACL", 5, NULL, NULL, txn)) {
r = mboxlist_update_racl(na... | 0 | 61,302 |
Analyze the following 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 ff_amf_get_field_value(const uint8_t *data, const uint8_t *data_end,
const uint8_t *name, uint8_t *dst, int dst_size)
{
int namelen = strlen(name);
int len;
while (*data != AMF_DATA_TYPE_OBJECT && data < data_end) {
len = ff_amf_tag_size(data, data_end);
... | 1 | 168,001 |
Analyze the following 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 jas_iccgettime(jas_stream_t *in, jas_icctime_t *time)
{
if (jas_iccgetuint16(in, &time->year) ||
jas_iccgetuint16(in, &time->month) ||
jas_iccgetuint16(in, &time->day) ||
jas_iccgetuint16(in, &time->hour) ||
jas_iccgetuint16(in, &time->min) ||
jas_iccgetuint16(in, &time->sec)) {
retur... | 0 | 72,696 |
Analyze the following 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 RunSetMountedStateCallback(const SetMountedStateCallback& callback,
base::PlatformFileError* error,
FilePath* cache_file_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(error);
DCHECK(cache_file_path);
if (!callbac... | 0 | 105,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 MaybeStartDrag(Tab* tab,
int model_index,
const ui::LocatedEvent& event,
const ui::ListSelectionModel& original_selection) {
Tabs tabs;
int x = tab->GetMirroredXInView(event.x());
int y = event.y();
for (int i = 0; i < GetTab... | 0 | 140,746 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: circle_draw( FT_F26Dot6 center_x,
FT_F26Dot6 center_y,
FT_F26Dot6 radius,
FTDemo_Handle* handle,
FTDemo_Display* display,
grColor color )
{
FT_Outline outline;
ft_outline_new_circle( &outline, radius, handle );
... | 0 | 10,008 |
Analyze the following 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 InsertRow(Image *image,ssize_t bpp,unsigned char *p,
ssize_t y,ExceptionInfo *exception)
{
int
bit;
Quantum
index;
register Quantum
*q;
ssize_t
x;
q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
if (q == (Quantum *) NULL)
return(MagickFa... | 0 | 89,275 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: QObject* OxideQQuickWebViewPrivate::contextHandle() const {
if (!proxy_) {
return construct_props_->context;
}
return proxy_->context();
}
Commit Message:
CWE ID: CWE-20 | 0 | 17,083 |
Analyze the following 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 bta_co_rfc_data_outgoing_size(void *user_data, int *size) {
pthread_mutex_lock(&slot_lock);
uint32_t id = (uintptr_t)user_data;
int ret = false;
*size = 0;
rfc_slot_t *slot = find_rfc_slot_by_id(id);
if (!slot)
goto out;
if (ioctl(slot->fd, FIONREAD, size) == 0) {
ret = true;
} els... | 1 | 173,456 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: eq_cached_sock_errs(const struct cached_sock_errs_entry *a,
const struct cached_sock_errs_entry *b)
{
return a->code == b->code;
}
Commit Message: evutil_parse_sockaddr_port(): fix buffer overflow
@asn-the-goblin-slayer:
"Length between '[' and ']' is cast to signed 32 bit integer on line 1815. Is
t... | 0 | 70,713 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: menu_remove_edit(WebKitWebView *page, GArray *argv, GString *result) {
(void) page;
(void) result;
remove_from_menu(argv, WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE);
}
Commit Message: disable Uzbl javascript object because of security problem.
CWE ID: CWE-264 | 0 | 18,377 |
Analyze the following 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 list_modules(GF_ModuleManager *modules)
{
u32 i;
fprintf(stderr, "\rAvailable modules:\n");
for (i=0; i<gf_modules_get_count(modules); i++) {
char *str = (char *) gf_modules_get_file_name(modules, i);
if (str) fprintf(stderr, "\t%s\n", str);
}
fprintf(stderr, "\n");
}
Commit Message: add some bound... | 0 | 92,822 |
Analyze the following 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 DesktopWindowTreeHostX11::ResetWindowRegion() {
if (custom_window_shape_) {
XShapeCombineRegion(xdisplay_, xwindow_, ShapeBounding, 0, 0,
window_shape_.get(), false);
return;
}
window_shape_.reset();
if (!IsMaximized() && !IsFullscreen()) {
SkPath window_mask;
... | 0 | 140,581 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: convert(void)
{
int ch;
char* mode = "w";
if (!checksignature())
return (-1);
readscreen();
while ((ch = getc(infile)) != ';' && ch != EOF) {
switch (ch) {
case '\0': break; /* this kludge for non-standard files */
case ',': if (!readgifimage(mode))... | 0 | 29,868 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ftrace_set_early_filter(struct ftrace_ops *ops, char *buf, int enable)
{
char *func;
while (buf) {
func = strsep(&buf, ",");
ftrace_set_regex(ops, func, strlen(func), 0, enable);
}
}
Commit Message: tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use... | 0 | 30,221 |
Analyze the following 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 FontViewBase *FVAny(void) { return (FontViewBase *) fv_list; }
Commit Message: Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846.
CWE ID: CWE-119 | 0 | 88,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'. | Code: static v8::Handle<v8::Value> testObjAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.TestObj.testObjAttr._get");
TestObj* imp = V8TestObj::toNative(info.Holder());
return toV8(imp->testObjAttr(), info.GetIsolate());
}
Commit Message: [V8] Pass Isolate to throw... | 0 | 109,623 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: get_caller_loginuid (GDBusMethodInvocation *context, gchar *loginuid, gint size)
{
PolkitSubject *subject;
gchar *cmdline;
gint pid;
gint uid;
gchar *path;
gchar *buf;
subject = polkit_system_bus_name_new (g_dbus_method_invocation_get_sender (context));
... | 0 | 10,383 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ofpacts_check_consistency(struct ofpact ofpacts[], size_t ofpacts_len,
struct flow *flow, ofp_port_t max_ports,
uint8_t table_id, uint8_t n_tables,
enum ofputil_protocol usable_protocols)
{
enum ofputil_protocol p = usable_protocols... | 0 | 77,008 |
Analyze the following 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 unsigned int bt_accept_poll(struct sock *parent)
{
struct list_head *p, *n;
struct sock *sk;
list_for_each_safe(p, n, &bt_sk(parent)->accept_q) {
sk = (struct sock *) list_entry(p, struct bt_sock, accept_q);
if (sk->sk_state == BT_CONNECTED ||
(test_bit(BT_SK_DEFER_SETUP, &bt_sk(parent... | 0 | 30,751 |
Analyze the following 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 Instance::GetToolbarRightOffset() {
int scrollbar_thickness = GetScrollbarThickness();
return GetScaled(kToolbarFadingOffsetRight) + 2 * scrollbar_thickness;
}
Commit Message: Let PDFium handle event when there is not yet a visible page.
Speculative fix for 415307. CF will confirm.
The stack trace for t... | 0 | 120,165 |
Analyze the following 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 reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObject* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::reflectedtreatnullasnullstringtreatundefinedas... | 0 | 121,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: xfs_rw_iunlock(
struct xfs_inode *ip,
int type)
{
xfs_iunlock(ip, type);
if (type & XFS_IOLOCK_EXCL)
mutex_unlock(&VFS_I(ip)->i_mutex);
}
Commit Message: ->splice_write() via ->write_iter()
iter_file_splice_write() - a ->splice_write() instance that gathers the
pipe buffers, builds a bio_vec-based iov_i... | 0 | 46,450 |
Analyze the following 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 DidRead(File::Error error,
const char* data,
int bytes_read) {
error_ = error;
buffer_.resize(bytes_read);
memcpy(&buffer_[0], data, bytes_read);
MessageLoop::current()->QuitWhenIdle();
}
Commit Message: Convert ARRAYSIZE_UNSAFE -> arraysize in base/.
R=the... | 0 | 110,856 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.