instruction stringclasses 1
value | input stringlengths 64 129k | output int64 0 1 | __index_level_0__ int64 0 30k |
|---|---|---|---|
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int vrend_decode_resource_inline_write(struct vrend_decode_ctx *ctx, uint16_t length)
{
struct vrend_transfer_info info;
struct pipe_box box;
uint32_t res_handle;
uint32_t level, usage, stride, layer_stride, data_len;
struct iovec dataiovec;
void *data;
if (length < 12)
return E... | 0 | 2,003 |
Analyze the following 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 shrink_dcache_for_umount(struct super_block *sb)
{
struct dentry *dentry;
WARN(down_read_trylock(&sb->s_umount), "s_umount should've been locked");
dentry = sb->s_root;
sb->s_root = NULL;
do_one_tree(dentry);
while (!hlist_bl_empty(&sb->s_anon)) {
dentry = dget(hlist_bl_entry(hlist_bl_first(&sb->s... | 0 | 22,708 |
Analyze the following 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 pcd_drive_status(struct cdrom_device_info *cdi, int slot_nr)
{
char rc_cmd[12] = { 0x25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
struct pcd_unit *cd = cdi->handle;
if (pcd_ready_wait(cd, PCD_READY_TMO))
return CDS_DRIVE_NOT_READY;
if (pcd_atapi(cd, rc_cmd, 8, pcd_scratch, DBMSG("check media")))
ret... | 0 | 13,435 |
Analyze the following 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 spl_filesystem_object * spl_filesystem_object_create_type(int ht, spl_filesystem_object *source, int type, zend_class_entry *ce, zval *return_value TSRMLS_DC) /* {{{ */
{
spl_filesystem_object *intern;
zend_bool use_include_path = 0;
zval *arg1, *arg2;
zend_error_handling error_handling;
zend_replace... | 1 | 2,739 |
Analyze the following 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 Editor::ReplaceSelection(const String& text) {
DCHECK(!GetFrame().GetDocument()->NeedsLayoutTreeUpdate());
bool select_replacement = Behavior().ShouldSelectReplacement();
bool smart_replace = true;
ReplaceSelectionWithText(text, select_replacement, smart_replace,
InputEvent... | 0 | 3,454 |
Analyze the following 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 fill_tso_desc(struct hnae_ring *ring, void *priv,
int size, dma_addr_t dma, int frag_end,
int buf_num, enum hns_desc_type type, int mtu)
{
int frag_buf_num;
int sizeoflast;
int k;
frag_buf_num = (size + BD_MAX_SEND_SIZE - 1) / BD_MAX_SEND_SIZE;
sizeoflast = size % BD_MAX_SEND_SIZE;
si... | 0 | 8,249 |
Analyze the following 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* TypingCommand::lastTypingCommandIfStillOpenForTyping(
LocalFrame* frame) {
DCHECK(frame);
CompositeEditCommand* lastEditCommand = frame->editor().lastEditCommand();
if (!lastEditCommand || !lastEditCommand->isTypingCommand() ||
!static_cast<TypingCommand*>(lastEditCommand)->isOpenF... | 0 | 4,328 |
Analyze the following 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 jpc_dec_process_crg(jpc_dec_t *dec, jpc_ms_t *ms)
{
int cmptno;
jpc_dec_cmpt_t *cmpt;
jpc_crg_t *crg;
crg = &ms->parms.crg;
for (cmptno = 0, cmpt = dec->cmpts; cmptno < dec->numcomps; ++cmptno,
++cmpt) {
/* Ignore the information in the CRG marker segment for now.
This information serves... | 0 | 2,864 |
Analyze the following 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 CallWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
TestObject* impl = V8TestObject::ToImpl(info.Holder());
ExecutionContext* execution_context = ExecutionContext::ForRelevantRealm(info);
impl->callWithExecutionContextVoidMethod(execution_context);
}
Com... | 0 | 22,069 |
Analyze the following 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 activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggingGetterForAllWorldsLongAttribute());
}
Commit Message: document.lo... | 0 | 3,997 |
Analyze the following 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_drop_inode(struct inode *inode)
{
int drop = generic_drop_inode(inode);
trace_ext4_drop_inode(inode, drop);
return drop;
}
Commit Message: ext4: fix undefined behavior in ext4_fill_flex_info()
Commit 503358ae01b70ce6909d19dd01287093f6b6271c ("ext4: avoid divide by
zero when trying to mount a... | 0 | 4,939 |
Analyze the following 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 AudioInputRendererHost::DeleteEntries() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
for (AudioEntryMap::iterator i = audio_entries_.begin();
i != audio_entries_.end(); ++i) {
CloseAndDeleteStream(i->second);
}
}
Commit Message: Improve validation when creating audio streams.
... | 0 | 5,192 |
Analyze the following 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 mmput(struct mm_struct *mm)
{
might_sleep();
if (atomic_dec_and_test(&mm->mm_users)) {
exit_aio(mm);
ksm_exit(mm);
exit_mmap(mm);
set_mm_exe_file(mm, NULL);
if (!list_empty(&mm->mmlist)) {
spin_lock(&mmlist_lock);
list_del(&mm->mmlist);
spin_unlock(&mmlist_lock);
}
put_swap_token(mm... | 0 | 4,741 |
Analyze the following 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_remount(struct super_block *sb, int *flags, char *data)
{
struct ext4_super_block *es;
struct ext4_sb_info *sbi = EXT4_SB(sb);
ext4_fsblk_t n_blocks_count = 0;
unsigned long old_sb_flags;
struct ext4_mount_options old_opts;
int enable_quota = 0;
ext4_group_t g;
unsigned int journal_ioprio ... | 0 | 8,571 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SSLErrorHandler::SSLErrorHandler(base::WeakPtr<Delegate> delegate,
const content::GlobalRequestID& id,
ResourceType::Type resource_type,
const GURL& url,
int render_process_id,
... | 1 | 3,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: PHP_FUNCTION(openssl_pkey_new)
{
struct php_x509_request req;
zval * args = NULL;
zval **data;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|a!", &args) == FAILURE) {
return;
}
RETVAL_FALSE;
if (args && Z_TYPE_P(args) == IS_ARRAY) {
EVP_PKEY *pkey;
if (zend_hash_find(Z_ARRVAL_P(args), "rs... | 0 | 4,508 |
Analyze the following 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 uint64_t virtio_net_guest_offloads_by_features(uint32_t features)
{
static const uint64_t guest_offloads_mask =
(1ULL << VIRTIO_NET_F_GUEST_CSUM) |
(1ULL << VIRTIO_NET_F_GUEST_TSO4) |
(1ULL << VIRTIO_NET_F_GUEST_TSO6) |
(1ULL << VIRTIO_NET_F_GUEST_ECN) |
(1ULL <... | 0 | 3,503 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderThreadImpl::IdleHandlerInForegroundTab() {
int64 new_delay_ms = idle_notification_delay_in_ms_ +
1000000 / (idle_notification_delay_in_ms_ + 2000);
if (new_delay_ms >= kLongIdleHandlerDelayMs)
new_delay_ms = kShortIdleHandlerDelayMs;
if (idle_notifications_to_skip_ > 0... | 0 | 1,189 |
Analyze the following 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 AppLayerProtoDetectPMAddSignature(AppLayerProtoDetectPMCtx *ctx, DetectContentData *cd,
AppProto alproto)
{
SCEnter();
int ret = 0;
AppLayerProtoDetectPMSignature *s = SCMalloc(sizeof(*s));
if (unlikely(s == NULL))
goto error;
me... | 0 | 136 |
Analyze the following 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 enum test_return test_binary_appendq(void) {
return test_binary_concat_impl("test_binary_appendq",
PROTOCOL_BINARY_CMD_APPENDQ);
}
Commit Message: Issue 102: Piping null to the server will crash it
CWE ID: CWE-20 | 0 | 11,830 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ZEND_API zend_class_entry *zend_lookup_class(zend_string *name) /* {{{ */
{
return zend_lookup_class_ex(name, NULL, 1);
}
/* }}} */
Commit Message: Use format string
CWE ID: CWE-134 | 0 | 7,409 |
Analyze the following 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 ftrace_kill(void)
{
ftrace_disabled = 1;
ftrace_enabled = 0;
clear_ftrace_function();
}
Commit Message: tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open(... | 0 | 232 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: QTNSort(QTNode *in)
{
int i;
/* since this function recurses, it could be driven to stack overflow. */
check_stack_depth();
if (in->valnode->type != QI_OPR)
return;
for (i = 0; i < in->nchild; i++)
QTNSort(in->child[i]);
if (in->nchild > 1)
qsort((void *) in->child, in->nchild, sizeof(QTNode *), ... | 0 | 6,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 demux_c15_get(u64 id, void __user *uaddr)
{
u32 val;
u32 __user *uval = uaddr;
/* Fail if we have unknown bits set. */
if (id & ~(KVM_REG_ARCH_MASK|KVM_REG_SIZE_MASK|KVM_REG_ARM_COPROC_MASK
| ((1 << KVM_REG_ARM_COPROC_SHIFT)-1)))
return -ENOENT;
switch (id & KVM_REG_ARM_DEMUX_ID_MASK) {
... | 0 | 27,024 |
Analyze the following 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 Camera3Device::RequestThread::queueTriggerLocked(
RequestTrigger trigger) {
uint32_t tag = trigger.metadataTag;
ssize_t index = mTriggerMap.indexOfKey(tag);
switch (trigger.getTagType()) {
case TYPE_BYTE:
case TYPE_INT32:
break;
default:
ALOGE("%s: Type not supported: 0x%x", __FUNCT... | 0 | 9,326 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void hal_close() {
LOG_INFO("%s", __func__);
eager_reader_free(uart_stream);
vendor->send_command(VENDOR_CLOSE_USERIAL, NULL);
uart_fd = INVALID_FD;
}
Commit Message: DO NOT MERGE Fix potential DoS caused by delivering signal to BT process
Bug: 28885210
Change-Id: I63866d894bfca47464d6e42e3fb035... | 0 | 1,227 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: unpack_octal (GsfInfileTar *tar, const char *s, size_t len)
{
guint64 res = 0;
/*
* Different specifications differ on what terminating characters
* are allowed. It doesn't hurt for us to allow both space and
* NUL.
*/
if (len == 0 || (s[len - 1] != 0 && s[len - 1] != ' '))
goto invalid;
len--;
... | 0 | 21,555 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: is_default_salt_p(const krb5_salt *default_salt, const Key *key)
{
if (key->salt == NULL)
return TRUE;
if (default_salt->salttype != key->salt->type)
return FALSE;
if (krb5_data_cmp(&default_salt->saltvalue, &key->salt->salt))
return FALSE;
return TRUE;
}
Commit Message: Security: Avoid NULL s... | 0 | 22,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 inline void blowfish_enc_blk_xor(struct bf_ctx *ctx, u8 *dst,
const u8 *src)
{
__blowfish_enc_blk(ctx, dst, src, true);
}
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 ... | 0 | 23,693 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: rad_put_attr(struct rad_handle *h, int type, const void *value, size_t len)
{
int result;
if (!h->request_created) {
generr(h, "Please call rad_create_request()");
return -1;
}
if (type == RAD_USER_PASSWORD)
result = put_password_attr(h, type, value, len);
else {
result = put_raw_... | 0 | 5,621 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void arm_notify_die(const char *str, struct pt_regs *regs,
struct siginfo *info, unsigned long err, unsigned long trap)
{
if (user_mode(regs)) {
current->thread.error_code = err;
current->thread.trap_no = trap;
force_sig_info(info->si_signo, info, current);
} else {
die(str, regs, err);
}
}
Commit ... | 0 | 9,771 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Address NormalPageArena::LazySweepPages(size_t allocation_size,
size_t gc_info_index) {
DCHECK(!HasCurrentAllocationArea());
AutoReset<bool> is_lazy_sweeping(&is_lazy_sweeping_, true);
Address result = nullptr;
while (!SweepingCompleted()) {
BasePage* page = fir... | 0 | 22,530 |
Analyze the following 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 ChromeMockRenderThread::OnUpdatePrintSettings(
int document_cookie,
const base::DictionaryValue& job_settings,
PrintMsg_PrintPages_Params* params) {
std::string dummy_string;
int margins_type = 0;
if (!job_settings.GetBoolean(printing::kSettingLandscape, NULL) ||
!job_settings.GetBool... | 1 | 18,349 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: png_access_version_number(void)
{
/* Version of *.c files used when building libpng */
return((png_uint_32) PNG_LIBPNG_VER);
}
Commit Message: third_party/libpng: update to 1.2.54
TBR=darin@chromium.org
BUG=560291
Review URL: https://codereview.chromium.org/1467263003
Cr-Commit-Position: refs/heads/mast... | 0 | 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: static void testInterfacePythonAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE(... | 0 | 21,800 |
Analyze the following 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 bprm_change_interp(char *interp, struct linux_binprm *bprm)
{
/* If a binfmt changed the interp, free it first. */
if (bprm->interp != bprm->filename)
kfree(bprm->interp);
bprm->interp = kstrdup(interp, GFP_KERNEL);
if (!bprm->interp)
return -ENOMEM;
return 0;
}
Commit Message: exec/ptrace: fix get_... | 0 | 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: pdf_repair_obj(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf, fz_off_t *stmofsp, int *stmlenp, pdf_obj **encrypt, pdf_obj **id, pdf_obj **page, fz_off_t *tmpofs, pdf_obj **root)
{
fz_stream *file = doc->file;
pdf_token tok;
int stm_len;
*stmofsp = 0;
if (stmlenp)
*stmlenp = -1;
stm_len = 0;
/* O... | 0 | 6,734 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void DesktopWindowTreeHostX11::OnWidgetInitDone() {}
Commit Message: Fix PIP window being blank after minimize/show
DesktopWindowTreeHostX11::SetVisible only made the call into
OnNativeWidgetVisibilityChanged when transitioning from shown
to minimized and not vice versa. This is because this change
https://chr... | 0 | 16,417 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: DrawingBuffer::~DrawingBuffer() {
DCHECK(destruction_in_progress_);
layer_.reset();
context_provider_.reset();
}
Commit Message: Reset ES3 pixel pack parameters and PIXEL_PACK_BUFFER binding in DrawingBuffer before ReadPixels() and recover them later.
BUG=740603
TEST=new conformance test
R=kbr@chromium.or... | 0 | 24,973 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool WebMediaPlayerImpl::CopyVideoTextureToPlatformTexture(
gpu::gles2::GLES2Interface* gl,
unsigned int target,
unsigned int texture,
unsigned internal_format,
unsigned format,
unsigned type,
int level,
bool premultiply_alpha,
bool flip_y,
int already_uploaded_id,
Vide... | 0 | 20,138 |
Analyze the following 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 ext4_show_quota_options(struct seq_file *seq,
struct super_block *sb)
{
#if defined(CONFIG_QUOTA)
struct ext4_sb_info *sbi = EXT4_SB(sb);
if (sbi->s_jquota_fmt) {
char *fmtname = "";
switch (sbi->s_jquota_fmt) {
case QFMT_VFS_OLD:
fmtname = "vfsold";
break;
case QFMT_V... | 0 | 16,617 |
Analyze the following 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 ExtensionsGuestViewMessageFilter::CreateMimeHandlerViewGuestOnUIThread(
int render_frame_id,
const std::string& view_id,
int element_instance_id,
const gfx::Size& element_size,
mime_handler::BeforeUnloadControlPtrInfo before_unload_control,
int32_t plugin_frame_routing_id,
bool is... | 0 | 11,500 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: compare_blob(const struct xdr_netobj *o1, const struct xdr_netobj *o2)
{
if (o1->len < o2->len)
return -1;
if (o1->len > o2->len)
return 1;
return memcmp(o1->data, o2->data, o1->len);
}
Commit Message: Merge tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux
Pull nfsd updates from Bruce Fields:
"Anot... | 0 | 28,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 int a2dp_read_audio_config(struct a2dp_stream_common *common)
{
char cmd = A2DP_CTRL_GET_AUDIO_CONFIG;
uint32_t sample_rate;
uint8_t channel_count;
if (a2dp_command(common, A2DP_CTRL_GET_AUDIO_CONFIG) < 0)
{
ERROR("check a2dp ready failed");
return -1;
}
if (a2dp_ctrl_receive(common, &sam... | 0 | 16,279 |
Analyze the following 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 RenderView::runModalConfirmDialog(
WebFrame* frame, const WebString& message) {
return RunJavaScriptMessage(ui::MessageBoxFlags::kIsJavascriptConfirm,
message,
string16(),
frame->document().url(),
... | 0 | 13,072 |
Analyze the following 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 TestDataReductionProxyConfig::ResetParamFlagsForTest() {
config_values_ = std::make_unique<TestDataReductionProxyParams>();
}
Commit Message: Implicitly bypass localhost when proxying requests.
This aligns Chrome's behavior with the Windows and macOS proxy resolvers (but not Firefox).
Concretely:
* loc... | 0 | 2,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: zexecuteonly(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
check_op(1);
if (r_has_type(op, t_dictionary))
return_error(gs_error_typecheck);
return access_check(i_ctx_p, a_execute, true);
}
Commit Message:
CWE ID: CWE-704 | 0 | 661 |
Analyze the following 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 gen_sample_entry_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_SampleEntryBox *ptr = (GF_SampleEntryBox *)s;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
gf_bs_write_data(bs, ptr->reserved, 6);
gf_bs_write_u16(bs, ptr->dataReferenceIndex);
return gf_isom_box_array_write(s, ptr->protect... | 0 | 19,002 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: t42_parse_font_matrix( T42_Face face,
T42_Loader loader )
{
T42_Parser parser = &loader->parser;
FT_Matrix* matrix = &face->type1.font_matrix;
FT_Vector* offset = &face->type1.font_offset;
FT_Face root = (FT_Face)&face->root;
FT_Fixed temp[6];
F... | 0 | 9,728 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: spnego_gss_get_mic(
OM_uint32 *minor_status,
const gss_ctx_id_t context_handle,
gss_qop_t qop_req,
const gss_buffer_t message_buffer,
gss_buffer_t message_token)
{
OM_uint32 ret;
ret = gss_get_mic(minor_status,
context_handle,
qop_req,
message_buffer,
message_token);
r... | 1 | 23,823 |
Analyze the following 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 gboolean highlight_forbidden(void)
{
GList *forbidden_words = load_words_from_file(FORBIDDEN_WORDS_BLACKLLIST);
GList *allowed_words = load_words_from_file(FORBIDDEN_WORDS_WHITELIST);
const gboolean result = highligh_words_in_tabs(forbidden_words, allowed_words, /*case sensitive*/false);
... | 0 | 13,997 |
Analyze the following 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 ExtensionDevToolsInfoBar::Remove(
ExtensionDevToolsClientHost* client_host) {
callbacks_.erase(client_host);
if (callbacks_.empty())
delete this;
}
Commit Message: Allow to specify elide behavior for confrim infobar message
Used in "<extension name> is debugging this browser" infobar.
Bug: 823... | 0 | 16,374 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void Browser::ActivateContents(WebContents* contents) {
chrome::ActivateTabAt(this, tab_strip_model_->GetIndexOfWebContents(contents),
false);
window_->Activate();
}
Commit Message: Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Revi... | 0 | 5,292 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void OverloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
ExceptionState exception_state(info.GetIsolate(), ExceptionState::kExecutionContext, "TestObject", "overloadedMethodB");
TestObject* impl = V8TestObject::ToImpl(info.Holder());
V8StringResource<> string_arg;
int32_t ... | 0 | 20,441 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: mojo::PendingRemote<mojom::InputChannel> CreatePendingRemote() {
return receiver_.BindNewPipeAndPassRemote();
}
Commit Message: ime-service: Delete InputEngine.ProcessText.
It is deprecated and no longer used.
Bug: 1009903
Change-Id: I6774a4506bd0bb41a5d1a5909a40a2a781564b16
Reviewed-on: https://chrom... | 0 | 17,220 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: DECLAREcpFunc(cpContigStrips2SeparateTiles)
{
return cpImage(in, out,
readContigStripsIntoBuffer,
writeBufferToSeparateTiles,
imagelength, imagewidth, spp);
}
Commit Message: * tools/tiffcp.c: fix out-of-bounds write on tiled images with odd
tile width vs image width. Reported as MSVR 35103
by Ax... | 0 | 10,294 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: __archive_read_seek(struct archive_read *a, int64_t offset, int whence)
{
return __archive_read_filter_seek(a->filter, offset, whence);
}
Commit Message: Fix a potential crash issue discovered by Alexander Cherepanov:
It seems bsdtar automatically handles stacked compression. This is a
nice feature but it coul... | 0 | 12,966 |
Analyze the following 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 oz_hcd_term(void)
{
msleep(OZ_HUB_DEBOUNCE_TIMEOUT);
tasklet_kill(&g_urb_process_tasklet);
tasklet_kill(&g_urb_cancel_tasklet);
platform_device_unregister(g_plat_dev);
platform_driver_unregister(&g_oz_plat_drv);
oz_dbg(ON, "Pending urbs:%d\n", atomic_read(&g_pending_urbs));
kmem_cache_destroy(oz_urb_l... | 0 | 11,059 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void Browser::OnWindowClosing() {
if (!ShouldCloseWindow())
return;
bool should_quit_if_last_browser =
browser_shutdown::IsTryingToQuit() ||
KeepAliveRegistry::GetInstance()->IsKeepingAliveOnlyByBrowserOrigin();
if (should_quit_if_last_browser && ShouldStartShutdown())
browser_shutdown... | 0 | 6,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: http_rxchar(struct http *hp, int n, int eof)
{
int i;
struct pollfd pfd[1];
while (n > 0) {
pfd[0].fd = hp->fd;
pfd[0].events = POLLIN;
pfd[0].revents = 0;
i = poll(pfd, 1, hp->timeout);
if (i == 0)
vtc_log(hp->vl, hp->fatal,
"HTTP rx timeout (fd:%d %u ms)",
hp->fd, hp->timeout);
... | 0 | 1,852 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void perf_cpu_hrtimer_restart(struct perf_cpu_context *cpuctx)
{
struct hrtimer *hr = &cpuctx->hrtimer;
struct pmu *pmu = cpuctx->ctx.pmu;
/* not for SW PMU */
if (pmu->task_ctx_nr == perf_sw_context)
return;
if (hrtimer_active(hr))
return;
if (!hrtimer_callback_running(hr))
__hrtimer_start_... | 0 | 10,725 |
Analyze the following 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 WebGLRenderingContextBase::DispatchContextLostEvent(TimerBase*) {
WebGLContextEvent* event = WebGLContextEvent::Create(
EventTypeNames::webglcontextlost, false, true, "");
host()->HostDispatchEvent(event);
restore_allowed_ = event->defaultPrevented();
if (restore_allowed_ && !is_hidden_) {
... | 0 | 2,197 |
Analyze the following 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_early_requeue_pi_wakeup(struct futex_hash_bucket *hb,
struct futex_q *q, union futex_key *key2,
struct hrtimer_sleeper *timeout)
{
int ret = 0;
/*
* With the hb lock held, we avoid races while we process the wakeup.
* We only need to hold hb (and not hb2) to ensure atomicity as the... | 0 | 12,855 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void Document::close()
{
if (!scriptableDocumentParser() || !scriptableDocumentParser()->wasCreatedByScript() || !scriptableDocumentParser()->isParsing())
return;
if (RefPtrWillBeRawPtr<DocumentParser> parser = m_parser)
parser->finish();
if (!m_frame) {
implicitClose();
... | 0 | 28,691 |
Analyze the following 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 SpinLock::lockSlow()
{
static const int kYieldProcessorTries = 1000;
do {
do {
for (int count = 0; count < kYieldProcessorTries; ++count) {
YIELD_PROCESSOR;
if (!m_lock.load(std::memory_order_relaxed) && LIKELY(!m_lock.exchange(true, std::memory_ord... | 0 | 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 FolderHeaderView::OnFolderItemRemoved() {
folder_item_ = NULL;
}
Commit Message: Enforce the maximum length of the folder name in UI.
BUG=355797
R=xiyuan@chromium.org
Review URL: https://codereview.chromium.org/203863005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260156 0039d316-1c4b-4281-b951... | 0 | 24,630 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool Document::setFocusedElement(PassRefPtrWillBeRawPtr<Element> prpNewFocusedElement, const FocusParams& params)
{
ASSERT(!m_lifecycle.inDetach());
m_clearFocusedElementTimer.stop();
RefPtrWillBeRawPtr<Element> newFocusedElement = prpNewFocusedElement;
if (newFocusedElement && (newFocusedEleme... | 0 | 12,566 |
Analyze the following 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 CL_ResetPureClientAtServer( void ) {
CL_AddReliableCommand("vdr", qfalse);
}
Commit Message: All: Don't load .pk3s as .dlls, and don't load user config files from .pk3s
CWE ID: CWE-269 | 0 | 13,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: asmlinkage __visible void __attribute__((weak)) smp_thermal_interrupt(void)
{
}
Commit Message: x86_64, traps: Stop using IST for #SS
On a 32-bit kernel, this has no effect, since there are no IST stacks.
On a 64-bit kernel, #SS can only happen in user code, on a failed iret
to user space, a canonical violatio... | 0 | 17,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 V8Console::undebugFunctionCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ConsoleHelper helper(info);
v8::Local<v8::Function> function;
if (!helper.firstArgAsFunction().ToLocal(&function))
return;
setFunctionBreakpoint(helper, function, V8DebuggerAgentImpl::DebugCommandBre... | 0 | 7,727 |
Analyze the following 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 ChromeClientImpl::CanOpenBeforeUnloadConfirmPanel() {
return !!web_view_->Client();
}
Commit Message: If a page calls |window.focus()|, kick it out of fullscreen.
BUG=776418, 800056
Change-Id: I1880fe600e4814c073f247c43b1c1ac80c8fc017
Reviewed-on: https://chromium-review.googlesource.com/852378
Reviewed... | 0 | 3,060 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void BrowserViewRenderer::SetWindowVisibility(bool window_visible) {
TRACE_EVENT_INSTANT1("android_webview",
"BrowserViewRenderer::SetWindowVisibility",
TRACE_EVENT_SCOPE_THREAD,
"window_visible",
window_visible);
wind... | 0 | 25,930 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: FPDF_BOOL PDFiumEngine::Pause_NeedToPauseNow(IFSDK_PAUSE* param) {
PDFiumEngine* engine = static_cast<PDFiumEngine*>(param);
return (base::Time::Now() - engine->last_progressive_start_time_).
InMilliseconds() > engine->progressive_paint_timeout_;
}
Commit Message: [pdf] Defer page unloading in JS callb... | 0 | 3,870 |
Analyze the following 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 RenderBlockFlow::adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutUnit& right) const
{
RenderBlock::adjustForBorderFit(x, left, right);
if (m_floatingObjects && style()->visibility() == VISIBLE) {
const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
FloatingO... | 0 | 17,056 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void NuPlayer::GenericSource::queueDiscontinuityIfNeeded(
bool seeking, bool formatChange, media_track_type trackType, Track *track) {
if ((seeking || formatChange)
&& (trackType == MEDIA_TRACK_TYPE_AUDIO
|| trackType == MEDIA_TRACK_TYPE_VIDEO)) {
ATSParser::DiscontinuityType type = (formatChange && seeking)... | 0 | 4,720 |
Analyze the following 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 AddPolymerElements(content::WebUIDataSource* html_source) {
html_source->AddResourcePath(
"elements/issue_banner/issue_banner.css",
IDR_ISSUE_BANNER_CSS);
html_source->AddResourcePath(
"elements/issue_banner/issue_banner.html",
IDR_ISSUE_BANNER_HTML);
html_source->AddResourcePa... | 0 | 21,603 |
Analyze the following 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 void MagickError(const ExceptionType error,const char *reason,
const char *description)
{
if (error_handler != (ErrorHandler) NULL)
(*error_handler)(error,reason,description);
}
Commit Message: Suspend exception processing if there are too many exceptions
CWE ID: CWE-119 | 0 | 21,861 |
Analyze the following 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::NotEnumerableLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_notEnumerableLongAttribute_Getter");
test_object_v8_internal::NotEnumerableLongAttributeAttributeGetter(inf... | 0 | 12,440 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ThreadHeapStats::ThreadHeapStats()
: allocated_space_(0),
allocated_object_size_(0),
object_size_at_last_gc_(0),
marked_object_size_(0),
marked_object_size_at_last_complete_sweep_(0),
wrapper_count_(0),
wrapper_count_at_last_gc_(0),
collected_wrapper_count_(0),
... | 0 | 20,696 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int write_rom(struct edgeport_serial *serial, int start_address,
int length, __u8 *buffer)
{
if (serial->product_info.TiMode == TI_MODE_BOOT)
return write_boot_mem(serial, start_address, length,
buffer);
if (serial->product_info.TiMode == TI_MODE_DOWNLOAD)
return write_i2c_mem(serial, ... | 0 | 1,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: void SetRTL(bool rtl) {
SetICUDefaultLocale(rtl ? "he" : "en");
EXPECT_EQ(rtl, IsRTL());
}
Commit Message: Convert ARRAYSIZE_UNSAFE -> arraysize in base/.
R=thestig@chromium.org
BUG=423134
Review URL: https://codereview.chromium.org/656033009
Cr-Commit-Position: refs/heads/master@{#299835}
CWE ID: CWE-189 | 0 | 29,872 |
Analyze the following 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 NavigationControllerImpl::RendererDidNavigate(
const ViewHostMsg_FrameNavigate_Params& params,
LoadCommittedDetails* details) {
is_initial_navigation_ = false;
if (GetLastCommittedEntry()) {
details->previous_url = GetLastCommittedEntry()->GetURL();
details->previous_entry_index = GetLas... | 0 | 9,726 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: mrb_obj_ceqq(mrb_state *mrb, mrb_value self)
{
mrb_value v;
mrb_int i, len;
mrb_sym eqq = mrb_intern_lit(mrb, "===");
mrb_value ary = mrb_ary_splat(mrb, self);
mrb_get_args(mrb, "o", &v);
len = RARRAY_LEN(ary);
for (i=0; i<len; i++) {
mrb_value c = mrb_funcall_argv(mrb, mrb_ary_entry(ary, i), e... | 0 | 24,308 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void CheckFails(
const WebURLRequest& request,
WebAssociatedURLLoaderOptions options = WebAssociatedURLLoaderOptions()) {
expected_loader_ = CreateAssociatedURLLoader(options);
EXPECT_TRUE(expected_loader_);
did_fail_ = false;
expected_loader_->LoadAsynchronously(request, this);
... | 0 | 5,505 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: safe_read(png_structp png_ptr, int fd, void *buffer_in, size_t nbytes)
{
size_t ntotal = 0;
char *buffer = png_voidcast(char*, buffer_in);
while (nbytes > 0)
{
unsigned int nread;
int iread;
/* Passing nread > INT_MAX to read is implementation defined in POSIX
* 1003.1, therefore despite the unsig... | 0 | 3,608 |
Analyze the following 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 GLchar* GLES2Implementation::GetRequestableExtensionsCHROMIUM() {
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix()
<< "] glGetRequestableExtensionsCHROMIUM()");
TRACE_EVENT0("gpu",
"GLES2Implementation::GetRequestableExtensionsCHROMIUM()");
c... | 0 | 6,897 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: const char* ConvertTransferStatusToApi(const UsbTransferStatus status) {
switch (status) {
case device::USB_TRANSFER_COMPLETED:
return "";
case device::USB_TRANSFER_ERROR:
return kErrorGeneric;
case device::USB_TRANSFER_TIMEOUT:
return kErrorTimeout;
case device::USB_TRANSFER_C... | 0 | 2,601 |
Analyze the following 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 snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control,
unsigned int access)
{
struct snd_kcontrol *kctl;
unsigned int idx;
if (snd_BUG_ON(!control || !control->count))
return NULL;
if (control->count > MAX_CONTROL_COUNT)
return NULL;
kctl = kzalloc(sizeof(*kctl) + sizeof(struct sn... | 0 | 3,528 |
Analyze the following 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 DownloadItemImpl::PercentComplete() const {
if (delegate_delayed_complete_ || total_bytes_ <= 0)
return -1;
return static_cast<int>(received_bytes_ * 100.0 / total_bytes_);
}
Commit Message: Refactors to simplify rename pathway in DownloadFileManager.
This is https://chromiumcodereview.appspot.com/... | 0 | 3,364 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SkColor AutofillPopupBaseView::GetWarningColor() {
return GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_AlertSeverityHigh);
}
Commit Message: [Autofill] Remove AutofillPopupViewViews and associated feature.
Bug: 906135,831603
Change-Id: I3c982f8b3ffb4928c7c878e74e10113999106499
Reviewed-on... | 0 | 12,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 vhost_work_init(struct vhost_work *work, vhost_work_fn_t fn)
{
INIT_LIST_HEAD(&work->node);
work->fn = fn;
init_waitqueue_head(&work->done);
work->flushing = 0;
work->queue_seq = work->done_seq = 0;
}
Commit Message: vhost: fix length for cross region descriptor
If a single descriptor crosses a region... | 0 | 24,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 void update_cpu_load(struct rq *this_rq)
{
unsigned long this_load = this_rq->load.weight;
unsigned long curr_jiffies = jiffies;
unsigned long pending_updates;
int i, scale;
this_rq->nr_load_updates++;
/* Avoid repeated calls on same jiffy, when moving in and out of idle */
if (curr_jiffies == thi... | 0 | 29,898 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int power_pmu_commit_txn(struct pmu *pmu)
{
struct cpu_hw_events *cpuhw;
long i, n;
if (!ppmu)
return -EAGAIN;
cpuhw = &__get_cpu_var(cpu_hw_events);
n = cpuhw->n_events;
if (check_excludes(cpuhw->event, cpuhw->flags, 0, n))
return -EAGAIN;
i = power_check_constraints(cpuhw, cpuhw->events, cpuhw->flag... | 0 | 26,736 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: get_xdg_var (XDG_Var xdg) {
const gchar* actual_value = getenv (xdg.environmental);
const gchar* home = getenv ("HOME");
gchar* return_value;
if (! actual_value || strcmp (actual_value, "") == 0) {
if (xdg.default_value) {
return_value = str_replace ("~", home, xdg.def... | 0 | 7,446 |
Analyze the following 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_video::omx_cmd_queue::omx_cmd_queue(): m_read(0),m_write(0),m_size(0)
{
memset(m_q,0,sizeof(omx_event)*OMX_CORE_CONTROL_CMDQ_SIZE);
}
Commit Message: DO NOT MERGE mm-video-v4l2: venc: add checks before accessing heap pointers
Heap pointers do not point to user virtual addresses in case
of secure session... | 0 | 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 TestUnpin(
const std::string& resource_id,
const std::string& md5,
base::PlatformFileError expected_error,
int expected_cache_state,
GDataRootDirectory::CacheSubDirectoryType expected_sub_dir_type) {
expected_error_ = expected_error;
expected_cache_state_ = expected_ca... | 0 | 24,588 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static inline unsigned int leaf_data_end(struct btrfs_root *root,
struct extent_buffer *leaf)
{
u32 nr = btrfs_header_nritems(leaf);
if (nr == 0)
return BTRFS_LEAF_DATA_SIZE(root);
return btrfs_item_offset_nr(leaf, nr - 1);
}
Commit Message: Btrfs: make xattr replace operations atomic
Replacing a xat... | 0 | 29,734 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PopupType AutofillManager::GetPopupType(const FormData& form,
const FormFieldData& field) {
const AutofillField* autofill_field = GetAutofillField(form, field);
if (!autofill_field)
return PopupType::kUnspecified;
switch (autofill_field->Type().group()) {
cas... | 0 | 3,650 |
Analyze the following 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(ignore_user_abort)
{
char *arg = NULL;
int arg_len = 0;
int old_setting;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &arg, &arg_len) == FAILURE) {
return;
}
old_setting = PG(ignore_user_abort);
if (arg) {
zend_alter_ini_entry_ex("ignore_user_abort", sizeof("ignore_user_ab... | 0 | 20,872 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ArrayBuffer* XMLHttpRequest::responseArrayBuffer()
{
ASSERT(m_responseTypeCode == ResponseTypeArrayBuffer);
if (m_error || m_state != DONE)
return 0;
if (!m_responseArrayBuffer.get()) {
if (m_binaryResponseBuilder.get() && m_binaryResponseBuilder->size() > 0) {
m_response... | 0 | 11,893 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.