instruction stringclasses 1
value | input stringlengths 64 129k | output int64 0 1 | __index_level_0__ int64 0 30k |
|---|---|---|---|
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static void setHasDirAutoFlagRecursively(Node* firstNode, bool flag, Node* lastNode = 0)
{
firstNode->setSelfOrAncestorHasDirAutoAttribute(flag);
Node* node = firstNode->firstChild();
while (node) {
if (node->selfOrAncestorHasDirAutoAttribute() == flag)
return;
if (eleme... | 0 | 10,922 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: on_favicon_received(const char *page_url, Evas_Object *icon, void *event_info)
{
Browser_Window *app_data = (Browser_Window *)event_info;
if (strcmp(page_url, ewk_view_url_get(app_data->webview)))
return;
/* Remove previous icon from URL bar */
Evas_Object *old_icon = elm_object_part_cont... | 0 | 25,065 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void V8TestCustomNamedGetter::derefObject(void* object)
{
static_cast<TestCustomNamedGetter*>(object)->deref();
}
Commit Message: [V8] Pass Isolate to throwNotEnoughArgumentsError()
https://bugs.webkit.org/show_bug.cgi?id=86983
Reviewed by Adam Barth.
The objective is to pass Isolate around in V8 bindings.... | 0 | 22,599 |
Analyze the following 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 vop_host_uninit(struct vop_info *vi)
{
struct list_head *pos, *tmp;
struct vop_vdev *vdev;
mutex_lock(&vi->vop_mutex);
vop_virtio_reset_devices(vi);
list_for_each_safe(pos, tmp, &vi->vdev_list) {
vdev = list_entry(pos, struct vop_vdev, list);
list_del(pos);
reinit_completion(&vdev->destroy);
mu... | 0 | 24,415 |
Analyze the following 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::HandleGetShaderSource(
uint32 immediate_data_size, const gles2::GetShaderSource& c) {
GLuint shader = c.shader;
uint32 bucket_id = static_cast<uint32>(c.bucket_id);
Bucket* bucket = CreateBucket(bucket_id);
ShaderManager::ShaderInfo* info = GetShaderInfoNotProgram(
... | 0 | 29,635 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int check_palette_transparency(const struct iw_palette *p)
{
int i;
int retval = 0;
for(i=0;i<p->num_entries;i++) {
if(p->entry[i].a!=255) retval=1;
if(p->entry[i].a!=255 && p->entry[i].a!=0) return 2;
}
return retval;
}
Commit Message: Fixed a bug that could cause invalid memory to be accessed
... | 0 | 12,426 |
Analyze the following 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 unsigned update_treesame(struct rev_info *revs, struct commit *commit)
{
if (commit->parents && commit->parents->next) {
unsigned n;
struct treesame_state *st;
struct commit_list *p;
unsigned relevant_parents;
unsigned relevant_change, irrelevant_change;
st = lookup_decoration(&revs->treesame... | 0 | 16,120 |
Analyze the following 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 PageCaptureSaveAsMHTMLFunction::CreateTemporaryFile() {
bool success = base::CreateTemporaryFile(&mhtml_path_);
base::PostTaskWithTraits(
FROM_HERE, {BrowserThread::IO},
base::BindOnce(&PageCaptureSaveAsMHTMLFunction::TemporaryFileCreatedOnIO,
this, success));
}
Commit M... | 0 | 8,476 |
Analyze the following 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 FreeWrapper(void * /* userData */, void* ptr) {
free(ptr);
}
Commit Message: DO NOT MERGE Verify OMX buffer sizes prior to access
Bug: 27207275
Change-Id: I4412825d1ee233d993af0a67708bea54304ff62d
CWE ID: CWE-119 | 0 | 17,813 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: ZEND_API zend_class_entry *zend_lookup_class(zend_string *name) /* {{{ */
{
return zend_lookup_class_ex(name, NULL, 1);
}
/* }}} */
Commit Message: Use format string
CWE ID: CWE-134 | 0 | 7,435 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static INT AirPDcapScanForKeys(
PAIRPDCAP_CONTEXT ctx,
const guint8 *data,
const guint mac_header_len,
const guint tot_len,
AIRPDCAP_SEC_ASSOCIATION_ID id
)
{
const UCHAR *addr;
guint bodyLength;
PAIRPDCAP_SEC_ASSOCIATION sta_sa;
PAIRPDCAP_SEC_ASSOCIATION sa;
guint offset =... | 0 | 23,004 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: DevToolsHttpHandler::DevToolsHttpHandler(
DevToolsManagerDelegate* delegate,
std::unique_ptr<DevToolsSocketFactory> socket_factory,
const base::FilePath& output_directory,
const base::FilePath& debug_frontend_dir)
: delegate_(delegate), weak_factory_(this) {
browser_guid_ = delegate_->IsBrow... | 0 | 28,551 |
Analyze the following 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 Layer::IndexOfChild(const Layer* reference) {
for (size_t i = 0; i < children_.size(); ++i) {
if (children_[i].get() == reference)
return i;
}
return -1;
}
Commit Message: Removed pinch viewport scroll offset distribution
The associated change in Blink makes the pinch viewport a proper
Scrol... | 0 | 8,700 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SpoolssAddPrinterDriver_r(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
dcerpc_info *di, guint8 *drep _U_)
{
/* Parse packet */
offset = dissect_doserror(
tvb, offset, pinfo, tree, di, drep, hf_rc, NULL);
return offset;
}
Commit Message: SPOOLSS: Try to avoid an infini... | 0 | 26,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: GURL Extension::GalleryUpdateUrl(bool secure) {
CommandLine* cmdline = CommandLine::ForCurrentProcess();
if (cmdline->HasSwitch(switches::kAppsGalleryUpdateURL))
return GURL(cmdline->GetSwitchValueASCII(switches::kAppsGalleryUpdateURL));
else
return GURL(secure ? kGalleryUpdateHttpsUrl : kGalleryUpd... | 0 | 1,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 inline struct anon_vma_chain *anon_vma_chain_alloc(gfp_t gfp)
{
return kmem_cache_alloc(anon_vma_chain_cachep, gfp);
}
Commit Message: mm: try_to_unmap_cluster() should lock_page() before mlocking
A BUG_ON(!PageLocked) was triggered in mlock_vma_page() by Sasha Levin
fuzzing with trinity. The call site... | 0 | 19,804 |
Analyze the following 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 SyncBackendHost::Core::processing_passphrase() const {
DCHECK(MessageLoop::current() == host_->frontend_loop_);
return processing_passphrase_;
}
Commit Message: Enable HistoryModelWorker by default, now that bug 69561 is fixed.
BUG=69561
TEST=Run sync manually and run integration tests, sync should not... | 0 | 3,551 |
Analyze the following 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 free_vm86_irq(int irqnumber)
{
unsigned long flags;
free_irq(irqnumber, NULL);
vm86_irqs[irqnumber].tsk = NULL;
spin_lock_irqsave(&irqbits_lock, flags);
irqbits &= ~(1 << irqnumber);
spin_unlock_irqrestore(&irqbits_lock, flags);
}
Commit Message: mm: thp: fix pmd_bad() triggering in co... | 0 | 15,749 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: jas_stream_t *jpc_streamlist_get(jpc_streamlist_t *streamlist, int streamno)
{
assert(streamno < streamlist->numstreams);
return streamlist->streams[streamno];
}
Commit Message: Fixed an integral type promotion problem by adding a JAS_CAST.
Modified the jpc_tsfb_synthesize function so that it will be a noop fo... | 0 | 14,578 |
Analyze the following 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 MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
ALOGV("entering parseChunk %lld/%d", *offset, depth);
uint32_t hdr[2];
if (mDataSource->readAt(*offset, hdr, 8) < 8) {
return ERROR_IO;
}
uint64_t chunk_size = ntohl(hdr[0]);
uint32_t chunk_type = ntohl(hdr[1]);
off64_t data_offset = *of... | 0 | 18,779 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void TabStripModel::AddObserver(TabStripModelObserver* observer) {
observers_.AddObserver(observer);
}
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... | 0 | 29,225 |
Analyze the following 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 EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
const unsigned char *key, const unsigned char *iv)
{
return EVP_CipherInit(ctx, cipher, key, iv, 0);
}
Commit Message:
CWE ID: CWE-189 | 0 | 27,263 |
Analyze the following 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 SessionStore::WriteBatch::PutWithoutUpdatingTracker(
const sync_pb::SessionSpecifics& specifics) {
DCHECK(AreValidSpecifics(specifics));
const std::string storage_key = GetStorageKey(specifics);
batch_->WriteData(storage_key, specifics.SerializeAsString());
return storage_key;
}
Commit M... | 0 | 21,054 |
Analyze the following 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 swevent_hlist_put(void)
{
int cpu;
for_each_possible_cpu(cpu)
swevent_hlist_put_cpu(cpu);
}
Commit Message: perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-exist... | 0 | 18,280 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: event_sched_out(struct perf_event *event,
struct perf_cpu_context *cpuctx,
struct perf_event_context *ctx)
{
u64 tstamp = perf_event_time(event);
u64 delta;
/*
* An event which could not be activated because of
* filter mismatch still needs to have its timings
* maintained, otherwise bogus inform... | 0 | 27,326 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: isoent_make_path_table(struct archive_write *a)
{
struct iso9660 *iso9660 = a->format_data;
int depth, r;
int dir_number;
/*
* Init Path Table.
*/
if (iso9660->dircnt_max >= MAX_DEPTH &&
(!iso9660->opt.limit_depth || iso9660->opt.iso_level == 4))
r = isoent_alloc_path_table(a, &(iso9660->primary)... | 0 | 8,292 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: uint32_t GetImageId() const {
return wallpaper::WallpaperResizer::GetImageId(user_wallpaper_);
}
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:... | 0 | 6,016 |
Analyze the following 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 decode_putrootfh(struct xdr_stream *xdr)
{
return decode_op_hdr(xdr, OP_PUTROOTFH);
}
Commit Message: NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
CWE ID: | 0 | 917 |
Analyze the following 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 mbedtls_ecp_curve_info *mbedtls_ecp_curve_info_from_name( const char *name )
{
const mbedtls_ecp_curve_info *curve_info;
for( curve_info = mbedtls_ecp_curve_list();
curve_info->grp_id != MBEDTLS_ECP_DP_NONE;
curve_info++ )
{
if( strcmp( curve_info->name, name ) == 0 )
... | 0 | 3,811 |
Analyze the following 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 ap_uevent (struct device *dev, struct kobj_uevent_env *env)
{
struct ap_device *ap_dev = to_ap_dev(dev);
int retval = 0;
if (!ap_dev)
return -ENODEV;
/* Set up DEV_TYPE environment variable. */
retval = add_uevent_var(env, "DEV_TYPE=%04X", ap_dev->device_type);
if (retval)
return retval;
... | 0 | 29,105 |
Analyze the following 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 GraphicBuffer::lockAsync(uint32_t usage, void** vaddr, int fenceFd)
{
const Rect lockBounds(width, height);
status_t res = lockAsync(usage, lockBounds, vaddr, fenceFd);
return res;
}
Commit Message: Fix for corruption when numFds or numInts is too large.
Bug: 18076253
Change-Id: I4c5935440013fc755e1... | 0 | 7,250 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int uvesafb_setcolreg(unsigned regno, unsigned red, unsigned green,
unsigned blue, unsigned transp,
struct fb_info *info)
{
struct uvesafb_pal_entry entry;
int shift = 16 - dac_width;
int err = 0;
if (regno >= info->cmap.len)
return -EINVAL;
if (info->var.bits_per_pixel == 8) {
entry.red =... | 0 | 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: static bool reg_is_pkt_pointer_any(const struct bpf_reg_state *reg)
{
return reg_is_pkt_pointer(reg) ||
reg->type == PTR_TO_PACKET_END;
}
Commit Message: bpf: fix branch pruning logic
when the verifier detects that register contains a runtime constant
and it's compared with another constant it will pru... | 0 | 23,313 |
Analyze the following 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 V8Debugger::v8DebugEventCallback(const v8::Debug::EventDetails& eventDetails)
{
V8Debugger* thisPtr = toV8Debugger(eventDetails.GetCallbackData());
thisPtr->handleV8DebugEvent(eventDetails);
}
Commit Message: [DevTools] Copy objects from debugger context to inspected context properly.
BUG=637594
R... | 0 | 11,099 |
Analyze the following 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_send_NPWindowData(rpc_message_t *message, void *p_value)
{
NPWindow *window = (NPWindow *)p_value;
int error;
if (window == NULL)
return RPC_ERROR_MESSAGE_ARGUMENT_INVALID;
if ((error = rpc_message_send_uint32(message, (Window)window->window)) < 0)
return error;
if ((error = rpc_messag... | 0 | 7,373 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: void PrintWebViewHelper::OnPrintNodeUnderContextMenu() {
const WebNode& context_menu_node = render_view()->GetContextMenuNode();
PrintNode(context_menu_node);
}
Commit Message: Print preview: Use an ID instead of memory pointer string in WebUI.
BUG=144051
Review URL: https://chromiumcodereview.appspot.com/... | 0 | 20,322 |
Analyze the following 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 mptsas_config_ioc_6(MPTSASState *s, uint8_t **data, int address)
{
return MPTSAS_CONFIG_PACK(6, MPI_CONFIG_PAGETYPE_IOC, 0x01,
"*l*b*b*b*b*b*b*b*b*b*b*w*l*l*l*l*b*b*w"
"*w*w*w*w*l*l*l");
}
Commit Message:
CWE ID: CWE-20 | 0 | 20,228 |
Analyze the following 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_stack(struct vm_area_struct *vma)
{
/*
* We make no effort to guess what a given thread considers to be
* its "stack". It's not even well-defined for programs written
* languages like Go.
*/
return vma->vm_start <= vma->vm_mm->start_stack &&
vma->vm_end >= vma->vm_mm->start_stack;
}
Co... | 0 | 11,749 |
Analyze the following 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 l2cap_conn_del(struct hci_conn *hcon, int err)
{
struct l2cap_conn *conn = hcon->l2cap_data;
struct sock *sk;
if (!conn)
return;
BT_DBG("hcon %p conn %p, err %d", hcon, conn, err);
kfree_skb(conn->rx_skb);
/* Kill channels */
while ((sk = conn->chan_list.head)) {
bh_lock_sock(sk);
l2c... | 0 | 24,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: static int jp2_cdef_getdata(jp2_box_t *box, jas_stream_t *in)
{
jp2_cdef_t *cdef = &box->data.cdef;
jp2_cdefchan_t *chan;
unsigned int channo;
if (jp2_getuint16(in, &cdef->numchans)) {
return -1;
}
if (!(cdef->ents = jas_alloc2(cdef->numchans, sizeof(jp2_cdefchan_t)))) {
return -1;
}
for (channo... | 1 | 20,355 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: const struct ldb_val *ldb_dn_get_component_val(struct ldb_dn *dn,
unsigned int num)
{
if ( ! ldb_dn_validate(dn)) {
return NULL;
}
if (num >= dn->comp_num) return NULL;
return &dn->components[num].value;
}
Commit Message:
CWE ID: CWE-200 | 0 | 162 |
Analyze the following 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 commit_match(struct commit *commit, struct rev_info *opt)
{
int retval;
const char *encoding;
const char *message;
struct strbuf buf = STRBUF_INIT;
if (!opt->grep_filter.pattern_list && !opt->grep_filter.header_list)
return 1;
/* Prepend "fake" headers as needed */
if (opt->grep_filter.use_r... | 0 | 24,902 |
Analyze the following 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 suspend_audio_datapath(struct a2dp_stream_common *common, bool standby)
{
INFO("state %d", common->state);
if (common->ctrl_fd == AUDIO_SKT_DISCONNECTED)
return -1;
if (common->state == AUDIO_A2DP_STATE_STOPPING)
return -1;
if (a2dp_command(common, A2DP_CTRL_CMD_SUSPEND) < 0)
return -1;
... | 0 | 16,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: ~DownloadItemTest() {
}
Commit Message: Refactors to simplify rename pathway in DownloadFileManager.
This is https://chromiumcodereview.appspot.com/10668004 / r144817 (reverted
due to CrOS failure) with the completion logic moved to after the
auto-opening. The tests that test the auto-opening (for web st... | 0 | 3,599 |
Analyze the following 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 ProfileSyncService::NotifyObservers() {
FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged());
sync_js_controller_.HandleJsEvent(
"onServiceStateChanged", JsEventDetails());
}
Commit Message: [Sync] Cleanup all tab sync enabling logic now that its on by default.
BUG=none
TEST=
Review URL: h... | 0 | 23,188 |
Analyze the following 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 NavigationControllerImpl::GetPendingEntryIndex() const {
return pending_entry_index_;
}
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... | 0 | 7,201 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: content::KeyboardEventProcessingResult DevToolsWindow::PreHandleKeyboardEvent(
WebContents* source,
const content::NativeWebKeyboardEvent& event) {
BrowserWindow* inspected_window = GetInspectedBrowserWindow();
if (inspected_window) {
return inspected_window->PreHandleKeyboardEvent(event);
}
r... | 0 | 20,049 |
Analyze the following 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 RTCPeerConnectionHandler::AddTransceiverWithTrackOnSignalingThread(
rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> webrtc_track,
webrtc::RtpTransceiverInit init,
TransceiverStateSurfacer* transceiver_state_surfacer,
webrtc::RTCErrorOr<rtc::scoped_refptr<webrtc::RtpTransceiverInterface>... | 0 | 23,853 |
Analyze the following 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 PageHandler::SetRenderer(RenderProcessHost* process_host,
RenderFrameHostImpl* frame_host) {
if (host_ == frame_host)
return;
RenderWidgetHostImpl* widget_host =
host_ ? host_->GetRenderWidgetHost() : nullptr;
if (widget_host) {
registrar_.Remove(
... | 1 | 26,667 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static struct sk_buff *alloc_tx(struct atm_vcc *vcc, unsigned int size)
{
struct sk_buff *skb;
struct sock *sk = sk_atm(vcc);
if (sk_wmem_alloc_get(sk) && !atm_may_send(vcc, size)) {
pr_debug("Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n",
sk_wmem_alloc_get(sk), size, sk->sk_sndbuf);
return NULL;
... | 0 | 209 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PHPAPI int php_exec(int type, char *cmd, zval *array, zval *return_value TSRMLS_DC)
{
FILE *fp;
char *buf;
int l = 0, pclose_return;
char *b, *d=NULL;
php_stream *stream;
size_t buflen, bufl = 0;
#if PHP_SIGCHILD
void (*sig_handler)() = NULL;
#endif
#if PHP_SIGCHILD
sig_handler = signal (SIGCHLD, SIG_DFL... | 0 | 17,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 inline ssize_t WritePSDOffset(const PSDInfo *psd_info,Image *image,
const MagickSizeType size,const MagickSizeType offset)
{
MagickSizeType
current_offset;
ssize_t
result;
current_offset=TellBlob(image);
SeekBlob(image,offset,SEEK_SET);
if (psd_info->version == 1)
result=WriteBlob... | 0 | 18,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: void RenderWidgetHostViewAura::CopyFromCompositingSurface(
const gfx::Rect& src_subrect,
const gfx::Size& dst_size,
const base::Callback<void(bool)>& callback,
skia::PlatformBitmap* output) {
base::ScopedClosureRunner scoped_callback_runner(base::Bind(callback, false));
std::map<uint64, scope... | 1 | 3,316 |
Analyze the following 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 lua_apr_rmdir(lua_State *L)
{
request_rec *r;
const char *path;
apr_status_t status;
r = ap_lua_check_request_rec(L, 1);
luaL_checktype(L, 2, LUA_TSTRING);
path = lua_tostring(L, 2);
status = apr_dir_remove(path, r->pool);
lua_pushboolean(L, (status == 0));
... | 0 | 6,365 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: Node* Document::cloneNode(bool deep, ExceptionState&) {
Document* clone = CloneDocumentWithoutChildren();
clone->CloneDataFromDocument(*this);
if (deep)
CloneChildNodes(clone);
return clone;
}
Commit Message: Inherit CSP when we inherit the security origin
This prevents attacks that use main window ... | 0 | 27,455 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: base::Optional<AuthenticatorGetInfoResponse> ReadCTAPGetInfoResponse(
base::span<const uint8_t> buffer) {
if (buffer.size() <= kResponseCodeLength ||
GetResponseCode(buffer) != CtapDeviceResponseCode::kSuccess)
return base::nullopt;
base::Optional<CBOR> decoded_response =
cbor::CBORReader... | 1 | 26,751 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: get_control_selector_name(guint8 entity_id, guint8 control_sel, usb_conv_info_t *usb_conv_info)
{
const gchar *control_name = NULL;
value_string_ext *selectors = NULL;
selectors = get_control_selector_values(entity_id, usb_conv_info);
if (selectors)
control_name = try_val_to_str_ext... | 0 | 29,341 |
Analyze the following 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 mem_write(jas_stream_obj_t *obj, char *buf, int cnt)
{
size_t n;
int ret;
jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj;
size_t newbufsize;
size_t newpos;
assert(buf);
assert(cnt >= 0);
JAS_DBGLOG(100, ("mem_write(%p, %p, %d)\n", obj, buf, cnt));
newpos = m->pos_ + cnt;
if (newpos > m... | 0 | 28,648 |
Analyze the following 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::RunScriptsAtDocumentReady(bool document_is_empty) {
base::WeakPtr<RenderFrameImpl> weak_self = weak_factory_.GetWeakPtr();
GetContentClient()->renderer()->RunScriptsAtDocumentEnd(this);
if (!weak_self.get())
return;
if (!document_is_empty)
return;
InternalDocumentStateD... | 0 | 11,170 |
Analyze the following 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 RenderFrameHostImpl::GetEnabledBindings() {
return enabled_bindings_;
}
Commit Message: Convert FrameHostMsg_DidAddMessageToConsole to Mojo.
Note: Since this required changing the test
RenderViewImplTest.DispatchBeforeUnloadCanDetachFrame, I manually
re-introduced https://crbug.com/666714 locally (the bug... | 0 | 8,576 |
Analyze the following 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 Image *ReadDPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
const char
*client_name;
Display
*display;
float
pixels_per_point;
Image
*image;
int
sans,
status;
Pixmap
pixmap;
register IndexPacket
*indexes;
register ssize_t
i;
regi... | 1 | 2,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 gboolean reload_notify(gpointer data)
{
MenuCache* cache = (MenuCache*)data;
GSList* l;
MENU_CACHE_LOCK;
/* we have it referenced and there is no source removal so no check */
for( l = cache->notifiers; l; l = l->next )
{
CacheReloadNotifier* n = (CacheReloadNotifier*)l->dat... | 0 | 16,978 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: static int fuse_writepage(struct page *page, struct writeback_control *wbc)
{
int err;
err = fuse_writepage_locked(page);
unlock_page(page);
return err;
}
Commit Message: fuse: verify ioctl retries
Verify that the total length of the iovec returned in FUSE_IOCTL_RETRY
doesn't overflow iov_length().
Signe... | 0 | 10,898 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: int setup_allrouters_membership(struct Interface *iface)
{
struct ipv6_mreq mreq;
memset(&mreq, 0, sizeof(mreq));
mreq.ipv6mr_interface = iface->if_index;
/* ipv6-allrouters: ff02::2 */
mreq.ipv6mr_multiaddr.s6_addr32[0] = htonl(0xFF020000);
mreq.ipv6mr_multiaddr.s6_addr32[3] = htonl(0x2);
if (setsockop... | 0 | 7,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: static inline int kvmppc_get_vsr_data(struct kvm_vcpu *vcpu, int rs, u64 *val)
{
u32 dword_offset, word_offset;
union kvmppc_one_reg reg;
int vsx_offset = 0;
int copy_type = vcpu->arch.mmio_vsx_copy_type;
int result = 0;
switch (copy_type) {
case KVMPPC_VSX_COPY_DWORD:
vsx_offset =
kvmppc_get_vsr_dwo... | 0 | 21,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: void RenderViewHostImpl::ClosePage() {
is_waiting_for_unload_ack_ = true;
StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS));
if (IsRenderViewLive()) {
increment_in_flight_event_count();
NotificationService::current()->Notify(
NOTIFICATION_RENDER_VIEW_HOST_WILL_CLOSE_RE... | 0 | 27,159 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: AcpiDsClearImplicitReturn (
ACPI_WALK_STATE *WalkState)
{
ACPI_FUNCTION_NAME (DsClearImplicitReturn);
/*
* Slack must be enabled for this feature
*/
if (!AcpiGbl_EnableInterpreterSlack)
{
return;
}
if (WalkState->ImplicitReturnObj)
{
/*
... | 0 | 18,818 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PassRefPtr<CSSValue> CSSComputedStyleDeclaration::valueForCustomFilterParameter(const CustomFilterParameter* parameter) const
{
ASSERT(parameter);
switch (parameter->parameterType()) {
case CustomFilterParameter::NUMBER:
return valueForCustomFilterNumberParameter(static_cast<const CustomFilter... | 0 | 20,731 |
Analyze the following 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_try_to_write_inline_data(struct address_space *mapping,
struct inode *inode, loff_t pos,
unsigned len, struct page *mmap_page,
struct ocfs2_write_ctxt *wc)
{
int ret, written = 0;
loff_t end = pos + len;
struct ocfs2_inode_info *oi = OCFS2_I(inode);
struct ocfs2_dinode *d... | 0 | 26,845 |
Analyze the following 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 RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread(int id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
auto it =
std::find(aec_dump_consumers_.begin(), aec_dump_consumers_.end(), id);
if (it != aec_dump_consumers_.end())
aec_dump_consumers_.erase(it);
}
Commit Message: Correct mojo::Wr... | 0 | 9,599 |
Analyze the following 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() {
if (received_notification_)
return;
waiting_ = true;
base::RunLoop run_loop;
run_loop.Run();
}
Commit Message: [Extensions] Have URLPattern::Contains() properly check schemes
Have URLPattern::Contains() properly check the schemes of the patterns
when evaluating if one pa... | 0 | 27,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: static int crypto_ctr_init_tfm(struct crypto_tfm *tfm)
{
struct crypto_instance *inst = (void *)tfm->__crt_alg;
struct crypto_spawn *spawn = crypto_instance_ctx(inst);
struct crypto_ctr_ctx *ctx = crypto_tfm_ctx(tfm);
struct crypto_cipher *cipher;
cipher = crypto_spawn_cipher(spawn);
if (IS_ERR(cipher))
... | 0 | 15,666 |
Analyze the following 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 FileBrowserPrivateGetDriveEntryPropertiesFunction::RunAsync() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
using api::file_browser_private::GetDriveEntryProperties::Params;
const scoped_ptr<Params> params(Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params);
properties_list_.r... | 0 | 12,473 |
Analyze the following 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 inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap,
int destroy)
{
__inet_del_ifa(in_dev, ifap, destroy, NULL, 0);
}
Commit Message: ipv4: Don't do expensive useless work during inetdev destroy.
When an inetdev is destroyed, every address assigned to the interface
is removed. And i... | 0 | 20,508 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: spnego_gss_get_mic_iov_length(OM_uint32 *minor_status,
gss_ctx_id_t context_handle, gss_qop_t qop_req,
gss_iov_buffer_desc *iov, int iov_count)
{
return gss_get_mic_iov_length(minor_status, context_handle, qop_req, iov,
iov_count);
}
Commit Message: Fix SPNEGO context aliasing bu... | 1 | 2,002 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: exsltCryptoCryptoApiCreateHash (xmlXPathParserContextPtr ctxt,
HCRYPTPROV hCryptProv, ALG_ID algorithm,
const char *msg, unsigned int msglen,
char *dest, unsigned int destlen)
{
HCRYPTHASH hHash = 0;
DWORD dwHashLen = destlen;
if (!CryptCreateHash (hCryptProv, algorithm, 0, 0, &hHash)) {
... | 0 | 10,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: static int macvlan_port_create(struct net_device *dev)
{
struct macvlan_port *port;
unsigned int i;
int err;
if (dev->type != ARPHRD_ETHER || dev->flags & IFF_LOOPBACK)
return -EINVAL;
port = kzalloc(sizeof(*port), GFP_KERNEL);
if (port == NULL)
return -ENOMEM;
port->passthru = false;
port->dev = d... | 0 | 19,174 |
Analyze the following 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 X509_digest(const X509 *data, const EVP_MD *type, unsigned char *md,
unsigned int *len)
{
return(ASN1_item_digest(ASN1_ITEM_rptr(X509),type,(char *)data,md,len));
}
Commit Message: Fix various certificate fingerprint issues.
By using non-DER or invalid encodings outside the signed portion of a
cert... | 0 | 18,848 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: long vhost_dev_set_owner(struct vhost_dev *dev)
{
struct task_struct *worker;
int err;
/* Is there an owner already? */
if (vhost_dev_has_owner(dev)) {
err = -EBUSY;
goto err_mm;
}
/* No owner, become one */
dev->mm = get_task_mm(current);
worker = kthread_create(vhost_worker, dev, "vhost-%d", curre... | 0 | 8,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: void ContentSecurityPolicy::AddAndReportPolicyFromHeaderValue(
const String& header,
ContentSecurityPolicyHeaderType type,
ContentSecurityPolicyHeaderSource source) {
wtf_size_t previous_policy_count = policies_.size();
AddPolicyFromHeaderValue(header, type, source);
WebVector<WebContentSecurity... | 0 | 18,519 |
Analyze the following 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 GamepadProvider::Pause() {
{
base::AutoLock lock(is_paused_lock_);
is_paused_ = true;
}
base::MessageLoop* polling_loop = polling_thread_->message_loop();
polling_loop->task_runner()->PostTask(
FROM_HERE,
base::Bind(&GamepadProvider::SendPauseHint, Unretained(this), true));
}
Com... | 0 | 4,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: archive_read_set_read_callback(struct archive *_a,
archive_read_callback *client_reader)
{
struct archive_read *a = (struct archive_read *)_a;
archive_check_magic(_a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_NEW,
"archive_read_set_read_callback");
a->client.reader = client_reader;
return ARCHIVE_OK;
}
Comm... | 0 | 14,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 V8TestNamedConstructor::derefObject(void* object)
{
static_cast<TestNamedConstructor*>(object)->deref();
}
Commit Message: [V8] Pass Isolate to throwNotEnoughArgumentsError()
https://bugs.webkit.org/show_bug.cgi?id=86983
Reviewed by Adam Barth.
The objective is to pass Isolate around in V8 bindings.
T... | 0 | 20,172 |
Analyze the following 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 FileSystemOperation::DoOpenFile(const OpenFileCallback& callback,
int file_flags) {
FileSystemFileUtilProxy::CreateOrOpen(
&operation_context_, src_util_, src_path_, file_flags,
base::Bind(&FileSystemOperation::DidOpenFile,
base::Owned(this)... | 0 | 10,862 |
Analyze the following 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 __be32 nfs41_check_op_ordering(struct nfsd4_compoundargs *args)
{
struct nfsd4_op *op = &args->ops[0];
/* These ordering requirements don't apply to NFSv4.0: */
if (args->minorversion == 0)
return nfs_ok;
/* This is weird, but OK, not our problem: */
if (args->opcnt == 0)
return nfs_ok;
if (op->... | 0 | 3,050 |
Analyze the following 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 GetDeviceFormatsInUse() {
const base::Callback<void(const media::VideoCaptureFormats&)>
callback = base::Bind(
&VideoCaptureImplTest::OnDeviceFormatsInUse,
base::Unretained(this));
video_capture_impl_->GetDeviceFormatsInUse(callback);
}
Commit Message: Correct moj... | 0 | 3,817 |
Analyze the following 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 RenderWidgetHostViewAura::SetHasHorizontalScrollbar(
bool has_horizontal_scrollbar) {
}
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 renderer contexts
- do not r... | 0 | 12,048 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: PlatformGraphicsContext* GraphicsContext::platformContext() const
{
ASSERT(!paintingDisabled());
return m_data;
}
Commit Message: [skia] not all convex paths are convex, so recompute convexity for the problematic ones
https://bugs.webkit.org/show_bug.cgi?id=75960
Reviewed by Stephen White.
No new tests... | 0 | 15,369 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: cached_NPN_GetIntIdentifier(int32_t intid)
{
NPIdentifier ident;
if (!use_npidentifier_cache())
ident = invoke_NPN_GetIntIdentifier(intid);
#if USE_NPIDENTIFIER_CACHE
else if (!npidentifier_cache_has_int(intid, &ident)) {
ident = invoke_NPN_GetIntIdentifier(intid);
npidentifier_cache_reserve(1);
npident... | 0 | 1,332 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock,
const struct __kernel_timespec __user *, tp)
{
const struct k_clock *kc = clockid_to_kclock(which_clock);
struct timespec64 new_tp;
if (!kc || !kc->clock_set)
return -EINVAL;
if (get_timespec64(&new_tp, tp))
return -EFAULT;
return kc->cloc... | 0 | 10,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: do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
int swap, uint32_t namesz, uint32_t descsz,
size_t noff, size_t doff, int *flags, size_t size, int clazz)
{
#ifdef ELFCORE
int os_style = -1;
/*
* Sigh. The 2.0.36 kernel in Debian 2.1, at
* least, doesn't correctly implement na... | 0 | 17,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: static int patternalternatespace(i_ctx_t * i_ctx_p, ref *space, ref **r, int *CIESubst)
{
ref tref;
int code;
if (!r_has_type(*r, t_name)) {
if (r_is_array(*r)) {
if (r_size(*r) > 1) {
code = array_get(imemory, space, 1, &tref);
if (code < 0)
... | 0 | 17,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: iakerb_acceptor_step(iakerb_ctx_id_t ctx,
int initialContextToken,
const gss_buffer_t input_token,
gss_buffer_t output_token)
{
krb5_error_code code;
krb5_data request = empty_data(), reply = empty_data();
krb5_data realm = empty_data();
... | 0 | 19,103 |
Analyze the following 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 sync_helper(struct ImapData *idata, int right, int flag, const char *name)
{
int count = 0;
int rc;
char buf[LONG_STRING];
if (!idata->ctx)
return -1;
if (!mutt_bit_isset(idata->ctx->rights, right))
return 0;
if (right == MUTT_ACL_WRITE && !imap_has_flag(&idata->flags, name))
... | 0 | 16,154 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartPtr (int size, void *data, int srcx, int srcy, int w,
int h)
{
_noLibzError();
return NULL;
}
Commit Message: gd2: handle corrupt images better (CVE-2016-3074)
Make sure we do some range checking on corrupted chunks.
Thanks to Hans Jerry Illikainen <hji... | 0 | 26,480 |
Analyze the following code, commit message, and CWE ID. Determine whether it has a vulnerability. If it does, return '1'; if it doesn't, return '0'. | Code: _rsvg_io_acquire_data (const char *href,
const char *base_uri,
char **mime_type,
gsize *len,
GCancellable *cancellable,
GError **error)
{
char *data;
gsize llen;
if (!(href && *href)) ... | 0 | 6,640 |
Analyze the following 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 TabLifecycleUnitSource::TabLifecycleUnit::OnLifecycleUnitStateChanged(
LifecycleUnitState last_state,
LifecycleUnitStateChangeReason reason) {
DCHECK(IsValidStateChange(last_state, GetState(), reason))
<< "Cannot transition TabLifecycleUnit state from " << last_state
<< " to " << GetSta... | 0 | 2,933 |
Analyze the following 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 nl80211_send_survey(struct sk_buff *msg, u32 pid, u32 seq,
int flags, struct net_device *dev,
struct survey_info *survey)
{
void *hdr;
struct nlattr *infoattr;
/* Survey without a channel doesn't make sense */
if (!survey->channel)
return -EINVAL;
hdr = nl80211hdr_put(msg, pid, seq, fl... | 0 | 13,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: set_num_712(unsigned char *p, char value)
{
*((char *)p) = value;
}
Commit Message: Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives
* Don't cast size_t to int, since this can lead to overflow
on machines where sizeof(int) < sizeof(size_t)
* Check a + b > limit by wr... | 0 | 13,755 |
Analyze the following 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 flush_delayed_fput(void)
{
delayed_fput(NULL);
}
Commit Message: get rid of s_files and files_lock
The only thing we need it for is alt-sysrq-r (emergency remount r/o)
and these days we can do just as well without going through the
list of files.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
CWE ID: C... | 0 | 12,684 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.