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 set_attributes(char *pathname, int mode, uid_t uid, gid_t guid, time_t time,
unsigned int xattr, unsigned int set_mode)
{
struct utimbuf times = { time, time };
if(utime(pathname, ×) == -1) {
ERROR("set_attributes: failed to set time on %s, because %s\n",
pathname, strerror(errno));
return FAL... | 0 | 74,303 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void V8Console::valuesCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Isolate* isolate = info.GetIsolate();
info.GetReturnValue().Set(v8::Array::New(isolate));
ConsoleHelper helper(info);
v8::Local<v8::Object> obj;
if (!helper.firstArgAsObject().ToLocal(&obj))
return;
... | 0 | 130,346 |
Analyze the following 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 M_bool M_fs_isfileintodir(const char *p1, const char *p2, char **new_p2)
{
M_fs_info_t *info1 = NULL;
M_fs_info_t *info2 = NULL;
char *bname;
M_bool file_info_dir = M_FALSE;
if (M_str_isempty(p1) || M_str_isempty(p2) || new_p2 == NULL)
return M_FALSE;
if (M_fs_info(&i... | 0 | 79,635 |
Analyze the following 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 HTMLInputElement::setWidth(unsigned width)
{
setUnsignedIntegralAttribute(widthAttr, width);
}
Commit Message: Add HTMLFormControlElement::supportsAutofocus to fix a FIXME comment.
This virtual function should return true if the form control can hanlde
'autofocucs' attribute if it is specified.
Note: ... | 0 | 114,017 |
Analyze the following 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 xfrm_dump_sa_done(struct netlink_callback *cb)
{
struct xfrm_state_walk *walk = (struct xfrm_state_walk *) &cb->args[1];
xfrm_state_walk_done(walk);
return 0;
}
Commit Message: xfrm_user: return error pointer instead of NULL
When dump_one_state() returns an error, e.g. because of a too small
buffe... | 0 | 33,146 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
unsigned long debugctlmsr, cr4;
/* Record the guest's net vcpu time for enforced NMI injections. */
if (unlikely(!cpu_has_virtual_nmis() && vmx->soft_vnmi_blocked))
vmx->entry_time = ktime_get();
/* Don't ent... | 0 | 37,379 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void kvm_multiple_exception(struct kvm_vcpu *vcpu,
unsigned nr, bool has_error, u32 error_code,
bool reinject)
{
u32 prev_nr;
int class1, class2;
kvm_make_request(KVM_REQ_EVENT, vcpu);
if (!vcpu->arch.exception.pending) {
queue:
vcpu->arch.exception.pending = true;
vcpu->arch.exception.has_e... | 0 | 20,794 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: jpc_pchg_t *jpc_pchglist_get(jpc_pchglist_t *pchglist, int pchgno)
{
return pchglist->pchgs[pchgno];
}
Commit Message: Fixed an integer overflow problem in the JPC codec that later resulted
in the use of uninitialized data.
CWE ID: CWE-190 | 0 | 70,354 |
Analyze the following 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_zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in,
size_t insize, const LodePNGCompressSettings* settings)
{
/*initially, *out must be NULL and outsize 0, if you just give some random *out
that's pointing to a non allocated buffer, this... | 0 | 87,574 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int iwgif_read_color_table(struct iwgifrcontext *rctx, struct iw_palette *ct)
{
int i;
if(ct->num_entries<1) return 1;
if(!iwgif_read(rctx,rctx->rbuf,3*ct->num_entries)) return 0;
for(i=0;i<ct->num_entries;i++) {
ct->entry[i].r = rctx->rbuf[3*i+0];
ct->entry[i].g = rctx->rbuf[3*i+1];
ct->entry[i... | 0 | 66,794 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool GLES2DecoderImpl::ValidateCompressedTexDimensions(
const char* function_name,
GLint level, GLsizei width, GLsizei height, GLenum format) {
switch (format) {
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
case GL_CO... | 0 | 121,047 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: DocumentLoader* FrameLoader::CreateDocumentLoader(
const ResourceRequest& request,
const FrameLoadRequest& frame_load_request,
FrameLoadType load_type,
NavigationType navigation_type) {
DocumentLoader* loader = Client()->CreateDocumentLoader(
frame_, request,
frame_load_request.GetSu... | 0 | 125,781 |
Analyze the following 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_process_param(struct sctp_association *asoc,
union sctp_params param,
const union sctp_addr *peer_addr,
gfp_t gfp)
{
struct net *net = sock_net(asoc->base.sk);
union sctp_addr addr;
int i;
__u16 sat;
int retval = 1;
sctp_scope_t scope;
time_t stale;
struct sctp_a... | 1 | 166,253 |
Analyze the following 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::RequestToLockMouse(bool user_gesture,
bool last_unlocked_by_target) {
if (delegate_) {
delegate_->RequestToLockMouse(this, user_gesture, last_unlocked_by_target);
} else {
GotResponseToLockMouseRequest(false);
}
}
Commit Message: Cancel... | 0 | 110,765 |
Analyze the following 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 number_of_callbacks() const { return number_of_callbacks_; }
Commit Message: TopSites: Clear thumbnails from the cache when their URLs get removed
We already cleared the thumbnails from persistent storage, but they
remained in the in-memory cache, so they remained accessible (until the
next Chrome restart... | 0 | 147,134 |
Analyze the following 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 audit_arch(void)
{
int arch = EM_SH;
#ifdef CONFIG_CPU_LITTLE_ENDIAN
arch |= __AUDIT_ARCH_LE;
#endif
return arch;
}
Commit Message: perf: Remove the nmi parameter from the swevent and overflow interface
The nmi parameter indicated if we could do wakeups from the current
context, if not, w... | 0 | 25,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: ssh_packet_write_wait(struct ssh *ssh)
{
fd_set *setp;
int ret, r, ms_remain = 0;
struct timeval start, timeout, *timeoutp = NULL;
struct session_state *state = ssh->state;
setp = calloc(howmany(state->connection_out + 1,
NFDBITS), sizeof(fd_mask));
if (setp == NULL)
return SSH_ERR_ALLOC_FAIL;
if (... | 0 | 72,204 |
Analyze the following 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 DeprecateAsSameValueMeasureAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
ExceptionState exception_state(info.GetIsolate(), ExceptionState::kExecutionContext, "TestObject", "deprecateAsSameValueMeasureAsOverloadedMethod");
TestObject* impl = V8TestObject::ToImpl(info... | 0 | 134,651 |
Analyze the following 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 get_camera_metadata_entry_capacity(const camera_metadata_t *metadata) {
return metadata->entry_capacity;
}
Commit Message: Camera: Prevent data size overflow
Add a function to check overflow when calculating metadata
data size.
Bug: 30741779
Change-Id: I6405fe608567a4f4113674050f826f305ecae030
CWE ID:... | 0 | 157,934 |
Analyze the following 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 OPJ_BOOL opj_pi_check_next_level(OPJ_INT32 pos,
opj_cp_t *cp,
OPJ_UINT32 tileno,
OPJ_UINT32 pino,
const OPJ_CHAR *prog)
{
OPJ_INT32 i;
opj_... | 0 | 70,095 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: vrrp_group_track_bfd_handler(vector_t *strvec)
{
alloc_value_block(alloc_vrrp_group_track_bfd, vector_slot(strvec, 0));
}
Commit Message: When opening files for write, ensure they aren't symbolic links
Issue #1048 identified that if, for example, a non privileged user
created a symbolic link from /etc/keepalvi... | 0 | 76,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: error::Error GLES2DecoderImpl::HandleGetActiveAttrib(
uint32_t immediate_data_size,
const volatile void* cmd_data) {
const volatile gles2::cmds::GetActiveAttrib& c =
*static_cast<const volatile gles2::cmds::GetActiveAttrib*>(cmd_data);
GLuint program_id = c.program;
GLuint index = c.index;
u... | 0 | 141,531 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: TypingCommand* Editor::LastTypingCommandIfStillOpenForTyping() const {
return TypingCommand::LastTypingCommandIfStillOpenForTyping(&GetFrame());
}
Commit Message: Move SelectionTemplate::is_handle_visible_ to FrameSelection
This patch moves |is_handle_visible_| to |FrameSelection| from |SelectionTemplate|
sin... | 0 | 124,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: configure_env(char **env, const char *prefix, const struct dhcp_message *dhcp,
const struct if_options *ifo)
{
unsigned int i;
const uint8_t *p;
int pl;
struct in_addr addr;
struct in_addr net;
struct in_addr brd;
char *val, *v;
const struct dhcp_opt *opt;
ssize_t len, e = 0;
char **ep;
char cidr[4];
... | 0 | 161,347 |
Analyze the following 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 out_flush_domain_queues(s2s_t s2s, const char *domain) {
char *rkey;
int rkeylen;
char *c;
int c_len;
if (xhash_iter_first(s2s->outq)) {
do {
xhash_iter_get(s2s->outq, (const char **) &rkey, &rkeylen, NULL);
c = memchr(rkey, '/', rkeylen);
c++;
c_len =... | 0 | 19,194 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: base::Time MockNetworkLayer::Now() {
if (clock_)
return clock_->Now();
return base::Time::Now();
}
Commit Message: Replace fixed string uses of AddHeaderFromString
Uses of AddHeaderFromString() with a static string may as well be
replaced with SetHeader(). Do so.
BUG=None
Review-Url: https://coderevie... | 0 | 119,335 |
Analyze the following 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 M_fs_path_get_path_max(M_fs_system_t sys_type)
{
long path_max = 0;
/* Set some defaults based on the system type in case the path length isn't
* actually defined anywhere. */
sys_type = M_fs_path_get_system_type(sys_type);
/* Try to determine the path length */
#ifdef PATH_MAX
path_max = PATH_MAX... | 0 | 79,641 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void WebPage::clearNeverRememberSites()
{
#if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST)
if (d->m_webSettings->isCredentialAutofillEnabled())
credentialManager().clearNeverRememberSites();
#endif
}
Commit Message: [BlackBerry] Adapt to new BlackBerry::Platform::TouchPoint API
https://bugs.webkit.org/show_... | 0 | 104,143 |
Analyze the following 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 SplashOutputDev::endType3Char(GfxState *state) {
T3GlyphStack *t3gs;
double *ctm;
if (t3GlyphStack->cacheTag) {
memcpy(t3GlyphStack->cacheData, bitmap->getDataPtr(),
t3GlyphStack->cache->glyphSize);
delete bitmap;
delete splash;
bitmap = t3GlyphStack->origBitmap;
splash = t3Gly... | 0 | 839 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SAPI_API void sapi_activate_headers_only(TSRMLS_D)
{
if (SG(request_info).headers_read == 1)
return;
SG(request_info).headers_read = 1;
zend_llist_init(&SG(sapi_headers).headers, sizeof(sapi_header_struct),
(void (*)(void *)) sapi_free_header, 0);
SG(sapi_headers).send_default_content_type = 1;
/* SG(... | 0 | 56,264 |
Analyze the following 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 CredentialManagerImpl::IsZeroClickAllowed() const {
return *auto_signin_enabled_ && !client_->IsIncognito();
}
Commit Message: Fix Credential Management API Store() for existing Credentials
This changes fixes the Credential Management API to correctly handle
storing of already existing credentials. In th... | 0 | 155,809 |
Analyze the following 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 sinf_dump(GF_Box *a, FILE * trace)
{
GF_ProtectionSchemeInfoBox *p;
p = (GF_ProtectionSchemeInfoBox *)a;
gf_isom_box_dump_start(a, "ProtectionSchemeInfoBox", trace);
fprintf(trace, ">\n");
if (p->size)
gf_isom_box_dump_ex(p->original_format, trace, GF_ISOM_BOX_TYPE_FRMA);
if (p->size)
gf_isom_box... | 0 | 80,843 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void migration_end(void)
{
if (migration_bitmap) {
memory_global_dirty_log_stop();
g_free(migration_bitmap);
migration_bitmap = NULL;
}
XBZRLE_cache_lock();
if (XBZRLE.cache) {
cache_fini(XBZRLE.cache);
g_free(XBZRLE.encoded_buf);
g_free(XBZR... | 0 | 7,854 |
Analyze the following 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 const char *set_limit_xml_req_body(cmd_parms *cmd, void *conf_,
const char *arg)
{
core_dir_config *conf = conf_;
conf->limit_xml_body = atol(arg);
if (conf->limit_xml_body < 0)
return "LimitXMLRequestBody requires a non-negative integer.";
... | 0 | 64,296 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int ssl_scan_clienthello_tlsext(SSL *s, PACKET *pkt, int *al)
{
unsigned int type;
int renegotiate_seen = 0;
PACKET extensions;
*al = SSL_AD_DECODE_ERROR;
s->servername_done = 0;
s->tlsext_status_type = -1;
#ifndef OPENSSL_NO_NEXTPROTONEG
s->s3->next_proto_neg_seen = 0;
#endif
... | 1 | 168,428 |
Analyze the following 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 stco_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
u32 i;
GF_ChunkOffsetBox *ptr = (GF_ChunkOffsetBox *)s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u32(bs, ptr->nb_entries);
for (i = 0; i < ptr->nb_entries; i++) {
gf_bs_write_u32(bs, ptr->offsets[i]);
}
return GF_OK;
}
C... | 0 | 80,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: TabsCaptureVisibleTabFunction::TabsCaptureVisibleTabFunction()
: chrome_details_(this) {
}
Commit Message: Call CanCaptureVisiblePage in page capture API.
Currently the pageCapture permission allows access
to arbitrary local files and chrome:// pages which
can be a security concern. In order to address this... | 0 | 151,540 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: LayoutObject* HTMLCanvasElement::CreateLayoutObject(
const ComputedStyle& style) {
LocalFrame* frame = GetDocument().GetFrame();
if (frame && GetDocument().CanExecuteScripts(kNotAboutToExecuteScript))
return new LayoutHTMLCanvas(this);
return HTMLElement::CreateLayoutObject(style);
}
Commit Message... | 0 | 152,065 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int find_real_tpr_addr(VAPICROMState *s, CPUX86State *env)
{
CPUState *cs = CPU(x86_env_get_cpu(env));
hwaddr paddr;
target_ulong addr;
if (s->state == VAPIC_ACTIVE) {
return 0;
}
/*
* If there is no prior TPR access instruction we could analyze (which is
* the ca... | 0 | 11,250 |
Analyze the following 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 hashciedefspace(i_ctx_t *i_ctx_p, ref *space, gs_md5_state_t *md5)
{
int code = 0;
ref CIEdict1, spacename;
code = array_get(imemory, space, 0, &spacename);
if (code < 0)
return 0;
gs_md5_append(md5, (const gs_md5_byte_t *)&spacename.value.pname, sizeof(spacename.value.pnam... | 0 | 3,091 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: NavigationPolicy LocalFrameClientImpl::DecidePolicyForNavigation(
const ResourceRequest& request,
Document* origin_document,
DocumentLoader* document_loader,
WebNavigationType type,
NavigationPolicy policy,
bool replaces_current_history_item,
bool is_client_redirect,
WebTriggeringE... | 0 | 145,222 |
Analyze the following 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 LevelizeImage(Image *image,
const double black_point,const double white_point,const double gamma,
ExceptionInfo *exception)
{
#define LevelizeImageTag "Levelize/Image"
#define LevelizeValue(x) ClampToQuantum(((MagickRealType) gamma_pow((double) \
(QuantumScale*(x)),gamma))*(w... | 0 | 89,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: void DownloadItemImpl::DestinationCompleted(
int64_t total_bytes,
std::unique_ptr<crypto::SecureHash> secure_hash) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(state_ == TARGET_PENDING_INTERNAL || state_ == IN_PROGRESS_INTERNAL);
DVLOG(20) << __func__ << "() download=" << DebugString(true);
O... | 0 | 146,290 |
Analyze the following 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 ssize_t ucma_disconnect(struct ucma_file *file, const char __user *inbuf,
int in_len, int out_len)
{
struct rdma_ucm_disconnect cmd;
struct ucma_context *ctx;
int ret;
if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
return -EFAULT;
ctx = ucma_get_ctx(file, cmd.id);
if (IS_ERR(ctx))
retu... | 0 | 52,843 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void FS_SortFileList( char **filelist, int numfiles ) {
int i, j, k, numsortedfiles;
char **sortedlist;
sortedlist = Z_Malloc( ( numfiles + 1 ) * sizeof( *sortedlist ) );
sortedlist[0] = NULL;
numsortedfiles = 0;
for ( i = 0; i < numfiles; i++ ) {
for ( j = 0; j < numsortedfiles; j++ ) {
if ( FS_PathC... | 0 | 95,834 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: nscroll(int n, int mode)
{
Buffer *buf = Currentbuf;
Line *top = buf->topLine, *cur = buf->currentLine;
int lnum, tlnum, llnum, diff_n;
if (buf->firstLine == NULL)
return;
lnum = cur->linenumber;
buf->topLine = lineSkip(buf, top, n, FALSE);
if (buf->topLine == top) {
lnum += n;
if ... | 0 | 84,523 |
Analyze the following 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 FS_ReturnPath( const char *zname, char *zpath, int *depth ) {
int len, at, newdep;
newdep = 0;
zpath[0] = 0;
len = 0;
at = 0;
while(zname[at] != 0)
{
if (zname[at]=='/' || zname[at]=='\\') {
len = at;
newdep++;
}
at++;
}
strcpy(zpath, zname);
zpath[len] = 0;
*depth = newdep;
... | 0 | 96,057 |
Analyze the following 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_layoutget_done(struct rpc_task *task, void *calldata)
{
struct nfs4_layoutget *lgp = calldata;
struct nfs_server *server = NFS_SERVER(lgp->args.inode);
dprintk("--> %s\n", __func__);
if (!nfs4_sequence_done(task, &lgp->res.seq_res))
return;
switch (task->tk_status) {
case 0:
break;
... | 0 | 19,923 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: fst_init_dma(struct fst_card_info *card)
{
/*
* This is only required for the PLX 9054
*/
if (card->family == FST_FAMILY_TXU) {
pci_set_master(card->device);
outl(0x00020441, card->pci_conf + DMAMODE0);
outl(0x00020441, card->pci_conf + DMAMODE1);
outl(0x0, card->pci_conf + DMATHR);
}
}
Com... | 0 | 39,517 |
Analyze the following 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 aio_read_events_ring(struct kioctx *ctx,
struct io_event __user *event, long nr)
{
struct aio_ring *ring;
unsigned head, tail, pos;
long ret = 0;
int copy_ret;
mutex_lock(&ctx->ring_lock);
/* Access to ->ring_pages here is protected by ctx->ring_lock. */
ring = kmap_atomic(ctx->ring_page... | 0 | 56,718 |
Analyze the following 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::BindFragDataLocationIndexedEXT(GLuint program,
GLuint colorName,
GLuint index,
const char* name) {
GPU_CLIENT_SINGL... | 0 | 140,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: void RenderViewImpl::SetBackgroundOpaqueForWidget(bool opaque) {
if (!frame_widget_)
return;
if (opaque) {
frame_widget_->ClearBaseBackgroundColorOverride();
frame_widget_->ClearBackgroundColorOverride();
} else {
frame_widget_->SetBaseBackgroundColorOverride(SK_ColorTRANSPARENT);
frame... | 0 | 145,168 |
Analyze the following 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 V4L2JpegEncodeAccelerator::EncodedInstanceDmaBuf::DestroyTask() {
DCHECK(parent_->encoder_task_runner_->BelongsToCurrentThread());
while (!input_job_queue_.empty())
input_job_queue_.pop();
while (!running_job_queue_.empty())
running_job_queue_.pop();
DestroyInputBuffers();
DestroyOutputBuf... | 0 | 136,020 |
Analyze the following 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 isdn_net_softint(struct work_struct *work)
{
isdn_net_local *lp = container_of(work, isdn_net_local, tqueue);
struct sk_buff *skb;
spin_lock_bh(&lp->xmit_lock);
while (!isdn_net_lp_busy(lp)) {
skb = skb_dequeue(&lp->super_tx_queue);
if (!skb)
break;
isdn_net_writebuf_skb(lp, skb); ... | 0 | 23,667 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask)
{
Mask check;
OtherClients *others;
DeviceIntPtr dev;
int rc;
if (mask & ~AllEventMasks) {
client->errorValue = mask;
return BadValue;
}
check = (mask & ManagerMask);
if (check) {
rc = XaceHo... | 0 | 4,828 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GLES2DecoderPassthroughImpl::EmulatedColorBuffer::EmulatedColorBuffer(
gl::GLApi* api,
const EmulatedDefaultFramebufferFormat& format_in)
: api(api), format(format_in) {
ScopedTexture2DBindingReset scoped_texture_reset(api);
GLuint color_buffer_texture = 0;
api->glGenTexturesFn(1, &color_buffer... | 0 | 141,748 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void PrintWebViewHelper::PrintPreviewContext::InitWithNode(
const WebKit::WebNode& web_node) {
DCHECK(!web_node.isNull());
state_ = INITIALIZED;
frame_ = web_node.document().frame();
node_.reset(new WebNode(web_node));
}
Commit Message: Fix print preview workflow to reflect settings of selected print... | 0 | 97,522 |
Analyze the following 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 dnxhd_find_frame_end(DNXHDParserContext *dctx,
const uint8_t *buf, int buf_size)
{
ParseContext *pc = &dctx->pc;
uint64_t state = pc->state64;
int pic_found = pc->frame_start_found;
int i = 0;
int interlaced = dctx->interlaced;
int cur_field = dct... | 1 | 168,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: PassRefPtr<SerializedScriptValue> SerializedScriptValue::create(const ScriptValue& value, WebBlobInfoArray* blobInfo, ExceptionState& exceptionState, v8::Isolate* isolate)
{
ASSERT(isolate->InContext());
return adoptRef(new SerializedScriptValue(value.v8Value(), 0, 0, blobInfo, exceptionState, isolate));
... | 0 | 120,442 |
Analyze the following 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 UDPSocketWin::SendToOrWrite(IOBuffer* buf,
int buf_len,
const IPEndPoint* address,
const CompletionCallback& callback) {
DCHECK(CalledOnValidThread());
DCHECK_NE(INVALID_SOCKET, socket_);
DCHECK(write_callbac... | 0 | 113,458 |
Analyze the following 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 OxideQQuickWebView::canGoBack() const {
Q_D(const OxideQQuickWebView);
if (!d->proxy_) {
return false;
}
return d->proxy_->canGoBack();
}
Commit Message:
CWE ID: CWE-20 | 0 | 17,070 |
Analyze the following 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 sched_cpu_inactive(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
unsigned long flags;
long cpu = (long)hcpu;
switch (action & ~CPU_TASKS_FROZEN) {
case CPU_DOWN_PREPARE:
set_cpu_active(cpu, false);
/* explicitly allow suspend */
if (!(action & CPU_TASKS_FROZEN)) {
... | 0 | 58,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: static __be16 sctp_process_asconf_param(struct sctp_association *asoc,
struct sctp_chunk *asconf,
sctp_addip_param_t *asconf_param)
{
struct sctp_transport *peer;
struct sctp_af *af;
union sctp_addr addr;
union sctp_addr_param *addr_param;
addr_param = (void *)asconf_param + sizeof(sct... | 0 | 37,368 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: media::VideoCaptureDeviceInfo* VideoCaptureManager::GetDeviceInfoById(
const std::string& id) {
for (auto& it : devices_info_cache_) {
if (it.descriptor.device_id == id)
return ⁢
}
return nullptr;
}
Commit Message: Make MediaStreamDispatcherHost per-request instead of per-frame.
Instead o... | 0 | 153,233 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SetDefaultConnectionService(struct upnphttp * h, const char * action, const char * ns)
{
/*static const char resp[] =
"<u:SetDefaultConnectionServiceResponse "
"xmlns:u=\"urn:schemas-upnp-org:service:Layer3Forwarding:1\">"
"</u:SetDefaultConnectionServiceResponse>";*/
static const char resp[] =
"<u:%sRe... | 0 | 89,877 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GF_Err cslg_dump(GF_Box *a, FILE * trace)
{
GF_CompositionToDecodeBox *p;
p = (GF_CompositionToDecodeBox *)a;
gf_isom_box_dump_start(a, "CompositionToDecodeBox", trace);
fprintf(trace, "compositionToDTSShift=\"%d\" leastDecodeToDisplayDelta=\"%d\" compositionStartTime=\"%d\" compositionEndTime=\"%d\">\n", p-... | 0 | 80,701 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void TIFFWarnings(const char *module,const char *format,va_list warning)
{
char
message[MaxTextExtent];
ExceptionInfo
*exception;
#if defined(MAGICKCORE_HAVE_VSNPRINTF)
(void) vsnprintf(message,MaxTextExtent,format,warning);
#else
(void) vsprintf(message,format,warning);
#endif
(void) C... | 0 | 69,087 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GfxTilingPattern::~GfxTilingPattern() {
resDict.free();
contentStream.free();
}
Commit Message:
CWE ID: CWE-189 | 0 | 1,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 int sysvipc_proc_show(struct seq_file *s, void *it)
{
struct ipc_proc_iter *iter = s->private;
struct ipc_proc_iface *iface = iter->iface;
if (it == SEQ_START_TOKEN) {
seq_puts(s, iface->header);
return 0;
}
return iface->show(s, it);
}
Commit Message: Initialize msg/shm IPC objects before doin... | 0 | 42,055 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: TEE_Result syscall_mask_cancellation(uint32_t *old_mask)
{
TEE_Result res;
struct tee_ta_session *s = NULL;
uint32_t m;
res = tee_ta_get_current_session(&s);
if (res != TEE_SUCCESS)
return res;
m = s->cancel_mask;
s->cancel_mask = true;
return tee_svc_copy_to_user(old_mask, &m, sizeof(m));
}
Commit M... | 0 | 86,916 |
Analyze the following 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 *xt_match_seq_next(struct seq_file *seq, void *v, loff_t *ppos)
{
return xt_mttg_seq_next(seq, v, ppos, false);
}
Commit Message: netfilter: x_tables: check for bogus target offset
We're currently asserting that targetoff + targetsize <= nextoff.
Extend it to also check that targetoff is >= sizeof... | 0 | 52,424 |
Analyze the following 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_Box *chpl_New()
{
ISOM_DECL_BOX_ALLOC(GF_ChapterListBox, GF_ISOM_BOX_TYPE_CHPL);
tmp->list = gf_list_new();
tmp->version = 1;
return (GF_Box *)tmp;
}
Commit Message: fixed 2 possible heap overflows (inc. #1088)
CWE ID: CWE-125 | 0 | 80,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: static int32 TIFFWritePixels(TIFF *tiff,TIFFInfo *tiff_info,ssize_t row,
tsample_t sample,Image *image)
{
int32
status;
register ssize_t
i;
register unsigned char
*p,
*q;
size_t
number_tiles,
tile_width;
ssize_t
bytes_per_pixel,
j,
k,
l;
if (TIFFIsTiled(t... | 0 | 77,991 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: scoped_refptr<ComputedStyle> SVGElement::CustomStyleForLayoutObject() {
if (!CorrespondingElement())
return GetDocument().EnsureStyleResolver().StyleForElement(this);
const ComputedStyle* style = nullptr;
if (Element* parent = ParentOrShadowHostElement())
style = parent->GetComputedStyle();
retu... | 0 | 152,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: bool NormalPage::isEmpty() {
HeapObjectHeader* header = reinterpret_cast<HeapObjectHeader*>(payload());
return header->isFree() && header->size() == payloadSize();
}
Commit Message: Call HeapObjectHeader::checkHeader solely for its side-effect.
This requires changing its signature. This is a preliminary sta... | 0 | 147,561 |
Analyze the following 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 rds_inc_init(struct rds_incoming *inc, struct rds_connection *conn,
__be32 saddr)
{
atomic_set(&inc->i_refcount, 1);
INIT_LIST_HEAD(&inc->i_item);
inc->i_conn = conn;
inc->i_saddr = saddr;
inc->i_rdma_cookie = 0;
}
Commit Message: rds: set correct msg_namelen
Jay Fenlason (fenlason@redhat.com) fou... | 0 | 19,355 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int __net_init packet_net_init(struct net *net)
{
mutex_init(&net->packet.sklist_lock);
INIT_HLIST_HEAD(&net->packet.sklist);
if (!proc_create("packet", 0, net->proc_net, &packet_seq_fops))
return -ENOMEM;
return 0;
}
Commit Message: net: rework recvmsg handler msg_name and msg_namelen logic
This... | 0 | 40,629 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc, xmlSAXHandlerPtr sax,
void *user_data, int depth, const xmlChar *string, xmlNodePtr *lst,
int recover) {
xmlParserCtxtPtr ctxt;
xmlDocPtr newDoc;
xmlSAXHandlerPtr oldsax = NULL;
xmlNodePtr content, newRoot;
int size;
int ret = 0;
... | 0 | 59,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: void menu_cache_remove_reload_notify(MenuCache* cache, MenuCacheNotifyId notify_id)
{
MENU_CACHE_LOCK;
g_slice_free( CacheReloadNotifier, ((GSList*)notify_id)->data );
cache->notifiers = g_slist_delete_link( cache->notifiers, (GSList*)notify_id );
MENU_CACHE_UNLOCK;
}
Commit Message:
CWE ID: CWE... | 0 | 6,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: acpi_status __init acpi_os_initialize1(void)
{
kacpid_wq = alloc_workqueue("kacpid", 0, 1);
kacpi_notify_wq = alloc_workqueue("kacpi_notify", 0, 1);
kacpi_hotplug_wq = alloc_ordered_workqueue("kacpi_hotplug", 0);
BUG_ON(!kacpid_wq);
BUG_ON(!kacpi_notify_wq);
BUG_ON(!kacpi_hotplug_wq);
acpi_install_interfac... | 0 | 53,847 |
Analyze the following 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::RouteCloseEvent(RenderViewHost* rvh) {
if (rvh->GetSiteInstance()->IsRelatedSiteInstance(GetSiteInstance()))
ClosePage();
}
Commit Message: Don't call WebContents::DownloadImage() callback if the WebContents were deleted
BUG=583718
Review URL: https://codereview.chromium.org/1685343... | 0 | 131,980 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void FreeMenu(const PP_Flash_Menu* menu) {
if (menu->items) {
for (uint32_t i = 0; i < menu->count; ++i)
FreeMenuItem(menu->items + i);
delete [] menu->items;
}
delete menu;
}
Commit Message: IPC: defend against excessive number of submenu entries in PPAPI message.
BUG=168710
Review URL: htt... | 0 | 115,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: void BrowserLauncherItemController::Clicked() {
views::Widget* widget =
views::Widget::GetWidgetForNativeView(window_);
if (widget && widget->IsActive()) {
widget->Minimize();
} else {
Activate();
}
}
Commit Message: Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
... | 0 | 117,722 |
Analyze the following 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_METHOD(SoapServer, setClass)
{
soapServicePtr service;
char *classname;
zend_class_entry **ce;
int classname_len, found, num_args = 0;
zval ***argv = NULL;
SOAP_SERVER_BEGIN_CODE();
FETCH_THIS_SERVICE(service);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s*", &classname, &classname_len, ... | 0 | 14,863 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Ins_JROT( TT_ExecContext exc,
FT_Long* args )
{
if ( args[1] != 0 )
Ins_JMPR( exc, args );
}
Commit Message:
CWE ID: CWE-476 | 0 | 10,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: static void vmci_transport_peer_attach_cb(u32 sub_id,
const struct vmci_event_data *e_data,
void *client_data)
{
struct sock *sk = client_data;
const struct vmci_event_payload_qp *e_payload;
struct vsock_sock *vsk;
e_payload = vmci_event_data_const_payload(e_data);
vsk = vsock_sk(sk);
/* We... | 0 | 30,399 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: selCreateFromColorPix(PIX *pixs,
char *selname)
{
PIXCMAP *cmap;
SEL *sel;
l_int32 hascolor, hasorigin, nohits;
l_int32 w, h, d, i, j, red, green, blue;
l_uint32 pixval;
PROCNAME("selCreateFromColorPix");
if (!pixs)
return (SEL *)ERROR_PTR("pixs not defined", ... | 0 | 84,208 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void SetTitleBarIcon(HWND hDlg)
{
int i16, s16, s32;
HICON hSmallIcon, hBigIcon;
i16 = GetSystemMetrics(SM_CXSMICON);
s16 = i16;
s32 = (int)(32.0f*fScale);
if (s16 >= 54)
s16 = 64;
else if (s16 >= 40)
s16 = 48;
else if (s16 >= 28)
s16 = 32;
else if (s16 >= 20)
s16 = 24;
if (s32 >= 54)
s32 = 6... | 0 | 62,209 |
Analyze the following 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 WebRuntimeFeatures::enableNotifications(bool enable)
{
RuntimeEnabledFeatures::setNotificationsEnabled(enable);
}
Commit Message: Remove SpeechSynthesis runtime flag (status=stable)
BUG=402536
Review URL: https://codereview.chromium.org/482273005
git-svn-id: svn://svn.chromium.org/blink/trunk@180763 ... | 0 | 116,089 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: const std::string& MediaStreamDevicesController::GetSecurityOriginSpec() const {
return request_.security_origin.spec();
}
Commit Message: Make the content setting for webcam/mic sticky for Pepper requests.
This makes the content setting sticky for webcam/mic requests from Pepper from non-https origins.
BUG=... | 0 | 113,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: status_t OMXNodeInstance::useGraphicBuffer(
OMX_U32 portIndex, const sp<GraphicBuffer>& graphicBuffer,
OMX::buffer_id *buffer) {
if (graphicBuffer == NULL || buffer == NULL) {
ALOGE("b/25884056");
return BAD_VALUE;
}
Mutex::Autolock autoLock(mLock);
OMX_INDEXTYPE index;
if (OMX_G... | 0 | 157,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: PaintLayerScrollableArea::ScrollingBackgroundDisplayItemClient::OwnerNodeId()
const {
return static_cast<const DisplayItemClient*>(scrollable_area_->GetLayoutBox())
->OwnerNodeId();
}
Commit Message: Always call UpdateCompositedScrollOffset, not just for the root layer
Bug: 927560
Change-Id: I1d5522... | 0 | 130,091 |
Analyze the following 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(xml_parse)
{
xml_parser *parser;
zval *pind;
char *data;
int data_len, ret;
long isFinal = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &pind, &data, &data_len, &isFinal) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_p... | 0 | 10,978 |
Analyze the following 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 sco_sock_bind(struct socket *sock, struct sockaddr *addr,
int addr_len)
{
struct sockaddr_sco *sa = (struct sockaddr_sco *) addr;
struct sock *sk = sock->sk;
int err = 0;
BT_DBG("sk %p %pMR", sk, &sa->sco_bdaddr);
if (!addr || addr->sa_family != AF_BLUETOOTH)
return -EINVAL;
lock_soc... | 1 | 167,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 DaemonProcessTest::QuitMessageLoop() {
message_loop_.PostTask(FROM_HERE, MessageLoop::QuitClosure());
}
Commit Message: Validate and report peer's PID to WorkerProcessIpcDelegate so it will be able to duplicate handles to and from the worker process.
As a side effect WorkerProcessLauncher::Delegate is no... | 0 | 118,779 |
Analyze the following 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 rpc_async_release(struct work_struct *work)
{
rpc_free_task(container_of(work, struct rpc_task, u.tk_work));
}
Commit Message: NLM: Don't hang forever on NLM unlock requests
If the NLM daemon is killed on the NFS server, we can currently end up
hanging forever on an 'unlock' request, instead of abo... | 0 | 34,948 |
Analyze the following 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 OrderedDitherImageChannel(Image *image,
const ChannelType channel,ExceptionInfo *exception)
{
MagickBooleanType
status;
/*
Call the augumented function OrderedPosterizeImage()
*/
status=OrderedPosterizeImageChannel(image,channel,"o8x8",exception);
return(status);... | 0 | 89,025 |
Analyze the following 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 MagicCmp(const char* magic_entry, const char* content, size_t len) {
while (len) {
if ((*magic_entry != '.') && (*magic_entry != *content))
return false;
++magic_entry;
++content;
--len;
}
return true;
}
Commit Message: Revert "Don't sniff HTML from documents delivered via... | 0 | 148,397 |
Analyze the following 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 WaitForCallback() {
if (!use_audio_thread_) {
base::RunLoop().RunUntilIdle();
return;
}
media::WaitableMessageLoopEvent event;
audio_thread_.task_runner()->PostTaskAndReply(
FROM_HERE, base::Bind(&base::DoNothing), event.GetClosure());
event.RunAndWait();
... | 1 | 171,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 Camera3Device::RequestThread::setPaused(bool paused) {
Mutex::Autolock l(mPauseLock);
mDoPause = paused;
mDoPauseSignal.signal();
}
Commit Message: Camera3Device: Validate template ID
Validate template ID before creating a default request.
Bug: 26866110
Bug: 27568958
Change-Id: Ifda457024f1d5c2b1... | 0 | 161,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.