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: void PrepareFrameAndViewForPrint::ResizeForPrinting() {
gfx::Size print_layout_size(web_print_params_.printContentArea.width,
web_print_params_.printContentArea.height);
print_layout_size.set_height(
static_cast<int>(static_cast<double>(print_layout_size.height()) * 1.25));... | 0 | 16,643 |
Analyze the following 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 pmcraid_init_tasklets(struct pmcraid_instance *pinstance)
{
int i;
for (i = 0; i < pinstance->num_hrrq; i++)
tasklet_init(&pinstance->isr_tasklet[i],
pmcraid_tasklet_function,
(unsigned long)&pinstance->hrrq_vector[i]);
}
Commit Message: [SCSI] pmcraid: reject negative request siz... | 0 | 26,553 |
Analyze the following 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::DownloadUrl(
std::unique_ptr<download::DownloadUrlParameters> params,
std::unique_ptr<storage::BlobDataHandle> blob_data_handle,
scoped_refptr<network::SharedURLLoaderFactory> blob_url_loader_factory) {
if (params->post_id() >= 0) {
DCHECK(params->prefer_cache());
D... | 1 | 22,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 Textfield::OnAfterPointerAction(bool text_changed,
bool selection_changed) {
OnAfterUserAction();
UpdateAfterChange(text_changed, selection_changed);
}
Commit Message: MacViews: Enable secure text input for password Textfields.
In Cocoa the NSTextInputContext automa... | 0 | 20,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: bool WebPageSerializer::serialize(WebFrame* frame,
bool recursive,
WebPageSerializerClient* client,
const WebVector<WebURL>& links,
const WebVector<WebString>& localPaths,
... | 1 | 17,458 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static const char *ccid3_rx_state_name(enum ccid3_hc_rx_states state)
{
static const char *const ccid3_rx_state_names[] = {
[TFRC_RSTATE_NO_DATA] = "NO_DATA",
[TFRC_RSTATE_DATA] = "DATA",
};
return ccid3_rx_state_names[state];
}
Commit Message: dccp: fix info leak via getsockopt(DCCP_SOCKOPT_CCID_TX_INF... | 0 | 21,168 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static MagickBooleanType DecodeImage(Image *image,const size_t compression,
unsigned char *pixels)
{
int
count;
register ssize_t
i,
x;
register unsigned char
*p,
*q;
ssize_t
y;
unsigned char
byte;
assert(image != (Image *) NULL);
assert(image->signature == MagickSi... | 0 | 14,632 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: MojoResult DataPipeProducerDispatcher::CloseNoLock() {
lock_.AssertAcquired();
if (is_closed_ || in_transit_)
return MOJO_RESULT_INVALID_ARGUMENT;
is_closed_ = true;
ring_buffer_mapping_ = base::WritableSharedMemoryMapping();
shared_ring_buffer_ = base::UnsafeSharedMemoryRegion();
watchers_.Notif... | 0 | 12,013 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: bool NavigationControllerImpl::NeedsReload() const {
return needs_reload_;
}
Commit Message: Delete unneeded pending entries in DidFailProvisionalLoad to prevent a spoof.
BUG=280512
BUG=278899
TEST=See bug for repro steps.
Review URL: https://chromiumcodereview.appspot.com/23978003
git-svn-id: svn://svn.chr... | 0 | 3,496 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: pdf14_clist_begin_typed_image(gx_device * dev, const gs_gstate * pgs,
const gs_matrix *pmat, const gs_image_common_t *pic,
const gs_int_rect * prect,
const gx_drawing_color * pdcolor,
const gx_clip_path * p... | 0 | 24,253 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderWidgetHostImpl::UpdateTextDirection(WebTextDirection direction) {
text_direction_updated_ = true;
text_direction_ = direction;
}
Commit Message: Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantages:
- allow tearing down and recreating the UI parent context ... | 0 | 21,403 |
Analyze the following 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::Destroy(bool also_delete) {
DCHECK(!destroyed_);
destroyed_ = true;
NotificationService::current()->Notify(
NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, Source<RenderWidgetHost>(this),
NotificationService::NoDetails());
if (view_) {
view_->Destroy();
view_.re... | 0 | 16,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: static void DeprecateAsSameValueOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
TestObject* impl = V8TestObject::ToImpl(info.Holder());
impl->DeprecateAsSameValueOverloadedMethod();
}
Commit Message: bindings: Support "attribute FrozenArray<T>?"
Adds a quick hack to support a cas... | 0 | 2,350 |
Analyze the following 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 btrfs_orphan_cleanup(struct btrfs_root *root)
{
struct btrfs_path *path;
struct extent_buffer *leaf;
struct btrfs_key key, found_key;
struct btrfs_trans_handle *trans;
struct inode *inode;
u64 last_objectid = 0;
int ret = 0, nr_unlink = 0, nr_truncate = 0;
if (cmpxchg(&root->orphan_cleanup_state, 0, ... | 0 | 26,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: MagickExport MagickBooleanType InvokeDynamicImageFilter(const char *tag,
Image **images,const int argc,const char **argv,ExceptionInfo *exception)
{
char
name[MaxTextExtent],
path[MaxTextExtent];
ImageFilterHandler
*image_filter;
MagickBooleanType
status;
ModuleHandle
handle;
P... | 0 | 20,123 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: store_read_set(png_store *ps, png_uint_32 id)
{
png_store_file *pf = ps->saved;
while (pf != NULL)
{
if (pf->id == id)
{
ps->current = pf;
ps->next = NULL;
store_read_buffer_next(ps);
return;
}
pf = pf->next;
}
{
size_t pos;
char msg[FILE_NAME_SIZE+64];
pos ... | 0 | 9,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: void SimulateTab() {
ui::KeyEvent pressed_tab(ui::ET_KEY_PRESSED, ui::VKEY_TAB, ui::EF_NONE);
media_controls_view_->GetFocusManager()->OnKeyEvent(pressed_tab);
}
Commit Message: [Lock Screen Media Controls] Tweak UI based on new mocks
This CL rearranges the different components of the CrOS lock scre... | 0 | 6,807 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ~FrameDeliverer() {
DCHECK(io_thread_checker_.CalledOnValidThread());
if (gpu_memory_buffer_pool_) {
DropCurrentPoolTasks();
media_task_runner_->DeleteSoon(FROM_HERE,
gpu_memory_buffer_pool_.release());
}
}
Commit Message: Simplify "WouldTaintOrigi... | 0 | 21,133 |
Analyze the following 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 V4L2JpegEncodeAccelerator::EncodedInstance::OutputBufferQueuedCount() {
return output_buffer_map_.size() - free_output_buffers_.size();
}
Commit Message: media: remove base::SharedMemoryHandle usage in v4l2 encoder
This replaces a use of the legacy UnalignedSharedMemory ctor
taking a SharedMemoryHandle... | 0 | 24,003 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int irda_open_lsap(struct irda_sock *self, int pid)
{
notify_t notify;
if (self->lsap) {
net_warn_ratelimited("%s(), busy!\n", __func__);
return -EBUSY;
}
/* Initialize callbacks to be used by the IrDA stack */
irda_notify_init(¬ify);
notify.udata_indication = irda_data_indication;
notify.i... | 0 | 29,870 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int server_remove_channels(SERVER_REC *server)
{
GSList *tmp, *next;
int found;
g_return_val_if_fail(server != NULL, FALSE);
found = FALSE;
for (tmp = server->channels; tmp != NULL; tmp = next) {
CHANNEL_REC *channel = tmp->data;
next = tmp->next;
channel_destroy(channel);
found = TRUE;
}
... | 0 | 634 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: RenderFrameHostManagerTest() : foo_com_("foo.com") {
replace_host_.SetHostStr(foo_com_);
}
Commit Message: Fix issue with pending NavigationEntry being discarded incorrectly
This CL fixes an issue where we would attempt to discard a pending
NavigationEntry when a cross-process navigation to this Navigat... | 0 | 9,234 |
Analyze the following 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 OutOfProcessInstance::NotifySelectedFindResultChanged(
int current_find_index) {
DCHECK_GE(current_find_index, 0);
SelectedFindResultChanged(current_find_index);
}
Commit Message: Prevent leaking PDF data cross-origin
BUG=520422
Review URL: https://codereview.chromium.org/1311973002
Cr-Commit-Pos... | 0 | 3,144 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RenderWidgetHostImpl::Undo() {
Send(new ViewMsg_Undo(GetRoutingID()));
RecordAction(UserMetricsAction("Undo"));
}
Commit Message: Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantages:
- allow tearing down and recreating the UI parent context without
losing the re... | 0 | 1,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: void Wait() {
base::RunLoop run_loop;
DCHECK(!run_loop_);
run_loop_ = &run_loop;
CheckForWaitingLoop();
run_loop.Run();
}
Commit Message: Origins should be represented as url::Origin (not as GURL).
As pointed out in //docs/security/origin-vs-url.md, origins should be
represented as url::... | 0 | 1,091 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void set_max_threads(unsigned int max_threads_suggested)
{
u64 threads;
/*
* The number of threads shall be limited such that the thread
* structures may only consume a small part of the available memory.
*/
if (fls64(totalram_pages) + fls64(PAGE_SIZE) > 64)
threads = MAX_THREADS;
else
threa... | 0 | 28,413 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: HandleInterpBody(CompatInfo *info, VarDef *def, SymInterpInfo *si)
{
bool ok = true;
const char *elem, *field;
ExprDef *arrayNdx;
for (; def; def = (VarDef *) def->common.next) {
if (def->name && def->name->expr.op == EXPR_FIELD_REF) {
log_err(info->ctx,
"C... | 0 | 10,290 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void WallpaperManagerBase::MoveCustomWallpapersSuccess(
const AccountId& account_id,
const wallpaper::WallpaperFilesId& wallpaper_files_id) {
WallpaperInfo info;
GetUserWallpaperInfo(account_id, &info);
if (info.type == CUSTOMIZED) {
info.location =
base::FilePath(wallpaper_files_id.id()... | 0 | 13,926 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: pfkey_satype2proto(uint8_t satype)
{
switch (satype) {
case SADB_SATYPE_UNSPEC:
return IPSEC_PROTO_ANY;
case SADB_SATYPE_AH:
return IPPROTO_AH;
case SADB_SATYPE_ESP:
return IPPROTO_ESP;
case SADB_X_SATYPE_IPCOMP:
return IPPROTO_COMP;
break;
default:
return 0;
}
/* NOTREACHED */
}
Commit Messa... | 0 | 5,501 |
Analyze the following 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 CameraSource::isCameraAvailable(
const sp<ICamera>& camera, const sp<ICameraRecordingProxy>& proxy,
int32_t cameraId, const String16& clientName, uid_t clientUid) {
if (camera == 0) {
mCamera = Camera::connect(cameraId, clientName, clientUid);
if (mCamera == 0) return -EBUSY;
mCamera... | 0 | 27,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: int handle_revision_arg(const char *arg_, struct rev_info *revs, int flags, unsigned revarg_opt)
{
struct object_context oc;
char *dotdot;
struct object *object;
unsigned char sha1[20];
int local_flags;
const char *arg = arg_;
int cant_be_filename = revarg_opt & REVARG_CANNOT_BE_FILENAME;
unsigned get_sha... | 0 | 3,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 char *btm_pair_state_descr (tBTM_PAIRING_STATE state)
{
#if (BT_TRACE_VERBOSE == TRUE)
switch (state)
{
case BTM_PAIR_STATE_IDLE: return("IDLE");
case BTM_PAIR_STATE_GET_REM_NAME: return("GET_REM_NAME");
case BTM_PAIR_STATE_WAIT_PIN_REQ: return("WAIT_PIN_REQ");
case BTM_PAIR_STATE_WAIT_LOCAL_PIN: ret... | 0 | 12,790 |
Analyze the following 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 is_f00f_bug(struct pt_regs *regs, unsigned long address)
{
#ifdef CONFIG_X86_F00F_BUG
unsigned long nr;
/*
* Pentium F0 0F C7 C8 bug workaround:
*/
if (boot_cpu_data.f00f_bug) {
nr = (address - idt_descr.address) >> 3;
if (nr == 6) {
do_invalid_op(regs, 0);
return 1;
}
}
#endif
r... | 0 | 1,260 |
Analyze the following 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 voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjectPythonV8Internal::voidMethodElementArgMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
Commit Message: document.locatio... | 0 | 13,882 |
Analyze the following 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::SendFailedProvisionalLoad(
const blink::WebURLRequest& request,
const blink::WebURLError& error,
blink::WebLocalFrame* frame) {
bool show_repost_interstitial =
(error.reason == net::ERR_CACHE_MISS &&
base::EqualsASCII(base::StringPiece16(request.httpMethod()), "POS... | 0 | 26,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: void LayerTreeHost::UpdateHudLayer() {
if (debug_state_.ShowHudInfo()) {
if (!hud_layer_.get())
hud_layer_ = HeadsUpDisplayLayer::Create();
if (root_layer_.get() && !hud_layer_->parent())
root_layer_->AddChild(hud_layer_);
} else if (hud_layer_.get()) {
hud_layer_->RemoveFromParent();... | 0 | 15,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: IntPoint WebPagePrivate::transformedScrollPosition() const
{
return m_backingStoreClient->transformedScrollPosition();
}
Commit Message: [BlackBerry] Adapt to new BlackBerry::Platform::TouchPoint API
https://bugs.webkit.org/show_bug.cgi?id=105143
RIM PR 171941
Reviewed by Rob Buis.
Internally reviewed by Ge... | 0 | 29,452 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: map_engine_acting_person(void)
{
return s_acting_person;
}
Commit Message: Fix integer overflow in layer_resize in map_engine.c (#268)
* Fix integer overflow in layer_resize in map_engine.c
There's a buffer overflow bug in the function layer_resize. It allocates
a buffer `tilemap` with size `x_size * y_siz... | 0 | 23,268 |
Analyze the following 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 php_pgsql_fd_cast(php_stream *stream, int cast_as, void **ret) /* {{{ */
{
PGconn *pgsql = (PGconn *) stream->abstract;
int fd_number;
switch (cast_as) {
case PHP_STREAM_AS_FD_FOR_SELECT:
case PHP_STREAM_AS_FD:
case PHP_STREAM_AS_SOCKETD:
if (ret) {
fd_number = PQsocket(pgsql);
if ... | 0 | 12,672 |
Analyze the following 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 BackendImpl::DoomEntry(const std::string& key,
const CompletionCallback& callback) {
DCHECK(!callback.is_null());
background_queue_.DoomEntry(key, callback);
return net::ERR_IO_PENDING;
}
Commit Message: Blockfile cache: fix long-standing sparse + evict reentrancy problem
Th... | 0 | 10,889 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: build_env( char* fmt, char* arg )
{
char* cp;
size_t size;
static char* buf;
static size_t maxbuf = 0;
size = strlen( fmt ) + strlen( arg );
if ( size > maxbuf )
httpd_realloc_str( &buf, &maxbuf, size );
(void) my_snprintf( buf, maxbuf, fmt, arg );
cp = strdup( buf );
if ... | 0 | 20,023 |
Analyze the following 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 testHostTextTermination_Issue15() {
UriParserStateA state;
UriUriA uri;
state.uri = &uri;
const char * const emptyHostWithPortUri = "//:123";
TEST_ASSERT(URI_SUCCESS == uriParseUriA(&state, emptyHostWithPortUri));
TEST_ASSERT(uri.hostText.first == emptyHostWithPortUri + strlen("//"));
TEST_AS... | 0 | 10,021 |
Analyze the following 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 dtls1_copy_record(SSL *s, pitem *item)
{
DTLS1_RECORD_DATA *rdata;
rdata = (DTLS1_RECORD_DATA *)item->data;
if (s->s3->rbuf.buf != NULL)
OPENSSL_free(s->s3->rbuf.buf);
s->packet = rdata->packet;
s->packet_length = rdata->packet_length;
memcpy(&(s->s3->rbuf), &(rdata->... | 0 | 29,854 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx)
{
int i, j, bits, ret = 0, wstart, wend, window, wvalue;
int start = 1;
BIGNUM *aa;
/* Table of variables obtained from 'ctx' */
BIGNUM *val[TABLE_SIZE];
BN_RECP_CTX recp;
... | 0 | 16,372 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void Plugin::EnqueueProgressEvent(const char* event_type,
const nacl::string& url,
LengthComputable length_computable,
uint64_t loaded_bytes,
uint64_t total_bytes) {
PLUGIN_PRI... | 0 | 6,181 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: midi_synth_start_note(int dev, int channel, int note, int velocity)
{
int orig_dev = synth_devs[dev]->midi_dev;
int msg, chn;
if (note < 0 || note > 127)
return 0;
if (channel < 0 || channel > 15)
return 0;
if (velocity < 0)
velocity = 0;
if (velocity > 127)
velocity = 127;
... | 0 | 20,674 |
Analyze the following 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 ioctl_by_bdev(struct block_device *bdev, unsigned cmd, unsigned long arg)
{
int res;
mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
res = blkdev_ioctl(bdev, 0, cmd, arg);
set_fs(old_fs);
return res;
}
Commit Message: ->splice_write() via ->write_iter()
iter_file_splice_write() - a ->splice_write(... | 0 | 29,741 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: getEventMask(ScreenPtr pScreen, ClientPtr client)
{
SetupScreen(pScreen);
ScreenSaverEventPtr pEv;
if (!pPriv)
return 0;
for (pEv = pPriv->events; pEv; pEv = pEv->next)
if (pEv->client == client)
return pEv->mask;
return 0;
}
Commit Message:
CWE ID: CWE-20 | 0 | 9,698 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: iasecc_sdo_tag_from_class(unsigned sdo_class)
{
switch (sdo_class & ~IASECC_OBJECT_REF_LOCAL) {
case IASECC_SDO_CLASS_CHV:
return IASECC_SDO_CHV_TAG;
case IASECC_SDO_CLASS_RSA_PRIVATE:
return IASECC_SDO_PRVKEY_TAG;
case IASECC_SDO_CLASS_RSA_PUBLIC:
return IASECC_SDO_PUBKEY_TAG;
case IASECC_SDO_CLASS_... | 0 | 11,688 |
Analyze the following 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 ocfs2_prepare_inode_for_write(struct file *file,
loff_t pos,
size_t count)
{
int ret = 0, meta_level = 0;
struct dentry *dentry = file->f_path.dentry;
struct inode *inode = d_inode(dentry);
loff_t end;
/*
* We start with a read level meta lock and only jump to an ex
* if we need t... | 0 | 8,224 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: xkb_file_type_to_string(enum xkb_file_type type)
{
if (type > _FILE_TYPE_NUM_ENTRIES)
return "unknown";
return xkb_file_type_strings[type];
}
Commit Message: xkbcomp: fix pointer value for FreeStmt
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
CWE ID: CWE-416 | 0 | 26,116 |
Analyze the following 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 coroutine_fn v9fs_readdir(void *opaque)
{
int32_t fid;
V9fsFidState *fidp;
ssize_t retval = 0;
size_t offset = 7;
uint64_t initial_offset;
int32_t count;
uint32_t max_count;
V9fsPDU *pdu = opaque;
retval = pdu_unmarshal(pdu, offset, "dqd", &fid,
... | 0 | 17,094 |
Analyze the following 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 hwsim_clear_sta_magic(struct ieee80211_sta *sta)
{
struct hwsim_sta_priv *sp = (void *)sta->drv_priv;
sp->magic = 0;
}
Commit Message: mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl()
'hwname' is malloced in hwsim_new_radio_nl() and should be freed
before leaving from the er... | 0 | 16,261 |
Analyze the following 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 iwbmp_read_info_header(struct iwbmprcontext *rctx)
{
iw_byte buf[124];
int retval = 0;
size_t n;
if(!iwbmp_read(rctx,buf,4)) goto done;
rctx->infoheader_size = iw_get_ui32le(&buf[0]);
if(rctx->infoheader_size<12) goto done;
n = rctx->infoheader_size;
if(n>sizeof(buf)) n=sizeof(buf);
if(!iwbm... | 0 | 20,029 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void RendererSchedulerImpl::MaybeUpdatePolicy() {
helper_.CheckOnValidThread();
if (policy_may_need_update_.IsSet()) {
UpdatePolicy();
}
}
Commit Message: [scheduler] Remove implicit fallthrough in switch
Bail out early when a condition in the switch is fulfilled.
This does not change behaviour due to... | 0 | 4,076 |
Analyze the following 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 __skb_csum_offload_chk(struct sk_buff *skb,
const struct skb_csum_offl_spec *spec,
bool *csum_encapped,
bool csum_help)
{
struct iphdr *iph;
struct ipv6hdr *ipv6;
void *nhdr;
int protocol;
u8 ip_proto;
if (skb->protocol == htons(ETH_P_8021Q) ||
skb->protocol == htons(ETH_P_80... | 0 | 12,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: path_distance(PG_FUNCTION_ARGS)
{
PATH *p1 = PG_GETARG_PATH_P(0);
PATH *p2 = PG_GETARG_PATH_P(1);
float8 min = 0.0; /* initialize to keep compiler quiet */
bool have_min = false;
float8 tmp;
int i,
j;
LSEG seg1,
seg2;
for (i = 0; i < p1->npts; i++)
{
int iprev;
if (i > 0)
... | 0 | 3,193 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: server_send_real (server *serv, char *buf, int len)
{
fe_add_rawlog (serv, buf, len, TRUE);
url_check_line (buf, len);
return tcp_send_real (serv->ssl, serv->sok, serv->encoding, serv->using_irc,
buf, len);
}
Commit Message: ssl: Validate hostnames
Closes #524
CWE ID: CWE-310 | 0 | 13,929 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static long mem_seek(jas_stream_obj_t *obj, long offset, int origin)
{
jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj;
size_t newpos;
JAS_DBGLOG(100, ("mem_seek(%p, %ld, %d)\n", obj, offset, origin));
switch (origin) {
case SEEK_SET:
newpos = offset;
break;
case SEEK_END:
newpos = m->len_ - o... | 0 | 16,238 |
Analyze the following 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 omx_vdec::post_event(unsigned long p1,
unsigned long p2,
unsigned long id)
{
bool bRet = false;
/* Just drop messages typically generated by hardware (w/o client request),
* if we've reported an error to client. */
if (m_error_propogated) {
switch (id) {
case OMX_COMPONENT_GENERATE_PORT_RECONFIG... | 0 | 24,079 |
Analyze the following 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 perf_prepare_sample(struct perf_event_header *header,
struct perf_sample_data *data,
struct perf_event *event,
struct pt_regs *regs)
{
u64 sample_type = event->attr.sample_type;
header->type = PERF_RECORD_SAMPLE;
header->size = sizeof(*header) + event->header_size;
header->misc = 0;
header... | 0 | 23,914 |
Analyze the following 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::DoTexStorage2DImageCHROMIUM(GLenum target,
GLenum internal_format,
GLenum buffer_usage,
GLsizei width,
... | 0 | 20,669 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: IW_IMPL(unsigned int) iw_get_ui16_e(const iw_byte *b, int endian)
{
if(endian==IW_ENDIAN_LITTLE)
return iw_get_ui16le(b);
return iw_get_ui16be(b);
}
Commit Message: Trying to fix some invalid left shift operations
Fixes issue #16
CWE ID: CWE-682 | 0 | 29,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: DevToolsManagerTestBrowserClient() {
}
Commit Message: Ensure extensions and the Chrome Web Store are loaded in new BrowsingInstances.
BUG=174943
TEST=Can't post message to CWS. See bug for repro steps.
Review URL: https://chromiumcodereview.appspot.com/12301013
git-svn-id: svn://svn.chromium.org/chrom... | 0 | 20,173 |
Analyze the following 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 coroutine_fn v9fs_open(void *opaque)
{
int flags;
int32_t fid;
int32_t mode;
V9fsQID qid;
int iounit = 0;
ssize_t err = 0;
size_t offset = 7;
struct stat stbuf;
V9fsFidState *fidp;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
if (s->proto_version == V9... | 0 | 20,998 |
Analyze the following 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 crypto_is_test_larval(struct crypto_larval *larval)
{
return larval->alg.cra_driver_name[0];
}
Commit Message: crypto: prefix module autoloading with "crypto-"
This prefixes all crypto module loading with "crypto-" so we never run
the risk of exposing module auto-loading to userspace via a cr... | 0 | 16,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 void redo_format(void)
{
buffer_track = -1;
setup_format_params(format_req.track << STRETCH(_floppy));
floppy_start();
debugt(__func__, "queue format request");
}
Commit Message: floppy: don't write kernel-only members to FDRAWCMD ioctl output
Do not leak kernel-only floppy_raw_cmd structure members ... | 0 | 20,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: int LoadedWallpapers() {
return WallpaperManager::Get()->loaded_wallpapers_for_test();
}
Commit Message: [reland] Do not set default wallpaper unless it should do so.
TBR=bshe@chromium.org, alemate@chromium.org
Bug: 751382
Change-Id: Id0793dfe467f737526a95b1e66ed01fbb8860bda
Reviewed-on: https://chromi... | 0 | 28,240 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: GF_Err subs_dump(GF_Box *a, FILE * trace)
{
u32 entry_count, i, j;
u16 subsample_count;
GF_SubSampleInfoEntry *pSamp;
GF_SubSampleEntry *pSubSamp;
GF_SubSampleInformationBox *ptr = (GF_SubSampleInformationBox *) a;
if (!a) return GF_BAD_PARAM;
entry_count = gf_list_count(ptr->Samples);
gf_isom_box_dump_... | 0 | 1,654 |
Analyze the following 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::AXContentTreeDataToAXTreeData(
ui::AXTreeData* dst) {
const AXContentTreeData& src = ax_content_tree_data_;
*dst = src;
if (src.routing_id != -1)
dst->tree_id = RoutingIDToAXTreeID(src.routing_id);
if (src.parent_routing_id != -1)
dst->parent_tree_id = RoutingIDToA... | 0 | 2,555 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void WebGLRenderingContextBase::useProgram(WebGLProgram* program) {
if (!ValidateNullableWebGLObject("useProgram", program))
return;
if (program && !program->LinkStatus(this)) {
SynthesizeGLError(GL_INVALID_OPERATION, "useProgram", "program not valid");
return;
}
if (current_program_ != progr... | 0 | 12,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: void GetURLAndTitleToBookmark(content::WebContents* web_contents,
GURL* url,
base::string16* title) {
*url = GetURLToBookmark(web_contents);
*title = web_contents->GetTitle();
}
Commit Message: Prevent interpretating userinfo as url scheme when edit... | 0 | 16,901 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: layer_get_visible(int layer)
{
return s_map->layers[layer].is_visible;
}
Commit Message: Fix integer overflow in layer_resize in map_engine.c (#268)
* Fix integer overflow in layer_resize in map_engine.c
There's a buffer overflow bug in the function layer_resize. It allocates
a buffer `tilemap` with size `... | 0 | 4,014 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int smb3_encryption_required(const struct cifs_tcon *tcon)
{
if (!tcon)
return 0;
if ((tcon->ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) ||
(tcon->share_flags & SHI1005_FLAGS_ENCRYPT_DATA))
return 1;
if (tcon->seal &&
(tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION))
retu... | 0 | 9,350 |
Analyze the following 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 uvesafb_blank(int blank, struct fb_info *info)
{
struct uvesafb_ktask *task;
int err = 1;
#ifdef CONFIG_X86
struct uvesafb_par *par = info->par;
if (par->vbe_ib.capabilities & VBE_CAP_VGACOMPAT) {
int loop = 10000;
u8 seq = 0, crtc17 = 0;
if (blank == FB_BLANK_POWERDOWN) {
seq = 0x20;
... | 0 | 28,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: static int ftrace_module_notify_enter(struct notifier_block *self,
unsigned long val, void *data)
{
struct module *mod = data;
if (val == MODULE_STATE_COMING)
ftrace_init_module(mod, mod->ftrace_callsites,
mod->ftrace_callsites +
mod->num_ftrace_callsites);
return 0;
}
Commit Messag... | 0 | 15,178 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ProcXF86DRIDispatch(register ClientPtr client)
{
REQUEST(xReq);
switch (stuff->data) {
case X_XF86DRIQueryVersion:
return ProcXF86DRIQueryVersion(client);
case X_XF86DRIQueryDirectRenderingCapable:
return ProcXF86DRIQueryDirectRenderingCapable(client);
}
if (!client->loca... | 0 | 20,295 |
Analyze the following 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 CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
unsigned int flags)
{
BIO *cont;
int r;
if (OBJ_obj2nid(CMS_get0_type(cms)) != NID_pkcs7_digest)
{
CMSerr(CMS_F_CMS_DIGEST_VERIFY, CMS_R_TYPE_NOT_DIGESTED_DATA);
return 0;
}
if (!dcont && !check_content(cms))
return 0;
cont... | 0 | 14,555 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void serverLogFromHandler(int level, const char *msg) {
int fd;
int log_to_stdout = server.logfile[0] == '\0';
char buf[64];
if ((level&0xff) < server.verbosity || (log_to_stdout && server.daemonize))
return;
fd = log_to_stdout ? STDOUT_FILENO :
open(server.lo... | 0 | 3,717 |
Analyze the following 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_gray_list(mrb_state *mrb, mrb_gc *gc, struct RBasic *obj)
{
#ifdef MRB_GC_STRESS
if (obj->tt > MRB_TT_MAXDEFINE) {
abort();
}
#endif
paint_gray(obj);
obj->gcnext = gc->gray_list;
gc->gray_list = obj;
}
Commit Message: Clear unused stack region that may refer freed objects; fix #3596
CWE ID: CWE... | 0 | 2,912 |
Analyze the following 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 ExtensionService::UpdatePluginListWithNaClModules() {
const PepperPluginInfo* pepper_info = NULL;
std::vector<PepperPluginInfo> plugins;
PepperPluginRegistry::ComputeList(&plugins);
for (size_t i = 0; i < plugins.size(); ++i) {
pepper_info = &plugins[i];
CHECK(pepper_info);
std::vector<w... | 0 | 16,673 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void TaskManagerView::Layout() {
const int kTableButtonSpacing = 12;
gfx::Size size = kill_button_->GetPreferredSize();
int prefered_width = size.width();
int prefered_height = size.height();
tab_table_->SetBounds(
x() + views::kPanelHorizMargin,
y() + views::kPanelVertMargin,
width(... | 0 | 22,573 |
Analyze the following 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 ModifySelectionyWithPageGranularity(
LocalFrame& frame,
SelectionModifyAlteration alter,
unsigned vertical_distance,
SelectionModifyVerticalDirection direction) {
SelectionModifier selection_modifier(
frame, frame.Selection().ComputeVisibleSelectionInDOMTree());
if (!selection_modif... | 0 | 555 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: copyEntityTable(XML_Parser oldParser,
HASH_TABLE *newTable,
STRING_POOL *newPool,
const HASH_TABLE *oldTable)
{
HASH_TABLE_ITER iter;
const XML_Char *cachedOldBase = NULL;
const XML_Char *cachedNewBase = NULL;
hashTableIterInit(&iter, oldTable);
for (;;)... | 0 | 19,949 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int em_sysexit(struct x86_emulate_ctxt *ctxt)
{
const struct x86_emulate_ops *ops = ctxt->ops;
struct desc_struct cs, ss;
u64 msr_data;
int usermode;
u16 cs_sel = 0, ss_sel = 0;
/* inject #GP if in real mode or Virtual 8086 mode */
if (ctxt->mode == X86EMUL_MODE_REAL ||
ctxt->mode == X86... | 1 | 24,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: bool ContainsWebstoreTile(content::RenderFrameHost* iframe) {
int num_webstore_tiles = 0;
EXPECT_TRUE(instant_test_utils::GetIntFromJS(
iframe,
"document.querySelectorAll(\".md-tile[href='" +
l10n_util::GetStringUTF8(IDS_WEBSTORE_URL) + "']\").length",
&num_webstore_tiles));
retu... | 0 | 1,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: static void __loop_update_dio(struct loop_device *lo, bool dio)
{
struct file *file = lo->lo_backing_file;
struct address_space *mapping = file->f_mapping;
struct inode *inode = mapping->host;
unsigned short sb_bsize = 0;
unsigned dio_align = 0;
bool use_dio;
if (inode->i_sb->s_bdev) {
sb_bsize = bdev_l... | 0 | 4,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 UINT dvcman_get_configuration(IWTSListener* pListener,
void** ppPropertyBag)
{
*ppPropertyBag = NULL;
return ERROR_INTERNAL_ERROR;
}
Commit Message: Fix for #4866: Added additional length checks
CWE ID: | 0 | 12,447 |
Analyze the following 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_write_disk_gid(struct archive *_a, const char *name, int64_t id)
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
ARCHIVE_STATE_ANY, "archive_write_disk_gid");
if (a->lookup_gid)
retu... | 0 | 10,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: process_mux_stop_listening(u_int rid, Channel *c, Buffer *m, Buffer *r)
{
debug("%s: channel %d: stop listening", __func__, c->self);
if (options.control_master == SSHCTL_MASTER_ASK ||
options.control_master == SSHCTL_MASTER_AUTO_ASK) {
if (!ask_permission("Disable further multiplexing on shared "
... | 0 | 4,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: void AppCacheGroup::RemoveUpdateObserver(UpdateObserver* observer) {
observers_.RemoveObserver(observer);
queued_observers_.RemoveObserver(observer);
}
Commit Message: Refcount AppCacheGroup correctly.
Bug: 888926
Change-Id: Iab0d82d272e2f24a5e91180d64bc8e2aa8a8238d
Reviewed-on: https://chromium-review.goog... | 0 | 27,219 |
Analyze the following 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> reflectedCustomIntegralAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.TestObj.reflectedCustomIntegralAttr._get");
TestObj* imp = V8TestObj::toNative(info.Holder());
return v8::Integer::New(imp->getIntegralAttribute(WebCore::HTMLNa... | 0 | 15,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: PHP_METHOD(snmp, get)
{
php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU, SNMP_CMD_GET, (-1));
}
Commit Message:
CWE ID: CWE-416 | 0 | 14,045 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: JSValue jsTestInterfaceSupplementalStr1(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSTestInterface* castedThis = jsCast<JSTestInterface*>(asObject(slotBase));
UNUSED_PARAM(exec);
TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
JSValue result = jsString(exec, Tes... | 0 | 12,024 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int modify_raw_packet_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
const struct mlx5_modify_raw_qp_param *raw_qp_param,
u8 tx_affinity)
{
struct mlx5_ib_raw_packet_qp *raw_packet_qp = &qp->raw_packet_qp;
struct mlx5_ib_rq *rq = &raw_packet_qp->rq;
struct mlx5_ib_sq *sq = &raw_packet_qp->sq... | 0 | 22,189 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static bool send_app_scn(rfc_slot_t *slot) {
if(slot->scn_notified == true) {
return true;
}
slot->scn_notified = true;
return sock_send_all(slot->fd, (const uint8_t*)&slot->scn, sizeof(slot->scn)) == sizeof(slot->scn);
}
Commit Message: DO NOT MERGE Fix potential DoS caused by delivering signal to BT proc... | 0 | 3,146 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void PermissionPromptImpl::TogglePersist(bool value) {
if (delegate_)
delegate_->TogglePersist(value);
}
Commit Message: Elide the permission bubble title from the head of the string.
Long URLs can be used to spoof other origins in the permission bubble
title. This CL customises the title to be elided fro... | 0 | 8,027 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: store_tabletMouseRight(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
{
struct aiptek *aiptek = dev_get_drvdata(dev);
int new_button = map_str_to_val(mouse_button_map, buf, count);
if (new_button == AIPTEK_INVALID_VALUE)
return -EINVAL;
aiptek->newSetting.mouseButtonRigh... | 0 | 13,414 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) {
size_t len = 0, startPosition = 0;
xmlChar *ret = NULL;
if (CUR == '"') {
NEXT;
if (CUR_PTR < BASE_PTR)
return(ret);
startPosition = CUR_PTR - BASE_PTR;
while ((IS_CHAR_CH(CUR)) && (CUR != '"')) {
NEXT;
... | 0 | 19,166 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int UDPSocketWin::Bind(const IPEndPoint& address) {
DCHECK(!is_connected());
int rv = CreateSocket(address.GetSockAddrFamily());
if (rv < 0)
return rv;
rv = SetSocketOptions();
if (rv < 0) {
Close();
return rv;
}
rv = DoBind(address);
if (rv < 0) {
Close();
return rv;
}
loc... | 0 | 9,680 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.