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: int main(int argc, char **argv)
{
u32 i, tmp;
u32 maxNumPics = 0;
u8 *byteStrmStart;
u8 *imageData;
u8 *tmpImage = NULL;
u32 strmLen;
u32 picSize;
H264SwDecInst decInst;
H264SwDecRet ret;
H264SwDecInput decInput;
H264SwDecOutput decOutput;
H264SwDecPicture decPictu... | 0 | 160,875 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int em_invlpg(struct x86_emulate_ctxt *ctxt)
{
int rc;
ulong linear;
rc = linearize(ctxt, ctxt->src.addr.mem, 1, false, &linear);
if (rc == X86EMUL_CONTINUE)
ctxt->ops->invlpg(ctxt, linear);
/* Disable writeback. */
ctxt->dst.type = OP_NONE;
return X86EMUL_CONTINUE;
}
Commit Message: KVM: x86: f... | 0 | 21,754 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: RenderProcessHostImpl::GetSpareRenderProcessHostForTesting() {
return g_spare_render_process_host_manager.Get().spare_render_process_host();
}
Commit Message: Correct mojo::WrapSharedMemoryHandle usage
Fixes some incorrect uses of mojo::WrapSharedMemoryHandle which
were assuming that the call actually has any... | 0 | 149,287 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: MagickExport MagickBooleanType ClampImage(Image *image)
{
MagickBooleanType
status;
status=ClampImageChannel(image,DefaultChannels);
return(status);
}
Commit Message: https://github.com/ImageMagick/ImageMagick/issues/1609
CWE ID: CWE-125 | 0 | 89,016 |
Analyze the following 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 ext4_sync_fs(struct super_block *sb, int wait)
{
int ret = 0;
tid_t target;
struct ext4_sb_info *sbi = EXT4_SB(sb);
trace_ext4_sync_fs(sb, wait);
flush_workqueue(sbi->dio_unwritten_wq);
if (jbd2_journal_start_commit(sbi->s_journal, &target)) {
if (wait)
jbd2_log_wait_commit(sbi->s_journal, ... | 0 | 20,529 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static inline int tcp_dupack_heuristics(const struct tcp_sock *tp)
{
return tcp_is_fack(tp) ? tp->fackets_out : tp->sacked_out + 1;
}
Commit Message: tcp: drop SYN+FIN messages
Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his
linux machines to their limits.
Dont call conn_request() if the ... | 0 | 41,144 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: write_png(struct display *dp, png_infop ip, int transforms)
{
display_clean_write(dp); /* safety */
buffer_start_write(&dp->written_file);
dp->operation = "write";
dp->transforms = transforms;
dp->write_pp = png_create_write_struct(PNG_LIBPNG_VER_STRING, dp,
display_error, display_warning);... | 0 | 159,859 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: fmov_idx_reg(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m,
int n)
{
if (FPSCR_SZ) {
FMOV_EXT(n);
READ(FRn, Rm + R0 + 4);
n++;
READ(FRn, Rm + R0);
} else {
READ(FRn, Rm + R0);
}
return 0;
}
Commit Message: perf: Remove the nmi parameter from the swevent and overflow interface... | 0 | 25,599 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: LayerTreeHostTestDeferCommits()
: num_will_begin_impl_frame_(0), num_send_begin_main_frame_(0) {}
Commit Message: (Reland) Discard compositor frames from unloaded web content
This is a reland of https://codereview.chromium.org/2707243005/ with a
small change to fix an uninitialized memory error that fai... | 0 | 137,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: HistoryQuickProvider::HistoryQuickProvider(ACProviderListener* listener,
Profile* profile)
: HistoryProvider(listener, profile, "HistoryQuickProvider"),
languages_(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)) {
enum InliningOption {
INLINING_... | 0 | 108,128 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ScriptPromise ReadableStreamReader::cancel(ScriptState* scriptState)
{
return cancel(scriptState, ScriptValue(scriptState, v8::Undefined(scriptState->isolate())));
}
Commit Message: Remove blink::ReadableStream
This CL removes two stable runtime enabled flags
- ResponseConstructedWithReadableStream
- Resp... | 0 | 120,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: void ChromeRenderMessageFilter::OnNaClCreateTemporaryFile(
IPC::Message* reply_msg) {
pnacl_file_host::CreateTemporaryFile(this, reply_msg);
}
Commit Message: Disable tcmalloc profile files.
BUG=154983
TBR=darin@chromium.org
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11087041
git-svn-... | 0 | 102,119 |
Analyze the following 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 handle_revision_arg(const char *arg_, struct rev_info *revs, int flags, unsigned revarg_opt)
{
struct object_context oc;
char *dotdot;
struct object *object;
unsigned char sha1[20];
int local_flags;
const char *arg = arg_;
int cant_be_filename = revarg_opt & REVARG_CANNOT_BE_FILENAME;
unsigned get_sha... | 0 | 55,006 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: unsigned lodepng_encode_file(const char* filename, const unsigned char* image, unsigned w, unsigned h,
LodePNGColorType colortype, unsigned bitdepth)
{
unsigned char* buffer = NULL;
size_t buffersize = 0;
unsigned error = lodepng_encode_memory(&buffer, &buffersize, image, w, h, ... | 0 | 87,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: void ChromeContentRendererClient::DidDestroyScriptContext(WebFrame* frame) {
EventBindings::HandleContextDestroyed(frame);
}
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/sr... | 0 | 98,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: static void print_bpf_insn(struct bpf_insn *insn)
{
u8 class = BPF_CLASS(insn->code);
if (class == BPF_ALU || class == BPF_ALU64) {
if (BPF_SRC(insn->code) == BPF_X)
verbose("(%02x) %sr%d %s %sr%d\n",
insn->code, class == BPF_ALU ? "(u32) " : "",
insn->dst_reg,
bpf_alu_string[BPF_OP(insn->code... | 0 | 53,107 |
Analyze the following 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 RenderFrameDevToolsAgentHost::OnNavigationRequestWillBeSent(
const NavigationRequest& navigation_request) {
DispatchToAgents(navigation_request.frame_tree_node(),
&protocol::NetworkHandler::NavigationRequestWillBeSent,
navigation_request);
}
Commit Message: [DevTo... | 0 | 143,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: static void __exit lz4_mod_fini(void)
{
crypto_unregister_alg(&alg_lz4);
}
Commit Message: crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so we never run
the risk of exposing module auto-loading to userspace via a crypto API,
as demonstrated by Mathias K... | 0 | 47,262 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int opfimul(RAsm *a, ut8 *data, const Opcode *op) {
int l = 0;
switch (op->operands_count) {
case 1:
if ( op->operands[0].type & OT_MEMORY ) {
if ( op->operands[0].type & OT_DWORD ) {
data[l++] = 0xda;
data[l++] = 0x08 | op->operands[0].regs[0];
} else if ( op->operands[0].type & OT_WORD... | 0 | 75,400 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: peek_user(struct task_struct *child, addr_t addr, addr_t data)
{
addr_t tmp, mask;
/*
* Stupid gdb peeks/pokes the access registers in 64 bit with
* an alignment of 4. Programmers from hell...
*/
mask = __ADDR_MASK;
#ifdef CONFIG_64BIT
if (addr >= (addr_t) &((struct user *) NULL)->regs.acrs &&
add... | 0 | 38,022 |
Analyze the following 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 base_audio_entry_dump(GF_AudioSampleEntryBox *p, FILE * trace)
{
fprintf(trace, " DataReferenceIndex=\"%d\" SampleRate=\"%d\"", p->dataReferenceIndex, p->samplerate_hi);
fprintf(trace, " Channels=\"%d\" BitsPerSample=\"%d\"", p->channel_count, p->bitspersample);
}
Commit Message: fixed 2 possible heap ove... | 0 | 80,690 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SecurityOrigin* DocumentThreadableLoader::getSecurityOrigin() const
{
return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOrigin();
}
Commit Message: DocumentThreadableLoader: Add guards for sync notifyFinished() in setResource()
In loadRequest(), setResource() can call clear() synchron... | 0 | 119,485 |
Analyze the following 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 pasp_dump(GF_Box *a, FILE * trace)
{
GF_PixelAspectRatioBox *ptr = (GF_PixelAspectRatioBox*)a;
gf_isom_box_dump_start(a, "PixelAspectRatioBox", trace);
fprintf(trace, "hSpacing=\"%d\" vSpacing=\"%d\" >\n", ptr->hSpacing, ptr->vSpacing);
gf_isom_box_dump_done("PixelAspectRatioBox", a, trace);
return GF... | 0 | 80,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: void AppListController::AppListClosing() {
FreeAnyKeepAliveForView();
current_view_ = NULL;
view_delegate_ = NULL;
SetProfile(NULL);
timer_.Stop();
}
Commit Message: Upgrade old app host to new app launcher on startup
This patch is a continuation of https://codereview.chromium.org/16805002/.
BUG=2488... | 0 | 113,605 |
Analyze the following 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 jbd2_journal_stop(handle_t *handle)
{
transaction_t *transaction = handle->h_transaction;
journal_t *journal = transaction->t_journal;
int err, wait_for_commit = 0;
tid_t tid;
pid_t pid;
J_ASSERT(journal_current_handle() == handle);
if (is_handle_aborted(handle))
err = -EIO;
else {
J_ASSERT(atom... | 0 | 24,391 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bgp_vpn_ip_print(netdissect_options *ndo,
const u_char *pptr, u_int addr_length)
{
/* worst case string is s fully formatted v6 address */
static char addr[sizeof("1234:5678:89ab:cdef:1234:5678:89ab:cdef")];
char *pos = addr;
switch(addr_length) {
case (sizeof(struct in_addr... | 0 | 62,252 |
Analyze the following 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 SoftMPEG4Encoder::initEncoder() {
CHECK(!mStarted);
OMX_ERRORTYPE errType = OMX_ErrorNone;
if (OMX_ErrorNone != (errType = initEncParams())) {
ALOGE("Failed to initialized encoder params");
mSignalledError = true;
notify(OMX_EventError, OMX_ErrorUndefined, 0, 0);
r... | 0 | 158,110 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg,
struct net_device *ndev,
const struct brcmf_event_msg *e)
{
struct brcmf_if *ifp = netdev_priv(ndev);
struct brcmf_cfg80211_profile *profile = &ifp->vif->profile;
struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
struct ... | 0 | 67,217 |
Analyze the following 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::OnFirstMeaningfulPaint() {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("renderer.scheduler"),
"RendererSchedulerImpl::OnFirstMeaningfulPaint");
base::AutoLock lock(any_thread_lock_);
any_thread().waiting_for_meaningful_paint = false;
UpdatePolicyLocked(UpdateType::kMa... | 0 | 143,438 |
Analyze the following 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::DrawRangeElements(GLenum mode,
GLuint start,
GLuint end,
GLsizei count,
GLenum type,
... | 0 | 140,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: static void prb_init_ft_ops(struct tpacket_kbdq_core *p1,
union tpacket_req_u *req_u)
{
p1->feature_req_word = req_u->req3.tp_feature_req_word;
}
Commit Message: net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namel... | 0 | 40,652 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ProcPolyArc(ClientPtr client)
{
int narcs;
GC *pGC;
DrawablePtr pDraw;
REQUEST(xPolyArcReq);
REQUEST_AT_LEAST_SIZE(xPolyArcReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
narcs = (client->req_len << 2) - sizeof(xPolyArcReq);
if (narcs % sizeof(xArc))
... | 0 | 14,999 |
Analyze the following 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 ExecuteInsertBacktab(LocalFrame& frame,
Event* event,
EditorCommandSource,
const String&) {
return TargetFrame(frame, event)
->GetEventHandler()
.HandleTextInputEvent("\t", event);
}
Commi... | 0 | 128,527 |
Analyze the following 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 hlist_head *rds_conn_bucket(__be32 laddr, __be32 faddr)
{
static u32 rds_hash_secret __read_mostly;
unsigned long hash;
net_get_random_once(&rds_hash_secret, sizeof(rds_hash_secret));
/* Pass NULL, don't need struct net for hash */
hash = __inet_ehashfn(be32_to_cpu(laddr), 0,
be32_t... | 0 | 41,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: static void tg3_write_indirect_mbox(struct tg3 *tp, u32 off, u32 val)
{
unsigned long flags;
if (off == (MAILBOX_RCVRET_CON_IDX_0 + TG3_64BIT_REG_LOW)) {
pci_write_config_dword(tp->pdev, TG3PCI_RCV_RET_RING_CON_IDX +
TG3_64BIT_REG_LOW, val);
return;
}
if (off == TG3_RX_STD_PROD_IDX_REG) {
pc... | 0 | 32,804 |
Analyze the following 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 StackDumpSignalHandler(int signal, siginfo_t* info, void* void_context) {
in_signal_handler = 1;
if (BeingDebugged())
BreakDebugger();
PrintToStderr("Received signal ");
char buf[1024] = { 0 };
internal::itoa_r(signal, buf, sizeof(buf), 10, 0);
PrintToStderr(buf);
if (signal == SIGBUS) {... | 1 | 171,162 |
Analyze the following 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 mov_read_stsc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
MOVStreamContext *sc;
unsigned int i, entries;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams-1];
sc = st->priv_data;
avio_r8(pb); /* version */
avio_rb24(pb... | 0 | 61,463 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool JSTestEventTarget::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
JSTestEventTarget* thisObject = jsCast<JSTestEventTarget*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
if (propertyName < static_cast<TestEventTarget*>(thisObject->i... | 0 | 101,108 |
Analyze the following 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 EVP_PKEY * php_openssl_generate_private_key(struct php_x509_request * req)
{
char * randfile = NULL;
int egdsocket, seeded;
EVP_PKEY * return_val = NULL;
if (req->priv_key_bits < MIN_KEY_LENGTH) {
php_error_docref(NULL, E_WARNING, "private key length is too short; it needs to be at least %d bits, no... | 0 | 4,557 |
Analyze the following 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_user_reserve(void)
{
unsigned long free_kbytes;
free_kbytes = global_zone_page_state(NR_FREE_PAGES) << (PAGE_SHIFT - 10);
sysctl_user_reserve_kbytes = min(free_kbytes / 32, 1UL << 17);
return 0;
}
Commit Message: coredump: fix race condition between mmget_not_zero()/get_task_mm() and core d... | 0 | 90,572 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: UNCURL_EXPORT int32_t uncurl_connect(struct uncurl_tls_ctx *uc_tls, struct uncurl_conn *ucc,
int32_t scheme, char *host, uint16_t port)
{
int32_t e;
ucc->host = strdup(host);
ucc->port = port;
char ip4[LEN_IP4];
e = net_getip4(ucc->host, ip4, LEN_IP4);
if (e != UNCURL_OK) return e;
e = net_connect(&ucc... | 0 | 84,324 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: fr_print(netdissect_options *ndo,
register const u_char *p, u_int length)
{
int ret;
uint16_t extracted_ethertype;
u_int dlci;
u_int addr_len;
uint16_t nlpid;
u_int hdr_len;
uint8_t flags[4];
ret = parse_q922_addr(ndo, p, &dlci, &addr_len, flags, length);
if (ret == -1)
goto trunc;
if (ret =... | 0 | 93,247 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: set_fflags(struct archive_write_disk *a)
{
struct fixup_entry *le;
unsigned long set, clear;
int r;
int critical_flags;
mode_t mode = archive_entry_mode(a->entry);
/*
* Make 'critical_flags' hold all file flags that can't be
* immediately restored. For example, on BSD systems,
* SF_IMMUTABLE prev... | 0 | 43,928 |
Analyze the following 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 SoftAVC::initEncoder() {
IV_STATUS_T status;
WORD32 level;
uint32_t displaySizeY;
CHECK(!mStarted);
OMX_ERRORTYPE errType = OMX_ErrorNone;
displaySizeY = mWidth * mHeight;
if (displaySizeY > (1920 * 1088)) {
level = 50;
} else if (displaySizeY > (1280 * 720)) {
... | 0 | 163,956 |
Analyze the following 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 RenderThreadImpl::OnMemoryPressure(
base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) {
base::allocator::ReleaseFreeMemory();
if (webkit_platform_support_ && blink::mainThreadIsolate()) {
blink::mainThreadIsolate()->LowMemoryNotification();
}
if (memory_pressure_level... | 0 | 126,750 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void provideLocalFileSystemTo(LocalFrame& frame, PassOwnPtr<FileSystemClient> client)
{
frame.provideSupplement(LocalFileSystem::supplementName(), LocalFileSystem::create(client));
}
Commit Message: Oilpan: Ship Oilpan for SyncCallbackHelper, CreateFileResult and CallbackWrapper in filesystem/
These are lef... | 0 | 115,467 |
Analyze the following 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 nfs4_layoutcommit_release(void *calldata)
{
struct nfs4_layoutcommit_data *data = calldata;
struct pnfs_layout_segment *lseg, *tmp;
unsigned long *bitlock = &NFS_I(data->args.inode)->flags;
pnfs_cleanup_layoutcommit(data);
/* Matched by references in pnfs_set_layoutcommit */
list_for_each_entry... | 0 | 19,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: void PPB_URLLoader_Impl::RunCallback(int32_t result) {
if (!pending_callback_.get()) {
CHECK(main_document_loader_);
return;
}
TrackedCallback::ClearAndRun(&pending_callback_, result);
}
Commit Message: Remove possibility of stale user_buffer_ member in PPB_URLLoader_Impl when FinishedLoading(... | 1 | 170,901 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PHP_FUNCTION(pg_get_result)
{
zval *pgsql_link;
int id = -1;
PGconn *pgsql;
PGresult *pgsql_result;
pgsql_result_handle *pg_result;
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "r", &pgsql_link) == FAILURE) {
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pg... | 0 | 14,762 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: rewrite_shorthand_url (const char *url)
{
const char *p;
char *ret;
if (url_scheme (url) != SCHEME_INVALID)
return NULL;
/* Look for a ':' or '/'. The former signifies NcFTP syntax, the
latter Netscape. */
p = strpbrk (url, ":/");
if (p == url)
return NULL;
/* If we're looking at "... | 0 | 8,692 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
int64_t offset = avio_tell(pb) + atom.size, pts;
uint8_t version;
unsigned i, track_id;
AVStream *st = NULL;
AVStream *ref_st = NULL;
MOVStreamContext *sc, *ref_sc = NULL;
MOVFragmentIndex *index = NULL;
MOVFr... | 0 | 61,457 |
Analyze the following 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 DownloadFileManager::CompleteDownload(DownloadId global_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
if (!ContainsKey(downloads_, global_id))
return;
DownloadFile* download_file = downloads_[global_id];
VLOG(20) << " " << __FUNCTION__ << "()"
<< " id = " << glo... | 1 | 170,876 |
Analyze the following 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 megasas_is_jbod(MegasasState *s)
{
return s->flags & MEGASAS_MASK_USE_JBOD;
}
Commit Message:
CWE ID: CWE-200 | 0 | 10,457 |
Analyze the following 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 ContainerNode::removeDetachedChildrenInContainer(ContainerNode& container)
{
Node* head = nullptr;
Node* tail = nullptr;
addChildNodesToDeletionQueue(head, tail, container);
Node* n;
Node* next;
while (head) {
n = head;
ASSERT_WITH_SECURITY_IMPLICATION(n->m_deletionH... | 0 | 125,102 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: new_device (u2fh_devs * devs)
{
struct u2fdevice *new = malloc (sizeof (struct u2fdevice));
if (new == NULL)
{
return NULL;
}
memset (new, 0, sizeof (struct u2fdevice));
new->id = devs->max_id++;
if (devs->first == NULL)
{
devs->first = new;
}
else
{
struct u2fdev... | 0 | 91,182 |
Analyze the following 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 IsGroupStored(const GURL& manifest_url) {
return mock_storage()->IsGroupForManifestStored(manifest_url);
}
Commit Message: Reland "AppCache: Add padding to cross-origin responses."
This is a reland of 85b389caa7d725cdd31f59e9a2b79ff54804b7b7
Initialized CacheRecord::padding_size to 0.
Original ch... | 0 | 151,313 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static inline int sock_recvfrom(php_netstream_data_t *sock, char *buf, size_t buflen, int flags,
zend_string **textaddr,
struct sockaddr **addr, socklen_t *addrlen
)
{
int ret;
int want_addr = textaddr || addr;
if (want_addr) {
php_sockaddr_storage sa;
socklen_t sl = sizeof(sa);
ret = recvfrom(soc... | 0 | 67,782 |
Analyze the following 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 CairoOutputDev::drawChar(GfxState *state, double x, double y,
double dx, double dy,
double originX, double originY,
CharCode code, int nBytes, Unicode *u, int uLen)
{
if (currentFont) {
glyphs[glyphCount].index = currentFont->getGlyph (code, u, uLen);
glyphs[glyphCount].x... | 0 | 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: bool set_pool(PgSocket *client, const char *dbname, const char *username, const char *password, bool takeover)
{
/* find database */
client->db = find_database(dbname);
if (!client->db) {
client->db = register_auto_database(dbname);
if (!client->db) {
disconnect_client(client, true, "No such database: %... | 0 | 74,110 |
Analyze the following 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::ClearLoginDelegateForRequest(
net::URLRequest* request) {
ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request);
if (info)
info->set_login_delegate(NULL);
}
Commit Message: Inherits SupportsWeakPtr<T> instead of having WeakPtrFactory<T>
This ch... | 0 | 107,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: entry_guard_chan_failed(channel_t *chan)
{
if (!chan)
return;
smartlist_t *pending = smartlist_new();
circuit_get_all_pending_on_channel(pending, chan);
SMARTLIST_FOREACH_BEGIN(pending, circuit_t *, circ) {
if (!CIRCUIT_IS_ORIGIN(circ))
continue;
origin_circuit_t *origin_circ = TO_ORIG... | 0 | 69,665 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ExtensionDevToolsClientHost::~ExtensionDevToolsClientHost() {
registrar_.RemoveAll();
if (infobar_) {
static_cast<ExtensionDevToolsInfoBarDelegate*>(
infobar_->delegate())->set_client_host(NULL);
InfoBarService* infobar_service = InfoBarService::FromWebContents(
WebContents::FromRende... | 0 | 120,636 |
Analyze the following 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::Value> GetOrCreateChrome(ScriptContext* context) {
v8::Local<v8::String> chrome_string(
v8::String::NewFromUtf8(context->isolate(), "chrome"));
v8::Local<v8::Object> global(context->v8_context()->Global());
v8::Local<v8::Value> chrome(global->Get(chrome_string));
if (chrome->IsUndefine... | 0 | 132,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: BluetoothSocketListenUsingL2capFunction::CreateResults() {
return bluetooth_socket::ListenUsingL2cap::Results::Create();
}
Commit Message: chrome.bluetoothSocket: Fix regression in send()
In https://crrev.com/c/997098, params_ was changed to a local variable,
but it needs to last longer than that since net::W... | 0 | 154,061 |
Analyze the following 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 LockScreenMediaControlsView::MediaControllerImageChanged(
media_session::mojom::MediaSessionImageType type,
const SkBitmap& bitmap) {
if (hide_controls_timer_->IsRunning())
return;
SkBitmap converted_bitmap;
if (bitmap.colorType() == kN32_SkColorType) {
converted_bitmap = bitmap;
} e... | 0 | 136,494 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int proc_dostring(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
return _proc_do_string(table->data, table->maxlen, write,
buffer, lenp, ppos);
}
Commit Message: sysctl: restrict write access to dmesg_restrict
When dmesg_restrict is set to 1 CAP_SYS_ADMIN i... | 0 | 24,431 |
Analyze the following 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 mnt_set_mountpoint(struct mount *mnt,
struct mountpoint *mp,
struct mount *child_mnt)
{
mp->m_count++;
mnt_add_count(mnt, 1); /* essentially, that's mntget */
child_mnt->mnt_mountpoint = dget(mp->m_dentry);
child_mnt->mnt_parent = mnt;
child_mnt->mnt_mp = mp;
hlist_add_head(&child_mnt->mnt_mp_lis... | 0 | 50,963 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int check_cond_jmp_op(struct bpf_verifier_env *env,
struct bpf_insn *insn, int *insn_idx)
{
struct bpf_verifier_state *this_branch = env->cur_state;
struct bpf_verifier_state *other_branch;
struct bpf_reg_state *regs = this_branch->frame[this_branch->curframe]->regs;
struct bpf_reg_state *dst_r... | 0 | 91,404 |
Analyze the following 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 jboolean Bitmap_hasAlpha(JNIEnv* env, jobject, jlong bitmapHandle) {
SkBitmap* bitmap = reinterpret_cast<SkBitmap*>(bitmapHandle);
return !bitmap->isOpaque() ? JNI_TRUE : JNI_FALSE;
}
Commit Message: Make Bitmap_createFromParcel check the color count. DO NOT MERGE
When reading from the parcel, if the n... | 0 | 157,638 |
Analyze the following 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 BrowserWindowGtk::OnMainWindowDestroy(GtkWidget* widget) {
extension_keybinding_registry_.reset();
MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&base::DeletePointer<BrowserWindowGtk>, this));
}
Commit Message: Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TE... | 0 | 117,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: void BackendIO::GetAvailableRange(EntryImpl* entry,
int64_t offset,
int len,
int64_t* start) {
operation_ = OP_GET_RANGE;
entry_ = entry;
offset64_ = offset;
buf_len_ = len;
start_ = start;
}
Commit Me... | 0 | 147,325 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int cpu_shares_write_u64(struct cgroup *cgrp, struct cftype *cftype,
u64 shareval)
{
return sched_group_set_shares(cgroup_tg(cgrp), scale_load(shareval));
}
Commit Message: perf: Remove the nmi parameter from the swevent and overflow interface
The nmi parameter indicated if we could do wakeups from ... | 0 | 26,273 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void SoftOpus::onPortFlushCompleted(OMX_U32 portIndex) {
if (portIndex == 0 && mDecoder != NULL) {
mNumFramesOutput = 0;
opus_multistream_decoder_ctl(mDecoder, OPUS_RESET_STATE);
mAnchorTimeUs = 0;
mSamplesToDiscard = mSeekPreRoll;
}
}
Commit Message: DO NOT MERGE codecs: check ... | 0 | 160,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: bool LookupMatchInTopDomains(base::StringPiece skeleton) {
DCHECK_NE(skeleton.back(), '.');
auto labels = base::SplitStringPiece(skeleton, ".", base::KEEP_WHITESPACE,
base::SPLIT_WANT_ALL);
if (labels.size() > kNumberOfLabelsToCheck) {
labels.erase(labels.begin(),... | 0 | 148,240 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int set_reg_profile(RAnal *anal) {
char *p =
"=PC pc\n"
"=SP sp\n"
"gpr a .8 0 0\n"
"gpr x .8 1 0\n"
"gpr y .8 2 0\n"
"gpr flags .8 3 0\n"
"gpr C .1 .24 0\n"
"gpr Z .1 .25 0\n"
"gpr I .1 .26 0\n"
"gpr D .1 .27 0\n"
"gpr V .1 .30 0\n"
"gpr N .1 .31 0\n"
"gpr sp .8 4 0\n"
"gpr p... | 0 | 82,005 |
Analyze the following 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 nntp_post(const char *msg)
{
struct NntpData *nntp_data, nntp_tmp;
char buf[LONG_STRING];
if (Context && Context->magic == MUTT_NNTP)
nntp_data = Context->data;
else
{
CurrentNewsSrv = nntp_select_server(NewsServer, false);
if (!CurrentNewsSrv)
return -1;
nntp_data = &nntp_tm... | 0 | 79,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: static void fpm_child_link(struct fpm_child_s *child) /* {{{ */
{
struct fpm_worker_pool_s *wp = child->wp;
++wp->running_children;
++fpm_globals.running_children;
child->next = wp->children;
if (child->next) {
child->next->prev = child;
}
child->prev = 0;
wp->children = child;
}
/* }}} */
Commit Mes... | 0 | 86,607 |
Analyze the following 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 free_thread_slot(int h)
{
if(0 <= h && h < MAX_THREAD)
{
close_cmd_fd(h);
ts[h].used = 0;
}
else APPL_TRACE_ERROR("invalid thread handle:%d", h);
}
Commit Message: DO NOT MERGE Fix potential DoS caused by delivering signal to BT process
Bug: 28885210
Change-Id: I63866d894bfca4746... | 0 | 158,907 |
Analyze the following 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 SetLengthImpl(Isolate* isolate, Handle<JSArray> array,
uint32_t length,
Handle<FixedArrayBase> backing_store) {
Handle<SeededNumberDictionary> dict =
Handle<SeededNumberDictionary>::cast(backing_store);
int capacity = dict->Capacity();
uint32_t old_length = 0;
CHECK(array->length()->ToArray... | 0 | 163,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: void WebContentsImpl::Redo() {
RenderFrameHost* focused_frame = GetFocusedFrame();
if (!focused_frame)
return;
focused_frame->GetFrameInputHandler()->Redo();
RecordAction(base::UserMetricsAction("Redo"));
}
Commit Message: If JavaScript shows a dialog, cause the page to lose fullscreen.
BUG=670135, ... | 0 | 135,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 ext4_init_journal_params(struct super_block *sb, journal_t *journal)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
journal->j_commit_interval = sbi->s_commit_interval;
journal->j_min_batch_time = sbi->s_min_batch_time;
journal->j_max_batch_time = sbi->s_max_batch_time;
spin_lock(&journal->j_state_l... | 0 | 57,572 |
Analyze the following 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 V8TestObject::StringFrozenArrayAttributeAttributeSetterCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_stringFrozenArrayAttribute_Setter");
v8::Local<v8::Value> v8_value = info[0];
test_object_v8_intern... | 0 | 135,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 long __snd_timer_user_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
struct snd_timer_user *tu;
void __user *argp = (void __user *)arg;
int __user *p = argp;
tu = file->private_data;
switch (cmd) {
case SNDRV_TIMER_IOCTL_PVERSION:
return put_user(SNDRV_TIMER_VERSION, p) ? -EF... | 0 | 52,680 |
Analyze the following 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 vnc_abort_display_jobs(VncDisplay *vd)
{
VncState *vs;
QTAILQ_FOREACH(vs, &vd->clients, next) {
vnc_lock_output(vs);
vs->abort = true;
vnc_unlock_output(vs);
}
QTAILQ_FOREACH(vs, &vd->clients, next) {
vnc_jobs_join(vs);
}
QTAILQ_FOREACH(vs, &vd-... | 0 | 7,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: static void label_destroy(struct pxe_label *label)
{
if (label->name)
free(label->name);
if (label->kernel)
free(label->kernel);
if (label->config)
free(label->config);
if (label->append)
free(label->append);
if (label->initrd)
free(label->initrd);
if (label->fdt)
free(label->fdt);
if (la... | 0 | 89,343 |
Analyze the following 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 GetDataSaverEnabledPref(const PrefService* prefs) {
return prefs->GetBoolean(prefs::kDataSaverEnabled) &&
base::FieldTrialList::FindFullName("SaveDataHeader")
.compare("Disabled");
}
Commit Message: [GuestView] - Introduce MimeHandlerViewAttachHelper
This CL is for the most part a m... | 0 | 152,375 |
Analyze the following 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 x509_crt_parse_der_core( mbedtls_x509_crt *crt, const unsigned char *buf,
size_t buflen )
{
int ret;
size_t len;
unsigned char *p, *end, *crt_end;
mbedtls_x509_buf sig_params1, sig_params2, sig_oid2;
memset( &sig_params1, 0, sizeof( mbedtls_x509_... | 0 | 61,925 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GLboolean WebGLRenderingContextBase::isRenderbuffer(
WebGLRenderbuffer* renderbuffer) {
if (!renderbuffer || isContextLost())
return 0;
if (!renderbuffer->HasEverBeenBound())
return 0;
if (renderbuffer->IsDeleted())
return 0;
return ContextGL()->IsRenderbuffer(renderbuffer->Object()... | 1 | 173,131 |
Analyze the following 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 tims_Size(GF_Box *s)
{
s->size += 4;
return GF_OK;
}
Commit Message: fixed 2 possible heap overflows (inc. #1088)
CWE ID: CWE-125 | 0 | 80,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 MockDownloadController::AcquireFileAccessPermission(
content::WebContents* web_contents,
const DownloadControllerBase::AcquireFileAccessPermissionCallback& cb) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(cb, approve_file_access_request_));
}
Commit Message: Clean u... | 0 | 126,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: static void fb_set_logo(struct fb_info *info,
const struct linux_logo *logo, u8 *dst,
int depth)
{
int i, j, k;
const u8 *src = logo->data;
u8 xor = (info->fix.visual == FB_VISUAL_MONO01) ? 0xff : 0;
u8 fg = 1, d;
switch (fb_get_color_depth(&info->var, &info->fix)) {
case 1:
fg = 1;
... | 0 | 31,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 stringArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjectPythonV8Internal::stringArrayAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Executi... | 0 | 122,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: bool PaintLayerScrollableArea::HitTestResizerInFragments(
const PaintLayerFragments& layer_fragments,
const HitTestLocation& hit_test_location) const {
if (!GetLayoutBox()->CanResize())
return false;
if (layer_fragments.IsEmpty())
return false;
for (int i = layer_fragments.size() - 1; i >=... | 0 | 130,058 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void Ins_DELTAP( INS_ARG )
{
Int k;
Long A, B, C, nump;
nump = args[0];
for ( k = 1; k <= nump; k++ )
{
if ( CUR.args < 2 )
{
CUR.error = TT_Err_Too_Few_Arguments;
return;
}
CUR.args -= 2;
A = CUR.stack[CUR.args + 1];
B = C... | 0 | 5,372 |
Analyze the following 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 V8TestObject::PerWorldBindingsRuntimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_perWorldBindingsRuntimeEnabledVoidMethod");
test_object_v8_internal::PerWorldBindingsRuntimeEnabledVoi... | 0 | 135,014 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: nextScaffoldPart(XML_Parser parser) {
DTD *const dtd = parser->m_dtd; /* save one level of indirection */
CONTENT_SCAFFOLD *me;
int next;
if (! dtd->scaffIndex) {
dtd->scaffIndex = (int *)MALLOC(parser, parser->m_groupSize * sizeof(int));
if (! dtd->scaffIndex)
return -1;
dtd->scaffInde... | 0 | 88,286 |
Analyze the following 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 account_numa_dequeue(struct rq *rq, struct task_struct *p)
{
}
Commit Message: sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time f... | 0 | 92,455 |
Analyze the following 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 LayerTreeHostImpl::SetContentIsSuitableForGpuRasterization(bool flag) {
if (content_is_suitable_for_gpu_rasterization_ != flag) {
content_is_suitable_for_gpu_rasterization_ = flag;
need_update_gpu_rasterization_status_ = true;
}
}
Commit Message: (Reland) Discard compositor frames from unloaded ... | 0 | 137,352 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: InterstitialObserver(Browser* browser, content::WebContents* web_contents)
: WebContentsObserver(web_contents),
browser_(browser) {
}
Commit Message: Don't focus the location bar for NTP navigations in non-selected tabs.
BUG=677716
TEST=See bug for repro steps.
Review-Url: https://codereview.... | 0 | 139,013 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: mrb_io_s_pipe(mrb_state *mrb, mrb_value klass)
{
mrb_value r = mrb_nil_value();
mrb_value w = mrb_nil_value();
struct mrb_io *fptr_r;
struct mrb_io *fptr_w;
int pipes[2];
if (mrb_pipe(mrb, pipes) == -1) {
mrb_sys_fail(mrb, "pipe");
}
r = mrb_obj_value(mrb_data_object_alloc(mrb, mrb_class_ptr... | 0 | 83,151 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.