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: pause_tube_peek()
{
int i;
tube t, nt = NULL;
for (i = 0; i < tubes.used; i++) {
t = tubes.items[i];
if (t->pause) {
if (!nt || t->deadline_at < nt->deadline_at) nt = t;
}
}
return nt;
}
Commit Message: Discard job body bytes if the job is too big.
Previ... | 0 | 6,980 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int rds_ib_xmit_rdma(struct rds_connection *conn, struct rm_rdma_op *op)
{
struct rds_ib_connection *ic = conn->c_transport_data;
struct rds_ib_send_work *send = NULL;
struct rds_ib_send_work *first;
struct rds_ib_send_work *prev;
struct ib_send_wr *failed_wr;
struct scatterlist *scat;
unsigned long len;
... | 0 | 8,479 |
Analyze the following 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 compileoptionusedFunc(
sqlite3_context *context,
int argc,
sqlite3_value **argv
){
const char *zOptName;
assert( argc==1 );
UNUSED_PARAMETER(argc);
/* IMP: R-39564-36305 The sqlite_compileoption_used() SQL
** function is a wrapper around the sqlite3_compileoption_used() C/C++
** func... | 0 | 618 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: select_opt_map(OptMap* now, OptMap* alt)
{
static int z = 1<<15; /* 32768: something big value */
int vn, va;
if (alt->value == 0) return ;
if (now->value == 0) {
copy_opt_map(now, alt);
return ;
}
vn = z / now->value;
va = z / alt->value;
if (comp_distance_value(&now->mmd, &alt->mmd, v... | 0 | 5,140 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: notify_script_compare(notify_script_t *a, notify_script_t *b)
{
int i;
if (a->num_args != b->num_args)
return false;
for (i = 0; i < a->num_args; i++) {
if (strcmp(a->args[i], b->args[i]))
return false;
}
return true;
}
Commit Message: When opening files for write, ensure they aren't symbolic links... | 0 | 1,108 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: TextCheckerClient* EditorClientBlackBerry::textChecker()
{
return this;
}
Commit Message: [BlackBerry] Prevent text selection inside Colour and Date/Time input fields
https://bugs.webkit.org/show_bug.cgi?id=111733
Reviewed by Rob Buis.
PR 305194.
Prevent selection for popup input fields as they are button... | 0 | 16,329 |
Analyze the following 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 color_table_compare(const void *lhs, const void *rhs)
{
return av_strcasecmp(lhs, ((const ColorEntry *)rhs)->name);
}
Commit Message: avcodec/xpmdec: Fix multiple pointer/memory issues
Most of these were found through code review in response to
fixing 1466/clusterfuzz-testcase-minimized-596158441... | 0 | 8,169 |
Analyze the following 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 AutofillPopupViewNativeViews::Hide() {
controller_ = nullptr;
DoHide();
}
Commit Message: [Autofill] Remove AutofillPopupViewViews and associated feature.
Bug: 906135,831603
Change-Id: I3c982f8b3ffb4928c7c878e74e10113999106499
Reviewed-on: https://chromium-review.googlesource.com/c/1387124
Reviewed-by... | 0 | 20,191 |
Analyze the following 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 UsbChooserContext::GetDevice(
const std::string& guid,
device::mojom::UsbDeviceRequest device_request,
device::mojom::UsbDeviceClientPtr device_client) {
EnsureConnectionWithDeviceManager();
device_manager_->GetDevice(guid, std::move(device_request),
std::move(dev... | 0 | 9,958 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: AwContents::GetMessagePortMessageFilter() {
if (message_port_message_filter_.get() == nullptr) {
message_port_message_filter_ =
new AwMessagePortMessageFilter(
web_contents_->GetMainFrame()->GetRoutingID());
web_contents_->GetRenderProcessHost()->AddFilter(
message_port_messa... | 0 | 15,591 |
Analyze the following 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 rtecp_logout(sc_card_t *card)
{
sc_apdu_t apdu;
int r;
assert(card && card->ctx);
sc_format_apdu(card, &apdu, SC_APDU_CASE_1, 0x40, 0, 0);
apdu.cla = 0x80;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, SC_LOG_DEBUG_NORMAL, r, "APDU transmit failed");
r = sc_check_sw(card, apdu.sw1,... | 0 | 28,770 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: UWORD32 ih264d_unpack_luma_coeff8x8_mb(dec_struct_t * ps_dec,
dec_mb_info_t * ps_cur_mb_info)
{
WORD32 blk_8x8_cnt;
WORD16 *pi2_out_coeff_data = ps_dec->pi2_coeff_data;
UWORD8 u1_field_coding_flag = ps_cur_mb_info->ps_curmb->u1_mb_fld;
UWORD8 *pu1_inv_scan;
UWORD32 u4_luma_dc_only_cbp = 0;
... | 0 | 21,124 |
Analyze the following 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 NavigationRequest::UpdateCommitNavigationParamsHistory() {
NavigationController* navigation_controller =
frame_tree_node_->navigator()->GetController();
commit_params_.current_history_list_offset =
navigation_controller->GetCurrentEntryIndex();
commit_params_.current_history_list_length =
... | 0 | 4,096 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: RenderFrameDevToolsAgentHost::RenderFrameDevToolsAgentHost(
FrameTreeNode* frame_tree_node)
: DevToolsAgentHostImpl(frame_tree_node->devtools_frame_token().ToString()),
frame_tree_node_(nullptr) {
SetFrameTreeNode(frame_tree_node);
frame_host_ = frame_tree_node->current_frame_host();
render_fr... | 0 | 24,958 |
Analyze the following 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 PermissionsData::ShouldSkipPermissionWarnings(
const std::string& extension_id) {
return extension_id == extension_misc::kProdHangoutsExtensionId;
}
Commit Message: [Extensions] Restrict tabs.captureVisibleTab()
Modify the permissions for tabs.captureVisibleTab(). Instead of just
checking for <all_ur... | 0 | 24,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: GF_Err gf_sm_aggregate(GF_SceneManager *ctx, u16 ESID)
{
GF_Err e;
u32 i, stream_count;
#ifndef GPAC_DISABLE_VRML
u32 j;
GF_AUContext *au;
GF_Command *com;
#endif
e = GF_OK;
#if DEBUG_RAP
com_count = 0;
stream_count = gf_list_count(ctx->streams);
for (i=0; i<stream_count; i++) {
GF_StreamContext *sc ... | 0 | 1,100 |
Analyze the following 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 CanRemoveUser(const user_manager::User* user) {
const bool is_single_user =
user_manager::UserManager::Get()->GetUsers().size() == 1;
if (is_single_user && !IsEnterpriseManaged())
return false;
if (!user->GetAccountId().is_valid())
return false;
if (user->GetAccountId() == GetOwnerAcco... | 0 | 20,015 |
Analyze the following 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 StripImage(Image *image)
{
MagickBooleanType
status;
assert(image != (Image *) NULL);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
DestroyImageProfiles(image);
(void) DeleteImageProperty(image,"comment");
(void) Del... | 0 | 26,026 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int jbd2_journal_stop(handle_t *handle)
{
transaction_t *transaction = handle->h_transaction;
journal_t *journal = transaction->t_journal;
int err, wait_for_commit = 0;
tid_t tid;
pid_t pid;
J_ASSERT(journal_current_handle() == handle);
if (is_handle_aborted(handle))
err = -EIO;
else {
J_ASSERT(atom... | 0 | 2,336 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static size_t WritePSDChannel(const PSDInfo *psd_info,
const ImageInfo *image_info,Image *image,Image *next_image,
const QuantumType quantum_type, unsigned char *compact_pixels,
MagickOffsetType size_offset,const MagickBooleanType separate,
ExceptionInfo *exception)
{
int
y;
MagickBooleanType
... | 0 | 27,475 |
Analyze the following 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 HistoryCommitType LoadTypeToCommitType(FrameLoadType type) {
switch (type) {
case kFrameLoadTypeStandard:
return kStandardCommit;
case kFrameLoadTypeInitialInChildFrame:
case kFrameLoadTypeInitialHistoryLoad:
return kInitialCommitInChildFrame;
case kFrameLoadTypeBackForward:
... | 0 | 12,445 |
Analyze the following 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 ohci_sysbus_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = ohci_realize_pxa;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
dc->desc = "OHCI USB Controller";
dc->props = ohci_sysbus_properties;
dc->reset = usb_ohci_reset_sysbus... | 0 | 8,681 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static v8::Handle<v8::Value> booleanSequenceAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.TestObj.booleanSequenceAttr._get");
TestObj* imp = V8TestObj::toNative(info.Holder());
return v8Array(imp->booleanSequenceAttr(), info.GetIsolate());
}
Commit Message:... | 0 | 11,420 |
Analyze the following 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 iref_dump(GF_Box *a, FILE * trace)
{
GF_ItemReferenceBox *p = (GF_ItemReferenceBox *)a;
gf_isom_box_dump_start(a, "ItemReferenceBox", trace);
fprintf(trace, ">\n");
gf_isom_box_array_dump(p->references, trace);
gf_isom_box_dump_done("ItemReferenceBox", a, trace);
return GF_OK;
}
Commit Message: fixe... | 0 | 3,891 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ref_param_read_array(iparam_list * plist, gs_param_name pkey, iparam_loc * ploc)
{
int code = ref_param_read(plist, pkey, ploc, -1);
if (code != 0)
return code;
if (!r_is_array(ploc->pvalue))
return iparam_note_error(*ploc, gs_error_typecheck);
iparam_check_read(*ploc);
return... | 0 | 29,906 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static MagickBooleanType WriteTXTImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
char
buffer[MagickPathExtent],
colorspace[MagickPathExtent],
tuple[MagickPathExtent];
MagickBooleanType
status;
MagickOffsetType
scene;
PixelInfo
pixel;
register con... | 1 | 17,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: static int kvm_vm_ioctl_deassign_device(struct kvm *kvm,
struct kvm_assigned_pci_dev *assigned_dev)
{
int r = 0;
struct kvm_assigned_dev_kernel *match;
mutex_lock(&kvm->lock);
match = kvm_find_assigned_dev(&kvm->arch.assigned_dev_head,
assigned_dev->assigned_dev_id);
if (!match) {
printk(KERN... | 0 | 17,517 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void OnGetRunningPath(drive::FileError error,
const base::FilePath& file_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (error != drive::FILE_ERROR_OK) {
StartParseFileInfo(false);
return;
}
drive::FileSystemInterface* const file_system =
... | 0 | 12,041 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: _asn1_set_value_m (asn1_node node, void *value, unsigned int len)
{
if (node == NULL)
return node;
if (node->value)
{
if (node->value != node->small_value)
free (node->value);
node->value = NULL;
node->value_len = 0;
}
if (!len)
return node;
node->value = value;
nod... | 0 | 7,963 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void Part::slotShowContextMenu()
{
if (!factory()) {
return;
}
QMenu *popup = static_cast<QMenu *>(factory()->container(QStringLiteral("context_menu"), this));
popup->popup(QCursor::pos());
}
Commit Message:
CWE ID: CWE-78 | 0 | 18,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: static void CustomGetterImplementedAsLongAttributeAttributeSetter(
v8::Local<v8::Value> v8_value, const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
ALLOW_UNUSED_LOCAL(isolate);
v8::Local<v8::Object> holder = info.Holder();
ALLOW_UNUSED_LOCAL(holder);
Test... | 0 | 29,356 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: AccessibilityRole AXTableCell::determineAccessibilityRole() {
if (!isTableCell())
return AXLayoutObject::determineAccessibilityRole();
return scanToDecideHeaderRole();
}
Commit Message: Switch to equalIgnoringASCIICase throughout modules/accessibility
BUG=627682
Review-Url: https://codereview.chromium... | 0 | 5,993 |
Analyze the following 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 DownloadManagerImpl::SetDelegate(DownloadManagerDelegate* delegate) {
delegate_ = delegate;
if (initialized_ || in_progress_cache_initialized_)
return;
base::RepeatingClosure post_init_callback = base::BindRepeating(
&DownloadManagerImpl::PostInitialization, weak_factory_.GetWeakPtr(),
... | 0 | 28,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: void* DupNamedColorList(cmsStage* mpe)
{
cmsNAMEDCOLORLIST* List = (cmsNAMEDCOLORLIST*) mpe ->Data;
return cmsDupNamedColorList(List);
}
Commit Message: Non happy-path fixes
CWE ID: | 0 | 21,449 |
Analyze the following 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 InspectorPageAgent::Will(const probe::UpdateLayout&) {}
Commit Message: DevTools: send proper resource type in Network.RequestWillBeSent
This patch plumbs resoure type into the DispatchWillSendRequest
instrumenation. This allows us to report accurate type in
Network.RequestWillBeSent event, instead of "Oth... | 0 | 27,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: WORD32 ihevcd_set_default_params(codec_t *ps_codec)
{
WORD32 ret = IV_SUCCESS;
ps_codec->e_pic_skip_mode = IVD_SKIP_NONE;
ps_codec->i4_strd = 0;
ps_codec->i4_disp_strd = 0;
ps_codec->i4_header_mode = 0;
ps_codec->e_pic_out_order = IVD_DISPLAY_FRAME_OUT;
return ret;
}
Commit Message: De... | 0 | 12,738 |
Analyze the following 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 DebugRepaint(ttfFont *ttf)
{
}
Commit Message:
CWE ID: CWE-125 | 0 | 2,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: add_xml_comment(xmlNode * parent, xmlNode * target, xmlNode * update)
{
CRM_CHECK(update != NULL, return 0);
CRM_CHECK(update->type == XML_COMMENT_NODE, return 0);
if (target == NULL) {
target = find_xml_comment(parent, update);
}
if (target == NULL) {
add_node_copy(pare... | 0 | 1,488 |
Analyze the following 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::HandleWaitAllAsyncTexImage2DCHROMIUM(
uint32 immediate_data_size, const cmds::WaitAllAsyncTexImage2DCHROMIUM& c) {
TRACE_EVENT0("gpu", "GLES2DecoderImpl::HandleWaitAsyncTexImage2DCHROMIUM");
GetAsyncPixelTransferManager()->WaitAllAsyncTexImage2D();
ProcessFinishedAsyncTra... | 0 | 26,896 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: AudioMixerAlsa::AudioMixerAlsa()
: min_volume_db_(kDefaultMinVolumeDb),
max_volume_db_(kDefaultMaxVolumeDb),
volume_db_(kDefaultVolumeDb),
is_muted_(false),
apply_is_pending_(true),
alsa_mixer_(NULL),
pcm_element_(NULL),
prefs_(NULL),
disconnected_event_(true, f... | 0 | 18,615 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
imp->activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
}
Commit Message: document.location bin... | 0 | 25,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 bool spd_can_coalesce(const struct splice_pipe_desc *spd,
struct page *page,
unsigned int offset)
{
return spd->nr_pages &&
spd->pages[spd->nr_pages - 1] == page &&
(spd->partial[spd->nr_pages - 1].offset +
spd->partial[spd->nr_pages - 1].len == offset);
}
Commit Message: skbuff: s... | 0 | 18,359 |
Analyze the following 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 OmniboxViewWin::OnMouseWheel(UINT flags, short delta, CPoint point) {
if (!ui::RerouteMouseWheel(m_hWnd, MAKEWPARAM(flags, delta),
MAKELPARAM(point.x, point.y)))
SetMsgHandled(false);
return 0;
}
Commit Message: Change omnibox behavior when stripping javascript schema to... | 0 | 22,540 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderFrameImpl::didReceiveTitle(blink::WebLocalFrame* frame,
const blink::WebString& title,
blink::WebTextDirection direction) {
DCHECK(!frame_ || frame_ == frame);
render_view_->didReceiveTitle(frame, title, direction);
}
Comm... | 0 | 17,360 |
Analyze the following 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 RenderFrameObserverNatives::OnDocumentElementCreated(
const v8::FunctionCallbackInfo<v8::Value>& args) {
CHECK(args.Length() == 2);
CHECK(args[0]->IsInt32());
CHECK(args[1]->IsFunction());
int frame_id = args[0]->Int32Value();
content::RenderFrame* frame = content::RenderFrame::FromRouting... | 1 | 11,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: void ExpandableContainerView::AnimationProgressed(
const gfx::Animation* animation) {
DCHECK_EQ(&slide_animation_, animation);
if (details_view_)
details_view_->AnimateToState(animation->GetCurrentValue());
}
Commit Message: Make the webstore inline install dialog be tab-modal
Also clean up a few mi... | 0 | 2,888 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses,
const struct nls_table *nls_cp)
{
struct smb2_sess_setup_req *req;
struct smb2_sess_setup_rsp *rsp = NULL;
struct kvec iov[2];
int rc = 0;
int resp_buftype;
__le32 phase = NtLmNegotiate; /* NTLMSSP, if needed, is multistage */
struct TCP_Serve... | 0 | 2,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: static int init_wvx_bitstream (WavpackStream *wps, WavpackMetadata *wpmd)
{
unsigned char *cp = wpmd->data;
if (wpmd->byte_length <= 4 || (wpmd->byte_length & 1))
return FALSE;
wps->crc_wvx = *cp++;
wps->crc_wvx |= (int32_t) *cp++ << 8;
wps->crc_wvx |= (int32_t) *cp++ << 16;
wps-... | 0 | 19,868 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void vmw_hw_surface_destroy(struct vmw_resource *res)
{
struct vmw_private *dev_priv = res->dev_priv;
struct vmw_surface *srf;
void *cmd;
if (res->func->destroy == vmw_gb_surface_destroy) {
(void) vmw_gb_surface_destroy(res);
return;
}
if (res->id != -1) {
cmd = vmw_fifo_reserve(dev_priv, v... | 0 | 17,139 |
Analyze the following 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::SetCommitCallbackInterceptorForTesting(
CommitCallbackInterceptor* interceptor) {
DCHECK(!commit_callback_interceptor_ || !interceptor);
commit_callback_interceptor_ = interceptor;
}
Commit Message: Convert FrameHostMsg_DidAddMessageToConsole to Mojo.
Note: Since this required ... | 0 | 15,307 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: KURL Document::CompleteURL(const String& url) const {
return CompleteURLWithOverride(url, base_url_);
}
Commit Message: Cleanup and remove dead code in SetFocusedElement
This early-out was added in:
https://crrev.com/ce8ea3446283965c7eabab592cbffe223b1cf2bc
Back then, we applied fragment focus in LayoutUpda... | 0 | 21,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: int get_ctty(pid_t pid, dev_t *ret_devnr, char **ret) {
_cleanup_free_ char *fn = NULL, *b = NULL;
dev_t devnr;
int r;
r = get_ctty_devnr(pid, &devnr);
if (r < 0)
return r;
r = device_path_make_canonical(S_IFCHR, devnr, &fn);
if (r < 0) {
... | 0 | 16,011 |
Analyze the following 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 veth_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
cmd->supported = 0;
cmd->advertising = 0;
ethtool_cmd_speed_set(cmd, SPEED_10000);
cmd->duplex = DUPLEX_FULL;
cmd->port = PORT_TP;
cmd->phy_address = 0;
cmd->transceiver = XCVR_INTERNAL;
cmd->autoneg = AUTONEG_DISABLE;
cm... | 0 | 12,158 |
Analyze the following 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::OnGetNearestFindResult(int nfr_request_id,
float x,
float y) {
float distance = frame_->DistanceToNearestFindMatch(WebFloatPoint(x, y));
Send(new FrameHostMsg_GetNearestFindResult_Reply(
routi... | 0 | 14,662 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: jint JNI_OnLoad(JavaVM *jvm, void *reserved)
{
JNIEnv *e;
int status;
ALOGV("Bluetooth Adapter Service : loading JNI\n");
if (jvm->GetEnv((void **)&e, JNI_VERSION_1_6)) {
ALOGE("JNI version mismatch error");
return JNI_ERR;
}
if ((status = android::register_com_android_bluetooth_btservice_Ada... | 0 | 7,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: PlatformTouchPoint::PlatformTouchPoint(const BlackBerry::Platform::TouchPoint& point)
: m_id(point.m_id)
, m_screenPos(point.m_screenPos)
, m_pos(point.m_pos)
{
switch (point.m_state) {
case BlackBerry::Platform::TouchPoint::TouchReleased:
m_state = TouchReleased;
break;
... | 1 | 1,431 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void _fb_wrunlock(void)
{
slurm_mutex_lock(&file_bcast_mutex);
fb_write_lock--;
pthread_cond_broadcast(&file_bcast_cond);
slurm_mutex_unlock(&file_bcast_mutex);
}
Commit Message: Fix security issue in _prolog_error().
Fix security issue caused by insecure file path handling triggered by
the failure o... | 0 | 27,908 |
Analyze the following 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 xstateregs_set(struct task_struct *target, const struct user_regset *regset,
unsigned int pos, unsigned int count,
const void *kbuf, const void __user *ubuf)
{
struct fpu *fpu = &target->thread.fpu;
struct xregs_state *xsave;
int ret;
if (!boot_cpu_has(X86_FEATURE_XSAVE))
return -ENODEV;
/*
... | 1 | 17,979 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: TabContentsWrapper* Browser::CreateTabContentsForURL(
const GURL& url, const GURL& referrer, Profile* profile,
PageTransition::Type transition, bool defer_load,
SiteInstance* instance) const {
TabContentsWrapper* contents = TabContentsFactory(profile, instance,
MSG_ROUTING_NONE,
GetSelec... | 0 | 16,307 |
Analyze the following 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 attach()
{
GRefPtr<WebKitWebViewBase> inspectorView = webkit_web_inspector_get_web_view(m_inspector);
if (m_inspectorWindow) {
gtk_container_remove(GTK_CONTAINER(m_inspectorWindow), GTK_WIDGET(inspectorView.get()));
gtk_widget_destroy(m_inspectorWindow);
... | 1 | 18,363 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int dm_suspended_internally_md(struct mapped_device *md)
{
return test_bit(DMF_SUSPENDED_INTERNALLY, &md->flags);
}
Commit Message: dm: fix race between dm_get_from_kobject() and __dm_destroy()
The following BUG_ON was hit when testing repeat creation and removal of
DM devices:
kernel BUG at drivers/md/dm... | 0 | 29,974 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: aodv_rreq(netdissect_options *ndo, const u_char *dat, u_int length)
{
u_int i;
const struct aodv_rreq *ap = (const struct aodv_rreq *)dat;
ND_TCHECK(*ap);
if (length < sizeof(*ap))
goto trunc;
ND_PRINT((ndo, " rreq %u %s%s%s%s%shops %u id 0x%08lx\n"
"\tdst %s seq %lu src %s seq %lu", length,
ap-... | 0 | 25,087 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *netdev;
struct atl2_adapter *adapter;
static int cards_found;
unsigned long mmio_start;
int mmio_len;
int err;
cards_found = 0;
err = pci_enable_device(pdev);
if (err)
return err;
/*
* atl2 is a shar... | 1 | 19,321 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void ImeObserver::OnKeyEvent(
const std::string& component_id,
const InputMethodEngineBase::KeyboardEvent& event,
IMEEngineHandlerInterface::KeyEventDoneCallback key_data) {
if (extension_id_.empty())
return;
if (!ShouldForwardKeyEvent()) {
std::move(key_data).Run(false);
return;
}
... | 0 | 29,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: gp_ag16(Pixel *p, png_const_voidp pb)
{
png_const_uint_16p pp = voidcast(png_const_uint_16p, pb);
p->r = p->g = p->b = pp[1];
p->a = pp[0];
}
Commit Message: DO NOT MERGE Update libpng to 1.6.20
BUG:23265085
Change-Id: I85199805636d771f3597b691b63bc0bf46084833
(cherry picked from commit bbe98b40cda082... | 0 | 3,680 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Ins_FLOOR( INS_ARG )
{
DO_FLOOR
}
Commit Message:
CWE ID: CWE-119 | 0 | 10,346 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SWFOutput_writeGlyphShape(SWFOutput out, SWFShape shape)
{
unsigned char c;
int styleDone = 0;
int i;
c = 1<<4;
SWFOutput_writeUInt8(out, c);
shape->nFills = 1;
shape->nLines = 0;
for ( i=0; i<shape->nRecords; ++i )
{
if(!styleDone && shape->records[i].type == SHAPERECORD_STATECHANGE)
{
shape->... | 0 | 25,490 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: DownloadResourceHandler::DownloadResourceHandler(
net::URLRequest* request,
const std::string& request_origin,
download::DownloadSource download_source,
bool follow_cross_origin_redirects)
: ResourceHandler(request),
tab_info_(new DownloadTabInfo()),
follow_cross_origin_redirects_(... | 0 | 3,649 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: xmlAddDefAttrs(xmlParserCtxtPtr ctxt,
const xmlChar *fullname,
const xmlChar *fullattr,
const xmlChar *value) {
xmlDefAttrsPtr defaults;
int len;
const xmlChar *name;
const xmlChar *prefix;
/*
* Allows to detect attribute redefinitions
*/... | 0 | 17,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: bool Element::parseAttributeName(QualifiedName& out, const AtomicString& namespaceURI, const AtomicString& qualifiedName, ExceptionCode& ec)
{
String prefix, localName;
if (!Document::parseQualifiedName(qualifiedName, prefix, localName, ec))
return false;
ASSERT(!ec);
QualifiedName qName(... | 0 | 5,390 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: std::string LookupMatchInTopDomains(const std::string& skeleton) {
DCHECK(!skeleton.empty());
DCHECK_NE(skeleton.back(), '.');
TopDomainPreloadDecoder preload_decoder(
g_trie_params.huffman_tree, g_trie_params.huffman_tree_size,
g_trie_params.trie, g_trie_params.trie_bits,
g_trie_params.tr... | 0 | 701 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: archive_read_format_rar_cleanup(struct archive_read *a)
{
struct rar *rar;
rar = (struct rar *)(a->format->data);
free_codes(a);
free(rar->filename);
free(rar->filename_save);
free(rar->dbo);
free(rar->unp_buffer);
free(rar->lzss.window);
__archive_ppmd7_functions.Ppmd7_Free(&rar->ppmd7_context... | 0 | 6,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: const Extension* ExtensionBrowserTest::GetExtensionByPath(
const extensions::ExtensionSet& extensions,
const base::FilePath& path) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
base::FilePath extension_path = base::MakeAbsoluteFilePath(path);
EXPECT_TRUE(!extension_path.empty());
for (const ... | 0 | 17,556 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static uint8_t get_tlm(Jpeg2000DecoderContext *s, int n)
{
uint8_t Stlm, ST, SP, tile_tlm, i;
bytestream2_get_byte(&s->g); /* Ztlm: skipped */
Stlm = bytestream2_get_byte(&s->g);
ST = (Stlm >> 4) & 0x03;
SP = (Stlm >> 6) & 0x01;
tile_tlm = (n - 4) / ((SP + 1) * 2 + ST)... | 0 | 20,040 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: virtual const std::string GetError() { return std::string(); }
Commit Message: Extend TTS extension API to support richer events returned from the engine
to the client. Previously we just had a completed event; this adds start,
word boundary, sentence boundary, and marker boundary. In addition,
interrupted and... | 0 | 606 |
Analyze the following 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 DocumentLoader::ShouldClearWindowName(
const LocalFrame& frame,
const SecurityOrigin* previous_security_origin,
const Document& new_document) {
if (!previous_security_origin)
return false;
if (!frame.IsMainFrame())
return false;
if (frame.Loader().Opener())
return false;
retu... | 0 | 6,911 |
Analyze the following 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 SyncTest::EnableNotificationsImpl() {
ASSERT_TRUE(ServerSupportsNotificationControl());
std::string path = "chromiumsync/enablenotifications";
ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
ASSERT_EQ("Notifications enabled",
UTF16ToASCII(browser()->GetSelectedWebConte... | 0 | 15,222 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: armpmu_read(struct perf_event *event)
{
struct hw_perf_event *hwc = &event->hw;
/* Don't read disabled counters! */
if (hwc->idx < 0)
return;
armpmu_event_update(event, hwc, hwc->idx);
}
Commit Message: arm64: perf: reject groups spanning multiple HW PMUs
The perf core implicitly rejects events spanning... | 0 | 1,005 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int crypto_ccm_encrypt(struct aead_request *req)
{
struct crypto_aead *aead = crypto_aead_reqtfm(req);
struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead);
struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req);
struct skcipher_request *skreq = &pctx->skreq;
struct scatterlist *dst;
unsigned in... | 0 | 8,760 |
Analyze the following 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 no_batched_update(int ndx, BOOL is_redo)
{
struct file_list *flist = flist_for_ndx(ndx, "no_batched_update");
struct file_struct *file = flist->files[ndx - flist->ndx_start];
rprintf(FERROR_XFER, "(No batched update for%s \"%s\")\n",
is_redo ? " resend of" : "", f_name(file, NULL));
if (inc_re... | 0 | 10,259 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: AXObjectCache* FrameView::axObjectCache() const
{
if (frame().document())
return frame().document()->existingAXObjectCache();
return 0;
}
Commit Message: Defer call to updateWidgetPositions() outside of RenderLayerScrollableArea.
updateWidgetPositions() can destroy the render tree, so it should ... | 0 | 22,444 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static u16 SQLITE_NOINLINE computeNumericType(Mem *pMem){
assert( (pMem->flags & (MEM_Int|MEM_Real))==0 );
assert( (pMem->flags & (MEM_Str|MEM_Blob))!=0 );
ExpandBlob(pMem);
if( sqlite3AtoF(pMem->z, &pMem->u.r, pMem->n, pMem->enc)==0 ){
return 0;
}
if( sqlite3Atoi64(pMem->z, &pMem->u.i, pMem->n, p... | 0 | 2,469 |
Analyze the following 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 views::Widget* ShellSurface::GetWidget() const {
return widget_;
}
Commit Message: exo: Reduce side-effects of dynamic activation code.
This code exists for clients that need to managed their own system
modal dialogs. Since the addition of the remote surface API we
can limit the impact of this to surfac... | 0 | 21,236 |
Analyze the following 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 sco_sock_init(struct sock *sk, struct sock *parent)
{
BT_DBG("sk %p", sk);
if (parent)
sk->sk_type = parent->sk_type;
}
Commit Message: Bluetooth: sco: fix information leak to userspace
struct sco_conninfo has one padding byte in the end. Local variable
cinfo of type sco_conninfo is copied to ... | 0 | 4,884 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: _handle_esc_csi_reset_mode(Termpty *ty, Eina_Unicode cc, Eina_Unicode *b)
{
int mode = 0, priv = 0, arg;
if (cc == 'h') mode = 1;
if (*b == '?')
{
priv = 1;
b++;
}
if (priv) /* DEC Private Mode Reset (DECRST) */
{
while (b)
{
arg = _csi_ar... | 0 | 6,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 PDFiumEngine::Form_DisplayCaret(FPDF_FORMFILLINFO* param,
FPDF_PAGE page,
FPDF_BOOL visible,
double left,
double top,
double... | 0 | 6,429 |
Analyze the following 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 cprt_dump(GF_Box *a, FILE * trace)
{
GF_CopyrightBox *p;
p = (GF_CopyrightBox *)a;
gf_isom_box_dump_start(a, "CopyrightBox", trace);
fprintf(trace, "LanguageCode=\"%s\" CopyrightNotice=\"%s\">\n", p->packedLanguageCode, p->notice);
gf_isom_box_dump_done("CopyrightBox", a, trace);
return GF_OK;
}
Co... | 0 | 21,722 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int yr_object_create(
int8_t type,
const char* identifier,
YR_OBJECT* parent,
YR_OBJECT** object)
{
YR_OBJECT* obj;
int i;
size_t object_size = 0;
assert(parent != NULL || object != NULL);
switch (type)
{
case OBJECT_TYPE_STRUCTURE:
object_size = sizeof(YR_OBJECT_STRUCTURE)... | 0 | 26,560 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: MediaRequestState state(MediaStreamType stream_type) const {
return state_[stream_type];
}
Commit Message: Make MediaStreamDispatcherHost per-request instead of per-frame.
Instead of having RenderFrameHost own a single MSDH to handle all
requests from a frame, MSDH objects will be owned by a strong bind... | 0 | 29,956 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void OomInterventionTabHelper::OnHighMemoryUsage() {
auto* config = OomInterventionConfig::GetInstance();
if (config->is_renderer_pause_enabled() ||
config->is_navigate_ads_enabled()) {
NearOomReductionInfoBar::Show(web_contents(), this);
intervention_state_ = InterventionState::UI_SHOWN;
if... | 0 | 25,903 |
Analyze the following 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 do_syscall_trace(void)
{
/*
* The 0x80 provides a way for the tracing parent to distinguish
* between a syscall stop and SIGTRAP delivery
*/
ptrace_notify(SIGTRAP|((current->ptrace & PT_TRACESYSGOOD) ? 0x80 : 0));
/*
* this isn't the same as continuing with a signal, but it will do
* for normal... | 0 | 13,357 |
Analyze the following 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 __ablkcipher_walk_complete(struct ablkcipher_walk *walk)
{
struct ablkcipher_buffer *p, *tmp;
list_for_each_entry_safe(p, tmp, &walk->buffers, entry) {
ablkcipher_buffer_write(p);
list_del(&p->entry);
kfree(p);
}
}
Commit Message: crypto: user - fix info leaks in report API
Three errors resulting... | 0 | 24,221 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void ResetScreenHandler::OnRollbackCheck(bool can_rollback) {
VLOG(1) << "Callback from CanRollbackCheck, result " << can_rollback;
rollback_available_ = can_rollback;
ShowWithParams();
}
Commit Message: Rollback option put behind the flag.
BUG=368860
Review URL: https://codereview.chromium.org/267393011... | 0 | 14,678 |
Analyze the following 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 remote_socket_enqueue(asocket* s, apacket* p) {
D("entered remote_socket_enqueue RS(%d) WRITE fd=%d peer.fd=%d", s->id, s->fd, s->peer->fd);
p->msg.command = A_WRTE;
p->msg.arg0 = s->peer->id;
p->msg.arg1 = s->id;
p->msg.data_length = p->len;
send_packet(p, s->transport);
retur... | 0 | 14,062 |
Analyze the following 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 PrintPreviewDataService::GetDataEntry(
const std::string& preview_ui_addr_str,
int index,
scoped_refptr<base::RefCountedBytes>* data_bytes) {
*data_bytes = NULL;
PreviewDataStoreMap::iterator it = data_store_map_.find(preview_ui_addr_str);
if (it != data_store_map_.end())
it->seco... | 1 | 24,468 |
Analyze the following 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 void ZEND_FASTCALL zend_hash_extend(HashTable *ht, uint32_t nSize, zend_bool packed)
{
HT_ASSERT(GC_REFCOUNT(ht) == 1);
if (nSize == 0) return;
if (UNEXPECTED(!((ht)->u.flags & HASH_FLAG_INITIALIZED))) {
if (nSize > ht->nTableSize) {
ht->nTableSize = zend_hash_check_size(nSize);
}
zend_hash_c... | 0 | 25,704 |
Analyze the following 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 BnGraphicBufferProducer::onTransact(
uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
{
switch(code) {
case REQUEST_BUFFER: {
CHECK_INTERFACE(IGraphicBufferProducer, data, reply);
int bufferIdx = data.readInt32();
sp<GraphicBuffer> buffer;
int result = requ... | 1 | 15,909 |
Analyze the following 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 GetStandardDeviationPixelList(PixelList *pixel_list,
MagickPixelPacket *pixel)
{
MagickRealType
sum,
sum_squared;
register SkipList
*list;
register ssize_t
channel;
size_t
color;
ssize_t
count;
unsigned short
channels[ListChannels];
/*
Find the sta... | 0 | 13,745 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void vdi_port_send_tokens_to_client(RedClient *client, uint32_t tokens, void *opaque)
{
main_channel_client_push_agent_tokens(red_client_get_main(client),
tokens);
}
Commit Message:
CWE ID: CWE-119 | 0 | 27,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: bool IRCView::lastBlockIsLine(int select)
{
Burr *b = dynamic_cast<Burr*>(document()->lastBlock().userData());
int state = -1;
if (b)
state = b->m_format;
if (select == -1)
return (state == BlockIsRemember || state == BlockIsMarker);
return state == select;
}
Commit Messag... | 0 | 14,759 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.