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: av_cold void ff_h263_decode_init_vlc(void)
{
static int done = 0;
if (!done) {
done = 1;
INIT_VLC_STATIC(&ff_h263_intra_MCBPC_vlc, INTRA_MCBPC_VLC_BITS, 9,
ff_h263_intra_MCBPC_bits, 1, 1,
ff_h263_intra_MCBPC_code, 1, 1, 72);
INIT_VLC_STATIC(&ff_h... | 0 | 5,147 |
Analyze the following 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 srpt_aborted_task(struct se_cmd *cmd)
{
struct srpt_send_ioctx *ioctx = container_of(cmd,
struct srpt_send_ioctx, cmd);
srpt_unmap_sg_to_ib_sge(ioctx->ch, ioctx);
}
Commit Message: IB/srpt: Simplify srpt_handle_tsk_mgmt()
Let the target core check task existence instead of the SRP target
driv... | 0 | 16,832 |
Analyze the following 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 DevToolsUIBindings::DocumentOnLoadCompletedInMainFrame() {
#if !BUILDFLAG(DEBUG_DEVTOOLS)
FrontendLoaded();
#endif
}
Commit Message: DevTools: move front-end URL handling to DevToolsUIBindingds
BUG=662859
Review-Url: https://codereview.chromium.org/2607833002
Cr-Commit-Position: refs/heads/master@{#4409... | 0 | 28,855 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void get_futex_key_refs(union futex_key *key)
{
if (!key->both.ptr)
return;
/*
* On MMU less systems futexes are always "private" as there is no per
* process address space. We need the smp wmb nevertheless - yes,
* arch/blackfin has MMU less SMP ...
*/
if (!IS_ENABLED(CONFIG_MMU)) {
smp_mb... | 0 | 29,905 |
Analyze the following 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 QQuickWebViewPrivate::didSameDocumentNavigation()
{
Q_Q(QQuickWebView);
q->emitUrlChangeIfNeeded();
emit q->navigationHistoryChanged();
}
Commit Message: [Qt][WK2] There's no way to test the gesture tap on WTR
https://bugs.webkit.org/show_bug.cgi?id=92895
Reviewed by Kenneth Rohde Christiansen... | 0 | 24,950 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: explicit TabStripDummyDelegate(TabContentsWrapper* dummy)
: dummy_contents_(dummy), can_close_(true), run_unload_(false) {}
Commit Message: chromeos: fix bug where "aw snap" page replaces first tab if it was a NTP when closing window with > 1 tab.
BUG=chromium-os:12088
TEST=verify bug per bug report.
Re... | 0 | 1,645 |
Analyze the following 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 create_history_entry(krb5_context context,
krb5_keyblock *hist_key, int n_key_data,
krb5_key_data *key_data, osa_pw_hist_ent *hist)
{
krb5_error_code ret;
krb5_keyblock key;
krb5_keysalt salt;
int i;
hist->key_data = k5calloc(n_key_data, s... | 0 | 29,989 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int mov_read_header(AVFormatContext *s)
{
MOVContext *mov = s->priv_data;
AVIOContext *pb = s->pb;
int j, err;
MOVAtom atom = { AV_RL32("root") };
int i;
if (mov->decryption_key_len != 0 && mov->decryption_key_len != AES_CTR_KEY_SIZE) {
av_log(s, AV_LOG_ERROR, "Invalid decr... | 0 | 2,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: void Histogram::InitializeBucketRanges(Sample minimum,
Sample maximum,
BucketRanges* ranges) {
double log_max = log(static_cast<double>(maximum));
double log_ratio;
double log_next;
size_t bucket_index = 1;
Sample current = mi... | 0 | 18,537 |
Analyze the following 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::DispatchBeforeUnload() {
bool for_cross_site_transition = false;
GetMainFrame()->DispatchBeforeUnload(for_cross_site_transition, false);
}
Commit Message: If JavaScript shows a dialog, cause the page to lose fullscreen.
BUG=670135, 550017, 726761, 728276
Review-Url: https://codereview... | 0 | 18,835 |
Analyze the following 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 *Type_MPEcurve_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag)
{
cmsStage* mpe = NULL;
cmsUInt16Number InputChans, OutputChans;
cmsUInt32Number i, BaseOffset;
cmsToneCurve** GammaTables;
*nItems = 0;
BaseOffset = io ->... | 0 | 20,692 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: RenderFrameImpl* RenderFrameImpl::Create(
RenderViewImpl* render_view,
int32_t routing_id,
service_manager::mojom::InterfaceProviderPtr interface_provider,
const base::UnguessableToken& devtools_frame_token) {
DCHECK(routing_id != MSG_ROUTING_NONE);
CreateParams params(render_view, routing_id,... | 0 | 18,297 |
Analyze the following 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 FileSystemManagerImpl::Open(const url::Origin& origin,
blink::mojom::FileSystemType file_system_type,
OpenCallback callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (file_system_type == blink::mojom::FileSystemType::kTemporary) {
... | 0 | 26,427 |
Analyze the following 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 initialize_unit_leds(void)
{
/*
* Init the unit LEDs per default they all are
* ok apart from bootstat
*/
uchar buf;
if (i2c_read(BOCO, REG_CTRL_H, 1, &buf, 1) != 0) {
printf("%s: Error reading Boco\n", __func__);
return -1;
}
buf |= MASK_WRL_UNITRUN;
if (i2c_write(BOCO, REG_CTRL_H, 1,... | 0 | 28,968 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: set_directory_hook ()
{
if (dircomplete_expand)
{
rl_directory_completion_hook = bash_directory_completion_hook;
rl_directory_rewrite_hook = (rl_icppfunc_t *)0;
}
else
{
rl_directory_rewrite_hook = bash_directory_completion_hook;
rl_directory_completion_hook = (rl_icppfunc_... | 0 | 23,626 |
Analyze the following 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 megasas_probe_one(struct pci_dev *pdev,
const struct pci_device_id *id)
{
int rval, pos;
struct Scsi_Host *host;
struct megasas_instance *instance;
u16 control = 0;
switch (pdev->device) {
case PCI_DEVICE_ID_LSI_AERO_10E1:
case PCI_DEVICE_ID_LSI_AERO_10E5:
dev_info(&pdev->dev, "Adapte... | 0 | 27,483 |
Analyze the following 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 gpa_t nonpaging_gva_to_gpa(struct kvm_vcpu *vcpu, gva_t vaddr,
u32 access, struct x86_exception *exception)
{
if (exception)
exception->error_code = 0;
return vaddr;
}
Commit Message: nEPT: Nested INVEPT
If we let L1 use EPT, we should probably also support the INVEPT instruction.
In our cur... | 0 | 6,362 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: perf_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
{
struct perf_event *event = file->private_data;
struct perf_event_context *ctx;
int ret;
ctx = perf_event_ctx_lock(event);
ret = __perf_read(event, buf, count);
perf_event_ctx_unlock(event, ctx);
return ret;
}
Commit Message: pe... | 0 | 633 |
Analyze the following 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 vbg_input_open(struct input_dev *input)
{
struct vbg_dev *gdev = input_get_drvdata(input);
u32 feat = VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE | VMMDEV_MOUSE_NEW_PROTOCOL;
int ret;
ret = vbg_core_set_mouse_status(gdev, feat);
if (ret)
return ret;
return 0;
}
Commit Message: virt: vbox: Only copy_from... | 0 | 29,078 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: fz_new_colorspace(fz_context *ctx,
const char *name,
enum fz_colorspace_type type, int flags, int n,
fz_colorspace_convert_fn *to_ccs,
fz_colorspace_convert_fn *from_ccs,
fz_colorspace_base_fn *base,
fz_colorspace_clamp_fn *clamp,
fz_colorspace_destruct_fn *destruct,
void *data, size_t size)
{
fz... | 0 | 2,577 |
Analyze the following 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 MemBackendImpl::DumpMemoryStats(
base::trace_event::ProcessMemoryDump* pmd,
const std::string& parent_absolute_name) const {
base::trace_event::MemoryAllocatorDump* dump =
pmd->CreateAllocatorDump(parent_absolute_name + "/memory_backend");
size_t size = base::trace_event::EstimateMemoryU... | 0 | 27,937 |
Analyze the following 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 *path_init(struct nameidata *nd, unsigned flags)
{
int retval = 0;
const char *s = nd->name->name;
nd->last_type = LAST_ROOT; /* if there are only slashes... */
nd->flags = flags | LOOKUP_JUMPED | LOOKUP_PARENT;
nd->depth = 0;
nd->total_link_count = 0;
if (flags & LOOKUP_ROOT) {
struct... | 0 | 23,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: static void cirrus_vga_write_cr(CirrusVGAState * s, int reg_value)
{
switch (s->vga.cr_index) {
case 0x00: // Standard VGA
case 0x01: // Standard VGA
case 0x02: // Standard VGA
case 0x03: // Standard VGA
case 0x04: // Standard VGA
case 0x05: // Standard VGA
case 0x06: ... | 0 | 18,353 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: xmlCtxtReadFd(xmlParserCtxtPtr ctxt, int fd,
const char *URL, const char *encoding, int options)
{
xmlParserInputBufferPtr input;
xmlParserInputPtr stream;
if (fd < 0)
return (NULL);
if (ctxt == NULL)
return (NULL);
xmlInitParser();
xmlCtxtReset(ctxt);
... | 0 | 28,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: static uint16_t smb1cli_alloc_mid(struct smbXcli_conn *conn)
{
size_t num_pending = talloc_array_length(conn->pending);
uint16_t result;
if (conn->protocol == PROTOCOL_NONE) {
/*
* This is what windows sends on the SMB1 Negprot request
* and some vendors reuse the SMB1 MID as SMB2 sequence number.
... | 0 | 28,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 void emulator_set_segment(struct x86_emulate_ctxt *ctxt, u16 selector,
struct desc_struct *desc, u32 base3,
int seg)
{
struct kvm_vcpu *vcpu = emul_to_vcpu(ctxt);
struct kvm_segment var;
var.selector = selector;
var.base = get_desc_base(desc);
#ifdef CONFIG_X86_64
var.base |= ((u64)base3) <... | 0 | 14,892 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ft_black_init( black_PRaster raster )
{
#ifdef FT_RASTER_OPTION_ANTI_ALIASING
FT_UInt n;
/* set default 5-levels gray palette */
for ( n = 0; n < 5; n++ )
raster->grays[n] = n * 255 / 4;
raster->gray_width = RASTER_GRAY_LINES / 2;
#else
FT_UNUSED( raster );
#endif
}
Commit Me... | 0 | 9,423 |
Analyze the following 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 vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
{
}
Commit Message: vhost: actually track log eventfd file
While reviewing vhost log code, I found out that log_file is never
set. Note: I haven't tested the change (QEMU doesn't use LOG_FD yet).
Cc: stable@vger.kernel.org
Signed-off-by: Marc-André... | 0 | 19,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 mcryptd_hash_finup(struct crypto_async_request *req_async, int err)
{
struct ahash_request *req = ahash_request_cast(req_async);
struct mcryptd_hash_request_ctx *rctx = ahash_request_ctx(req);
if (unlikely(err == -EINPROGRESS))
goto out;
err = shash_ahash_mcryptd_finup(req, &rctx->desc);
if ... | 0 | 18,300 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void ChromeContentBrowserClient::ShowClientCertificateRequestDialog(
int render_process_id,
int render_view_id,
SSLClientAuthHandler* handler) {
TabContents* tab = tab_util::GetTabContentsByID(
render_process_id, render_view_id);
if (!tab) {
NOTREACHED();
return;
}
TabContentsWr... | 0 | 27,732 |
Analyze the following 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 RuntimeCustomBindings::OpenChannelToNativeApp(
const v8::FunctionCallbackInfo<v8::Value>& args) {
Feature::Availability availability =
FeatureProvider::GetPermissionFeatures()
->GetFeature("nativeMessaging")
->IsAvailableToContext(context()->extension(),
... | 0 | 13,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: __weak ulong board_spl_fit_size_align(ulong size)
{
return size;
}
Commit Message: Merge branch '2020-01-22-master-imports'
- Re-add U8500 platform support
- Add bcm968360bg support
- Assorted Keymile fixes
- Other assorted bugfixes
CWE ID: CWE-787 | 0 | 21,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: void BrowserView::DestroyBrowser() {
#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
GetWidget()->GetNativeView()->RemovePreTargetHandler(
ConfirmQuitBubbleController::GetInstance());
#endif
GetWidget()->RemoveObserver(this);
frame_->CloseNow();
}
Commit Message: Mac: turn popups... | 0 | 19,320 |
Analyze the following 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 WebstoreBindings::OnInlineWebstoreInstallResponse(
int install_id,
bool success,
const std::string& error,
webstore_install::Result result) {
v8::Isolate* isolate = context()->isolate();
v8::HandleScope handle_scope(isolate);
v8::Context::Scope context_scope(context()->v8_context());
... | 0 | 29,411 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static PHP_MINIT_FUNCTION(xmlwriter)
{
#ifdef ZEND_ENGINE_2
zend_class_entry ce;
#endif
le_xmlwriter = zend_register_list_destructors_ex(xmlwriter_dtor, NULL, "xmlwriter", module_number);
#ifdef ZEND_ENGINE_2
memcpy(&xmlwriter_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
x... | 0 | 6,836 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: av_cold int avcodec_close(AVCodecContext *avctx)
{
int i;
if (!avctx)
return 0;
if (avcodec_is_open(avctx)) {
FramePool *pool = avctx->internal->pool;
if (CONFIG_FRAME_THREAD_ENCODER &&
avctx->internal->frame_thread_encoder && avctx->thread_count > 1) {
... | 0 | 7,256 |
Analyze the following 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 BrowserView::CanClose() {
if (tabstrip_ && !tabstrip_->IsTabStripCloseable())
return false;
if (!browser_->ShouldCloseWindow())
return false;
if (!browser_->tab_strip_model()->empty()) {
frame_->Hide();
browser_->OnWindowClosing();
return false;
}
content::NotificationService... | 0 | 4,372 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void StringOrNullAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::ToImpl(holder);
V8SetReturnValueStringOrNull(info, impl->stringOrNullAttribute(), info.GetIsolate());
}
Commit Message: bindin... | 0 | 10,515 |
Analyze the following 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 mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw,
struct sk_buff *tx_skb,
struct ieee80211_channel *chan)
{
struct mac80211_hwsim_data *data = hw->priv;
struct sk_buff *skb;
struct hwsim_radiotap_hdr *hdr;
u16 flags;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx_skb);
... | 0 | 25,985 |
Analyze the following 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 tcp_v6_clear_md5_list (struct sock *sk)
{
struct tcp_sock *tp = tcp_sk(sk);
int i;
if (tp->md5sig_info->entries6) {
for (i = 0; i < tp->md5sig_info->entries6; i++)
kfree(tp->md5sig_info->keys6[i].base.key);
tp->md5sig_info->entries6 = 0;
tcp_free_md5sig_pool();
}
kfree(tp->md5sig_info-... | 0 | 20,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: TextRun RenderBlockFlow::constructTextRun(RenderObject* context, const Font& font, const UChar* characters, int length, RenderStyle* style, TextDirection direction, TextRun::ExpansionBehavior expansion)
{
return constructTextRunInternal(context, font, characters, length, style, direction, expansion);
}
Commi... | 0 | 23,109 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() {
window()->ClearProperty(kHostForRootWindow);
wm::SetWindowMoveClient(window(), nullptr);
desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(this);
DestroyDispatcher();
}
Commit Message: Fix PIP window being blank after minimize/show
Desk... | 0 | 25,921 |
Analyze the following 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 emitlocal(JF, int oploc, int opvar, js_Ast *ident)
{
int i;
if (J->strict && oploc == OP_SETLOCAL) {
if (!strcmp(ident->string, "arguments"))
jsC_error(J, ident, "'arguments' is read-only in strict mode");
if (!strcmp(ident->string, "eval"))
jsC_error(J, ident, "'eval' is read-only in stri... | 0 | 8,668 |
Analyze the following 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 read_mem(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
phys_addr_t p = *ppos;
ssize_t read, sz;
void *ptr;
if (p != *ppos)
return 0;
if (!valid_phys_addr_range(p, count))
return -EFAULT;
read = 0;
#ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED
/* we don't have page 0 map... | 1 | 1,885 |
Analyze the following 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 _tg3_flag(enum TG3_FLAGS flag, unsigned long *bits)
{
return test_bit(flag, bits);
}
Commit Message: tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential leng... | 0 | 13,844 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int find_image_format(BlockDriverState *bs, const char *filename,
BlockDriver **pdrv, Error **errp)
{
int score, score_max;
BlockDriver *drv1, *drv;
uint8_t buf[2048];
int ret = 0;
/* Return the raw BlockDriver * to scsi-generic devices or empty drives */
... | 0 | 16,594 |
Analyze the following 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 getCoverageFormat12(vector<uint32_t>& coverage, const uint8_t* data, size_t size) {
const size_t kNGroupsOffset = 12;
const size_t kFirstGroupOffset = 16;
const size_t kGroupSize = 12;
const size_t kStartCharCodeOffset = 0;
const size_t kEndCharCodeOffset = 4;
const size_t kMaxNGroups = 0xffffff... | 1 | 64 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: RestartTestJob(URLRequest* request, NetworkDelegate* network_delegate)
: URLRequestTestJob(request, network_delegate, true) {}
Commit Message: Tests were marked as Flaky.
BUG=151811,151810
TBR=droger@chromium.org,shalev@chromium.org
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/10968052
... | 0 | 7,989 |
Analyze the following 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 OxideQQuickWebView::setPopupMenu(QQmlComponent* popupMenu) {
Q_D(OxideQQuickWebView);
if (d->contents_view_->popupMenu() == popupMenu) {
return;
}
d->contents_view_->setPopupMenu(popupMenu);
emit popupMenuChanged();
}
Commit Message:
CWE ID: CWE-20 | 0 | 28,859 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu)
{
int r;
vcpu->arch.apf.msr_val = 0;
r = vcpu_load(vcpu);
BUG_ON(r);
kvm_mmu_unload(vcpu);
vcpu_put(vcpu);
fx_free(vcpu);
kvm_x86_ops->vcpu_free(vcpu);
}
Commit Message: KVM: x86: Convert vapic synchronization to _cached functions (CVE-2013-6368)
In kv... | 0 | 27,033 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int sctp_getsockopt_peer_addrs_old(struct sock *sk, int len,
char __user *optval,
int __user *optlen)
{
struct sctp_association *asoc;
struct list_head *pos;
int cnt = 0;
struct sctp_getaddrs_old getaddrs;
struct sctp_transport *from;
void __user *to;
union sctp_addr temp;
struct sctp... | 0 | 19,312 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: mk_ptr_t mk_request_header_get(struct headers_toc *toc, const char *key_name, int key_len)
{
int i;
struct header_toc_row *row;
mk_ptr_t var;
var.data = NULL;
var.len = 0;
row = toc->rows;
for (i = 0; i < toc->length; i++) {
/*
* status = 1 means that the toc entry ... | 0 | 25,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: void TestWebKitPlatformSupport::prefetchHostName(const WebKit::WebString&) {
}
Commit Message: Use a new scheme for swapping out RenderViews.
BUG=118664
TEST=none
Review URL: http://codereview.chromium.org/9720004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127986 0039d316-1c4b-4281-b951-d872f2087c98... | 0 | 91 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void ChildProcessSecurityPolicyImpl::GrantWebUIBindings(int child_id) {
base::AutoLock lock(lock_);
SecurityStateMap::iterator state = security_state_.find(child_id);
if (state == security_state_.end())
return;
state->second->GrantBindings(BINDINGS_POLICY_WEB_UI);
state->second->GrantScheme(chrom... | 0 | 13,008 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: key_ref_t key_create_or_update(key_ref_t keyring_ref,
const char *type,
const char *description,
const void *payload,
size_t plen,
key_perm_t perm,
unsigned long flags)
{
struct keyring_index_key index_key = {
.description = description,
};
struct k... | 1 | 5,042 |
Analyze the following 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 scroll_end() const { return scroll_end_; }
Commit Message: Pass ui::LatencyInfo correct with unified gesture detector on Aura.
BUG=379812
TEST=GestureRecognizerTest.LatencyPassedFromTouchEvent
Review URL: https://codereview.chromium.org/309823002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2746... | 0 | 27,083 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void BackTexture::Destroy() {
if (image_) {
DCHECK(texture_ref_);
ScopedTextureBinder binder(&decoder_->state_, decoder_->error_state_.get(),
id(), Target());
DestroyNativeGpuMemoryBuffer(true);
}
if (texture_ref_) {
ScopedGLErrorSuppressor suppressor("BackTex... | 0 | 5,265 |
Analyze the following 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 advance(struct pt_regs *regs)
{
regs->pc = regs->npc;
regs->npc += 4;
}
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, we would set some state and self-IPI and let ... | 0 | 3,142 |
Analyze the following 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 get_data_to_compute(struct crypto_cipher *tfm,
struct crypto_ccm_req_priv_ctx *pctx,
struct scatterlist *sg, unsigned int len)
{
struct scatter_walk walk;
u8 *data_src;
int n;
scatterwalk_start(&walk, sg);
while (len) {
n = scatterwalk_clamp(&walk, len);
if (!n) {
sca... | 0 | 13,511 |
Analyze the following 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 GetOneVirtualMethodPixel(const Image *image,
const VirtualPixelMethod virtual_pixel_method,const ssize_t x,const ssize_t y,
PixelPacket *pixel,ExceptionInfo *exception)
{
CacheInfo
*restrict cache_info;
const int
id = GetOpenMPThreadId();
const PixelPacket
*r... | 0 | 22,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: WebPluginContainerImpl* LocalFrame::GetWebPluginContainer(Node* node) const {
if (GetDocument() && GetDocument()->IsPluginDocument()) {
return ToPluginDocument(GetDocument())->GetPluginView();
}
if (!node) {
DCHECK(GetDocument());
node = GetDocument()->FocusedElement();
}
if (node) {
re... | 0 | 10,594 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: TabStyle::TabColors GM2TabStyle::CalculateColors() const {
const ui::ThemeProvider* theme_provider = tab_->GetThemeProvider();
constexpr float kMinimumActiveContrastRatio = 6.05f;
constexpr float kMinimumInactiveContrastRatio = 4.61f;
constexpr float kMinimumHoveredContrastRatio = 5.02f;
constexpr floa... | 1 | 3,121 |
Analyze the following 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 aead_len(struct xfrm_algo_aead *alg)
{
return sizeof(*alg) + ((alg->alg_key_len + 7) / 8);
}
Commit Message: xfrm_user: return error pointer instead of NULL
When dump_one_state() returns an error, e.g. because of a too small
buffer to dump the whole xfrm state, xfrm_state_netlink() returns NU... | 0 | 16,433 |
Analyze the following 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::HandleBindAttribLocationImmediate(
uint32 immediate_data_size, const gles2::BindAttribLocationImmediate& c) {
GLuint program = static_cast<GLuint>(c.program);
GLuint index = static_cast<GLuint>(c.index);
uint32 name_size = c.data_size;
const char* name = GetImmediateData... | 0 | 23,338 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int netlink_attachskb(struct sock *sk, struct sk_buff *skb,
long *timeo, struct sock *ssk)
{
struct netlink_sock *nlk;
nlk = nlk_sk(sk);
if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf ||
test_bit(0, &nlk->state)) {
DECLARE_WAITQUEUE(wait, current);
if (!*timeo) {
if (!ssk || netlink_... | 0 | 1,101 |
Analyze the following 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 adjust_tsc_offset_host(struct kvm_vcpu *vcpu, s64 adjustment)
{
if (vcpu->arch.tsc_scaling_ratio != kvm_default_tsc_scaling_ratio)
WARN_ON(adjustment < 0);
adjustment = kvm_scale_tsc(vcpu, (u64) adjustment);
kvm_x86_ops->adjust_tsc_offset_guest(vcpu, adjustment);
}
Commit Message: KVM: x8... | 0 | 26,776 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void check_preempt_curr(struct rq *rq, struct task_struct *p, int flags)
{
const struct sched_class *class;
if (p->sched_class == rq->curr->sched_class) {
rq->curr->sched_class->check_preempt_curr(rq, p, flags);
} else {
for_each_class(class) {
if (class == rq->curr->sched_class)
break;
i... | 0 | 19,694 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderFrameHostImpl::ResetNavigationRequests() {
navigation_request_.reset();
same_document_navigation_request_.reset();
navigation_requests_.clear();
}
Commit Message: Convert FrameHostMsg_DidAddMessageToConsole to Mojo.
Note: Since this required changing the test
RenderViewImplTest.DispatchBeforeUn... | 0 | 14,549 |
Analyze the following 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 setHasMarginBeforeQuirk(bool b) { m_hasMarginBeforeQuirk = b; }
Commit Message: Separate repaint and layout requirements of StyleDifference (Step 1)
Previously StyleDifference was an enum that proximately bigger values
imply smaller values (e.g. StyleDifferenceLayout implies
StyleDifferenceRepaint). Th... | 0 | 5,423 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: DEFINE_RUN_ONCE_STATIC_ALT(ossl_init_no_config, ossl_init_config)
{
#ifdef OPENSSL_INIT_DEBUG
fprintf(stderr,
"OPENSSL_INIT: ossl_init_config: openssl_no_config_int()\n");
#endif
openssl_no_config_int();
config_inited = 1;
return 1;
}
Commit Message:
CWE ID: CWE-330 | 0 | 21,614 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void GLES2DecoderImpl::DoDisableVertexAttribArray(GLuint index) {
if (state_.vertex_attrib_manager->Enable(index, false)) {
if (index != 0 || gl_version_info().BehavesLikeGLES()) {
state_.vertex_attrib_manager->SetDriverVertexAttribEnabled(index, false);
}
} else {
LOCAL_SET_GL_ERROR(
... | 0 | 21,288 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: DevToolsSession::DevToolsSession(DevToolsAgentHostImpl* agent_host,
DevToolsAgentHostClient* client)
: binding_(this),
agent_host_(agent_host),
client_(client),
process_host_id_(ChildProcessHost::kInvalidUniqueID),
host_(nullptr),
dispatche... | 1 | 14,826 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ImageBitmap::ImageBitmap(HTMLVideoElement* video,
Optional<IntRect> cropRect,
Document* document,
const ImageBitmapOptions& options) {
IntSize playerSize;
if (video->webMediaPlayer())
playerSize = video->webMediaPlayer()->naturalSi... | 0 | 94 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: String AXObject::computedName() const {
AXNameFrom nameFrom;
AXObject::AXObjectVector nameObjects;
return name(nameFrom, &nameObjects);
}
Commit Message: Switch to equalIgnoringASCIICase throughout modules/accessibility
BUG=627682
Review-Url: https://codereview.chromium.org/2793913007
Cr-Commit-Position:... | 0 | 20,396 |
Analyze the following 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 BrowserWindowGtk::IsBookmarkBarSupported() const {
return browser_->SupportsWindowFeature(Browser::FEATURE_BOOKMARKBAR);
}
Commit Message: Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.appspot.com/11293205
git-svn... | 0 | 3,022 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool SkipConditionalFeatureEntry(const FeatureEntry& entry) {
version_info::Channel channel = chrome::GetChannel();
#if defined(OS_CHROMEOS)
if (!strcmp("mash", entry.internal_name) &&
channel == version_info::Channel::STABLE) {
return true;
}
if (!strcmp(ui_devtools::switches::kEnableUiDevTool... | 0 | 1,242 |
Analyze the following 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 RAND_DRBG_reseed(RAND_DRBG *drbg,
const unsigned char *adin, size_t adinlen,
int prediction_resistance)
{
unsigned char *entropy = NULL;
size_t entropylen = 0;
if (drbg->state == DRBG_ERROR) {
RANDerr(RAND_F_RAND_DRBG_RESEED, RAND_R_IN_ERROR_STATE... | 0 | 9,657 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ScopedRenderBufferBinder::~ScopedRenderBufferBinder() {
ScopedGLErrorSuppressor suppressor(decoder_);
decoder_->RestoreCurrentRenderbufferBindings();
}
Commit Message: Revert "Revert 100494 - Fix bug in SimulateAttrib0."""
TEST=none
BUG=95625
TBR=apatrick@chromium.org
Review URL: http://codereview.chromium... | 0 | 6,732 |
Analyze the following 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 Mem *columnNullValue(void){
/* Even though the Mem structure contains an element
** of type i64, on certain architectures (x86) with certain compiler
** switches (-Os), gcc may align this Mem object on a 4-byte boundary
** instead of an 8-byte one. This all works fine, except that when
** r... | 0 | 26,516 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderFrameImpl::didReceiveResponse(
blink::WebLocalFrame* frame,
unsigned identifier,
const blink::WebURLResponse& response) {
DCHECK(!frame_ || frame_ == frame);
if (!frame->provisionalDataSource() || frame->parent())
return;
if (frame->isViewSourceModeEnabled())
return;
Docum... | 0 | 25,231 |
Analyze the following 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 do_wait_thread(struct wait_opts *wo, struct task_struct *tsk)
{
struct task_struct *p;
list_for_each_entry(p, &tsk->children, sibling) {
int ret = wait_consider_task(wo, 0, p);
if (ret)
return ret;
}
return 0;
}
Commit Message: fix infoleak in waitid(2)
kernel_waitid() can return a PID,... | 0 | 9,289 |
Analyze the following 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_note_info(struct elf_note_info *info,
struct file *file, loff_t *foffset)
{
int i;
struct list_head *t;
for (i = 0; i < info->numnote; i++)
if (!writenote(info->notes + i, file, foffset))
return 0;
/* write out the thread status notes section */
list_for_each(t, &info->thread_li... | 0 | 27,010 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void TabStripModel::SelectLastTab() {
ActivateTabAt(count() - 1, true);
}
Commit Message: chromeos: fix bug where "aw snap" page replaces first tab if it was a NTP when closing window with > 1 tab.
BUG=chromium-os:12088
TEST=verify bug per bug report.
Review URL: http://codereview.chromium.org/6882058
git-sv... | 0 | 21,342 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: gs_getdefaultlibdevice(gs_memory_t *mem)
{
const gx_device *const *list;
int count = gs_lib_device_list(&list, NULL);
const char *name, *end, *fin;
int i;
/* Search the compiled in device list for a known device name */
/* In the case the lib ctx hasn't been initialised */
if (mem && ... | 0 | 23,925 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void xen_pcibk_config_free_dyn_fields(struct pci_dev *dev)
{
struct xen_pcibk_dev_data *dev_data = pci_get_drvdata(dev);
struct config_field_entry *cfg_entry, *t;
const struct config_field *field;
dev_dbg(&dev->dev, "free-ing dynamically allocated virtual "
"configuration space fields\n");
if (!dev_da... | 0 | 10,548 |
Analyze the following 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 efx_fini_struct(struct efx_nic *efx)
{
int i;
for (i = 0; i < EFX_MAX_CHANNELS; i++)
kfree(efx->channel[i]);
if (efx->workqueue) {
destroy_workqueue(efx->workqueue);
efx->workqueue = NULL;
}
}
Commit Message: sfc: Fix maximum number of TSO segments and minimum TX queue size
[ Upstream co... | 0 | 13,459 |
Analyze the following 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(cpSeparate2ContigByRow)
{
tsize_t scanlinesizein = TIFFScanlineSize(in);
tsize_t scanlinesizeout = TIFFScanlineSize(out);
tdata_t inbuf;
tdata_t outbuf;
register uint8 *inp, *outp;
register uint32 n;
uint32 row;
tsample_t s;
inbuf = _TIFFmalloc(scanlinesizein);
outbuf = _TIFFmalloc(scanli... | 0 | 28,386 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ecall(mrb_state *mrb)
{
struct RProc *p;
struct mrb_context *c = mrb->c;
mrb_callinfo *ci = c->ci;
struct RObject *exc;
struct REnv *env;
ptrdiff_t cioff;
int ai = mrb_gc_arena_save(mrb);
int i = --c->eidx;
int nregs;
if (i<0) return;
if (ci - c->cibase > MRB_ECALL_DEPTH_MAX) {
mrb_exc_... | 0 | 11,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: void VerifyFormInteractionUkm(const ukm::TestAutoSetUkmRecorder& ukm_recorder,
const FormData& form,
const char* event_name,
const ExpectedUkmMetrics& expected_metrics) {
auto entries = ukm_recorder.GetEntriesByName(event_... | 0 | 22,976 |
Analyze the following 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 jswrap_graphics_drawLine(JsVar *parent, int x1, int y1, int x2, int y2) {
JsGraphics gfx; if (!graphicsGetFromVar(&gfx, parent)) return;
graphicsDrawLine(&gfx, (short)x1,(short)y1,(short)x2,(short)y2);
graphicsSetVar(&gfx); // gfx data changed because modified area
}
Commit Message: Add height check f... | 0 | 12,164 |
Analyze the following 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 RenderWidgetHostImpl::SetIntersectsViewport(bool intersects) {
if (intersects_viewport_ == intersects)
return;
intersects_viewport_ = intersects;
UpdatePriority();
}
Commit Message: Start rendering timer after first navigation
Currently the new content rendering timer in the browser process,
whi... | 0 | 20,393 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PPVarArrayFromNPVariantArray::PPVarArrayFromNPVariantArray(
PluginInstance* instance,
size_t size,
const NPVariant* variants)
: size_(size) {
if (size_ > 0) {
array_.reset(new PP_Var[size_]);
for (size_t i = 0; i < size_; i++)
array_[i] = Var::NPVariantToPPVar(instance, &variants[i... | 0 | 5,955 |
Analyze the following 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 analyzeAggregatesInSelect(Walker *pWalker, Select *pSelect){
UNUSED_PARAMETER(pSelect);
pWalker->walkerDepth++;
return WRC_Continue;
}
Commit Message: sqlite: backport bugfixes for dbfuzz2
Bug: 952406
Change-Id: Icbec429742048d6674828726c96d8e265c41b595
Reviewed-on: https://chromium-review.goog... | 0 | 25,610 |
Analyze the following 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 MSLExternalSubset(void *context,const xmlChar *name,
const xmlChar *external_id,const xmlChar *system_id)
{
MSLInfo
*msl_info;
xmlParserCtxt
parser_context;
xmlParserCtxtPtr
parser;
xmlParserInputPtr
input;
/*
Does this document has an external subset?
*/
(void)... | 0 | 3,344 |
Analyze the following 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 BROTLI_INLINE uint32_t Log2Floor(uint32_t x) {
uint32_t result = 0;
while (x) {
x >>= 1;
++result;
}
return result;
}
Commit Message: Cherry pick underflow fix.
BUG=583607
Review URL: https://codereview.chromium.org/1662313002
Cr-Commit-Position: refs/heads/master@{#373736}
CWE ID: CWE-... | 0 | 20,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: static int cms_signerinfo_verify_cert(CMS_SignerInfo *si,
X509_STORE *store,
STACK_OF(X509) *certs,
STACK_OF(X509_CRL) *crls)
{
X509_STORE_CTX *ctx = X509_STORE_CTX_new();
X509 *signer;
in... | 0 | 23,624 |
Analyze the following 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 bd_copy(UINT8* dest, UINT8* src, BOOLEAN swap)
{
if (swap) {
int i;
for (i =0; i < 6 ;i++)
dest[i]= src[5-i];
}
else memcpy(dest, src, 6);
}
Commit Message: DO NOT MERGE Fix potential DoS caused by delivering signal to BT process
Bug: 28885210
Change-Id: I63866d894bfca47464d6... | 0 | 19,215 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: DevToolsWindow* DevToolsWindow::AsDevToolsWindow(
content::WebContents* web_contents) {
if (!web_contents || g_instances == NULL)
return NULL;
DevToolsWindows* instances = g_instances.Pointer();
for (DevToolsWindows::iterator it(instances->begin()); it != instances->end();
++it) {
if ((*i... | 0 | 23,620 |
Analyze the following 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 bool vmsvga_verify_rect(DisplaySurface *surface,
const char *name,
int x, int y, int w, int h)
{
if (x < 0) {
fprintf(stderr, "%s: x was < 0 (%d)\n", name, x);
return false;
}
if (x > SVGA_MAX_WID... | 0 | 10,596 |
Analyze the following 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 TabStripModel::IsNewTabAtEndOfTabStrip(TabContents* contents) const {
const GURL& url = contents->web_contents()->GetURL();
return url.SchemeIs(chrome::kChromeUIScheme) &&
url.host() == chrome::kChromeUINewTabHost &&
contents == GetTabContentsAtImpl(count() - 1) &&
contents->we... | 0 | 14,612 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.