Dataset Viewer
Auto-converted to Parquet Duplicate
project
stringclasses
791 values
commit_id
stringlengths
6
81
CVE ID
stringlengths
13
16
CWE ID
stringclasses
127 values
func
stringlengths
5
484k
vul
int8
0
1
cJSON
94df772485c92866ca417d92137747b2e3b0a917
NOT_APPLICABLE
NOT_APPLICABLE
void cJSON_ReplaceItemInArray(cJSON *array,int which,cJSON *newitem) {cJSON *c=array->child;while (c && which>0) c=c->next,which--;if (!c) return; newitem->next=c->next;newitem->prev=c->prev;if (newitem->next) newitem->next->prev=newitem; if (c==array->child) array->child=newitem; else newitem->prev->next=newitem;...
0
linux
fc3a9157d3148ab91039c75423da8ef97be3e105
NOT_APPLICABLE
NOT_APPLICABLE
void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) { if (vcpu->arch.time_page) { kvm_release_page_dirty(vcpu->arch.time_page); vcpu->arch.time_page = NULL; } free_cpumask_var(vcpu->arch.wbinvd_dirty_mask); fx_free(vcpu); kvm_x86_ops->vcpu_free(vcpu); }
0
Chrome
e89cfcb9090e8c98129ae9160c513f504db74599
NOT_APPLICABLE
NOT_APPLICABLE
AutomationProviderBookmarkModelObserver( AutomationProvider* provider, IPC::Message* reply_message, BookmarkModel* model, bool use_json_interface) : automation_provider_(provider->AsWeakPtr()), reply_message_(reply_message), model_(model), use_json_interface_(use_json_interface) { ...
0
pjproject
560a1346f87aabe126509bb24930106dea292b00
NOT_APPLICABLE
NOT_APPLICABLE
PJ_DEF(int) pjmedia_sdp_media_print(const pjmedia_sdp_media *media, char *buf, pj_size_t size) { return print_media_desc(media, buf, size); }
0
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
NOT_APPLICABLE
NOT_APPLICABLE
_nc_mouse_event(SCREEN *sp) { MEVENT *eventp = sp->_mouse_eventp; bool result = FALSE; (void) eventp; switch (sp->_mouse_type) { case M_XTERM: /* xterm: never have to query, mouse events are in the keyboard stream */ #if USE_EMX_MOUSE { char kbuf[3]; int i, res = read(M_FD(sp), &kbuf,...
0
libass
f4f48950788b91c6a30029cc28a240b834713ea7
NOT_APPLICABLE
NOT_APPLICABLE
static int cmp_segment(const void *p1, const void *p2) { return ((Segment *) p1)->a - ((Segment *) p2)->a; }
0
Chrome
94bb8861ec61b4ebcce8a4489be2cf7e2a055d90
NOT_APPLICABLE
NOT_APPLICABLE
ConvolverNode::ConvolverNode(AudioContext* context, float sampleRate) : AudioNode(context, sampleRate) , m_normalize(true) { ScriptWrappable::init(this); addInput(adoptPtr(new AudioNodeInput(this))); addOutput(adoptPtr(new AudioNodeOutput(this, 2))); m_channelCount = 2; m_channelCountMode =...
0
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
NOT_APPLICABLE
NOT_APPLICABLE
extension_info_start (NautilusDirectory *directory, NautilusFile *file, gboolean *doing_io) { NautilusInfoProvider *provider; NautilusOperationResult result; NautilusOperationHandle *handle; GClosure *update_complete; if (directory->details-...
0
teeworlds
a766cb44bcffcdb0b88e776d01c5ee1323d44f85
NOT_APPLICABLE
NOT_APPLICABLE
static void StrRtrim(char *pStr) { int i = str_length(pStr); while(i >= 0) { if(pStr[i] < 0 || pStr[i] > 32) break; pStr[i] = 0; i--; } }
0
linux
6a024330650e24556b8a18cc654ad00cfecf6c6c
NOT_APPLICABLE
NOT_APPLICABLE
static irqreturn_t fsl_hv_isr(int irq, void *data) { fsl_hv_queue_doorbell((uintptr_t) data); return IRQ_HANDLED; }
0
Chrome
b2b21468c1f7f08b30a7c1755316f6026c50eb2a
NOT_APPLICABLE
NOT_APPLICABLE
bool RenderFlexibleBox::isColumnFlow() const { return style()->isColumnFlexDirection(); }
0
poppler
fada09a2ccc11a3a1d308e810f1336d8df6011fd
NOT_APPLICABLE
NOT_APPLICABLE
long long PDFDoc::strToLongLong(const char *s) { long long x, d; const char *p; x = 0; for (p = s; *p && isdigit(*p & 0xff); ++p) { d = *p - '0'; if (x > (LLONG_MAX - d) / 10) { break; } x = 10 * x + d; } return x; }
0
linux
99253eb750fda6a644d5188fb26c43bad8d5a745
NOT_APPLICABLE
NOT_APPLICABLE
static struct mfc6_cache *ip6mr_cache_alloc(void) { struct mfc6_cache *c = kmem_cache_zalloc(mrt_cachep, GFP_KERNEL); if (!c) return NULL; c->mfc_un.res.last_assert = jiffies - MFC_ASSERT_THRESH - 1; c->mfc_un.res.minvif = MAXMIFS; return c; }
0
Chrome
4d17163f4b66be517dc49019a029e5ddbd45078c
NOT_APPLICABLE
NOT_APPLICABLE
CSSPropertyValue::CSSPropertyValue(CSSPropertyID id, const StylePropertySet& propertySet) : property(id), value(propertySet.getPropertyCSSValue(id).get()) { }
0
systemd
a924f43f30f9c4acaf70618dd2a055f8b0f166be
NOT_APPLICABLE
NOT_APPLICABLE
int dns_packet_append_question(DnsPacket *p, DnsQuestion *q) { DnsResourceKey *key; int r; assert(p); DNS_QUESTION_FOREACH(key, q) { r = dns_packet_append_key(p, key, 0, NULL); if (r < 0) return r; } return 0; }
0
tor
194e31057fbf07d6bdf4b62d26e1a9db334e5f1c
NOT_APPLICABLE
NOT_APPLICABLE
find_single_ipv6_orport(const smartlist_t *list, tor_addr_t *addr_out, uint16_t *port_out) { int ret = 0; tor_assert(list != NULL); tor_assert(addr_out != NULL); tor_assert(port_out != NULL); SMARTLIST_FOREACH_BEGIN(list, directory_token_t *, t) { tor_addr_...
0
Chrome
5fd35e5359c6345b8709695cd71fba307318e6aa
NOT_APPLICABLE
NOT_APPLICABLE
void RenderBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset) { if (!paintInfo.shouldPaintWithinRoot(this) || style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask || paintInfo.context->paintingDisabled()) return; LayoutRect paintRect = LayoutRect(paintOffset, size());...
0
linux
e66eded8309ebf679d3d3c1f5820d1f2ca332c71
NOT_APPLICABLE
NOT_APPLICABLE
struct mm_struct *mm_access(struct task_struct *task, unsigned int mode) { struct mm_struct *mm; int err; err = mutex_lock_killable(&task->signal->cred_guard_mutex); if (err) return ERR_PTR(err); mm = get_task_mm(task); if (mm && mm != current->mm && !ptrace_may_access(task, mode)) { mmput(mm); mm = E...
0
gimp
c21eff4b031acb04fb4dfce8bd5fdfecc2b6524f
NOT_APPLICABLE
NOT_APPLICABLE
gimp_test_load_image (Gimp *gimp, GFile *file) { GimpPlugInProcedure *proc; GimpImage *image; GimpPDBStatusType unused; proc = gimp_plug_in_manager_file_procedure_find (gimp->plug_in_manager, GIMP_FILE_PROCEDURE_GROUP_OPEN, ...
0
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
NOT_APPLICABLE
NOT_APPLICABLE
int netdev_set_num_tc(struct net_device *dev, u8 num_tc) { if (num_tc > TC_MAX_QUEUE) return -EINVAL; #ifdef CONFIG_XPS netif_reset_xps_queues_gt(dev, 0); #endif dev->num_tc = num_tc; return 0; }
0
linux
208c72f4fe44fe09577e7975ba0e7fa0278f3d03
NOT_APPLICABLE
NOT_APPLICABLE
struct sk_buff *cfg80211_testmode_alloc_event_skb(struct wiphy *wiphy, int approxlen, gfp_t gfp) { struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); return __cfg80211_testmode_alloc_skb(rdev, approxlen, 0, 0, gfp); }
0
linux
f958d7b528b1b40c44cfda5eabe2d82760d868c3
NOT_APPLICABLE
NOT_APPLICABLE
static inline void __free_reserved_page(struct page *page) { ClearPageReserved(page); init_page_count(page); __free_page(page); }
0
linux
b4487b93545214a9db8cbf32e86411677b0cca21
NOT_APPLICABLE
NOT_APPLICABLE
static int _nfs41_proc_fsid_present(struct inode *inode, const struct cred *cred) { struct nfs_server *server = NFS_SERVER(inode); struct rpc_clnt *clnt = server->client; struct nfs4_fsid_present_arg args = { .fh = NFS_FH(inode), }; struct nfs4_fsid_present_res res = { }; struct rpc_message msg = { .rpc_pro...
0
Bento4
5eb8cf89d724ccb0b4ce5f24171ec7c11f0a7647
NOT_APPLICABLE
NOT_APPLICABLE
AP4_StszAtom::AP4_StszAtom(AP4_UI32 size, AP4_UI08 version, AP4_UI32 flags, AP4_ByteStream& stream) : AP4_Atom(AP4_ATOM_TYPE_STSZ, size, version, flags) { stream.ReadUI32(m_SampleSize); stream.ReadUI32(m_S...
0
qemu
971f406b77a6eb84e0ad27dcc416b663765aee30
NOT_APPLICABLE
NOT_APPLICABLE
static int handle_fstat(FsContext *fs_ctx, int fid_type, V9fsFidOpenState *fs, struct stat *stbuf) { int fd; if (fid_type == P9_FID_DIR) { fd = dirfd(fs->dir.stream); } else { fd = fs->fd; } return fstat(fd, stbuf); }
0
Android
122feb9a0b04290f55183ff2f0384c6c53756bd8
CVE-2016-3760
CWE-20
static jboolean enableNative(JNIEnv* env, jobject obj) { ALOGV("%s:",__FUNCTION__); jboolean result = JNI_FALSE; if (!sBluetoothInterface) return result; int ret = sBluetoothInterface->enable(); result = (ret == BT_STATUS_SUCCESS || ret == BT_STATUS_DONE) ? JNI_TRUE : JNI_FALSE; return re...
1
ImageMagick
de5deab202c340162b65f65bafbbe17b1eda2c1a
NOT_APPLICABLE
NOT_APPLICABLE
static MagickCLEnv AcquireMagickCLEnv(void) { const char *option; MagickCLEnv clEnv; clEnv=(MagickCLEnv) AcquireMagickMemory(sizeof(*clEnv)); if (clEnv != (MagickCLEnv) NULL) { (void) ResetMagickMemory(clEnv,0,sizeof(*clEnv)); ActivateSemaphoreInfo(&clEnv->lock); clEnv->cpu_score=MAGICKC...
0
linux
b4487b93545214a9db8cbf32e86411677b0cca21
NOT_APPLICABLE
NOT_APPLICABLE
static void nfs41_sequence_free_slot(struct nfs4_sequence_res *res) { nfs41_release_slot(res->sr_slot); res->sr_slot = NULL; }
0
linux
9b54d816e00425c3a517514e0d677bb3cec49258
NOT_APPLICABLE
NOT_APPLICABLE
int blkcg_init_queue(struct request_queue *q) { struct blkcg_gq *new_blkg, *blkg; bool preloaded; int ret; new_blkg = blkg_alloc(&blkcg_root, q, GFP_KERNEL); if (!new_blkg) return -ENOMEM; preloaded = !radix_tree_preload(GFP_KERNEL); /* * Make sure the root blkg exists and count the existing blkgs. As ...
0
linux
5d6751eaff672ea77642e74e92e6c0ac7f9709ab
NOT_APPLICABLE
NOT_APPLICABLE
static int ath6kl_wmi_pspoll_event_rx(struct wmi *wmi, u8 *datap, int len, struct ath6kl_vif *vif) { struct wmi_pspoll_event *ev; if (len < sizeof(struct wmi_pspoll_event)) return -EINVAL; ev = (struct wmi_pspoll_event *) datap; ath6kl_pspoll_event(vif, le16_to_cpu(ev->aid)); return 0; }
0
dcmtk
beaf5a5c24101daeeafa48c375120b16197c9e95
NOT_APPLICABLE
NOT_APPLICABLE
void DcmSCP::notifyReleaseRequest() { DCMNET_INFO("Received Association Release Request"); }
0
Chrome
a6f7726de20450074a01493e4e85409ce3f2595a
NOT_APPLICABLE
NOT_APPLICABLE
void Document::webkitCancelFullScreen() { if (!topDocument()->webkitFullscreenElement()) return; Vector<RefPtr<Element> > replacementFullscreenElementStack; replacementFullscreenElementStack.append(topDocument()->webkitFullscreenElement()); topDocument()->m_fullScreenElementStack.swap(replaceme...
0
asylo
a47ef55db2337d29de19c50cd29b0deb2871d31c
NOT_APPLICABLE
NOT_APPLICABLE
UntrustedCacheMalloc::~UntrustedCacheMalloc() { while (!buffer_pool_.empty()) { PushToFreeList(buffer_pool_.top()); buffer_pool_.pop(); } // Free remaining elements in the free_list_. // The free_list_ object and the struct FreeList member buffers are destroyed // when the unique pointers referencing...
0
qemu
65d35a09979e63541afc5bfc595b9f1b1b4ae069
CVE-2007-1320
CWE-787
static int cirrus_bitblt_videotovideo_copy(CirrusVGAState * s) { if (s->ds->dpy_copy) { cirrus_do_copy(s, s->cirrus_blt_dstaddr - s->start_addr, s->cirrus_blt_srcaddr - s->start_addr, s->cirrus_blt_width, s->cirrus_blt_height); } else { if (BLTUNSAFE(s)) return 0; (*s->cirrus_r...
1
linux
6a76f8c0ab19f215af2a3442870eeb5f0e81998d
NOT_APPLICABLE
NOT_APPLICABLE
static void __init set_ftrace_early_graph(char *buf) { int ret; char *func; while (buf) { func = strsep(&buf, ","); /* we allow only one expression at a time */ ret = ftrace_set_func(ftrace_graph_funcs, &ftrace_graph_count, func); if (ret) printk(KERN_DEBUG "ftrace: function %s not " "tr...
0
openssl
bc8923b1ec9c467755cd86f7848c50ee8812e441
NOT_APPLICABLE
NOT_APPLICABLE
int ssl3_get_client_hello(SSL *s) { int i,j,ok,al,ret= -1; unsigned int cookie_len; long n; unsigned long id; unsigned char *p,*d,*q; SSL_CIPHER *c; #ifndef OPENSSL_NO_COMP SSL_COMP *comp=NULL; #endif STACK_OF(SSL_CIPHER) *ciphers=NULL; /* We do this so that we will respond with our native type. * If we ar...
0
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
NOT_APPLICABLE
NOT_APPLICABLE
void Magick::Image::filterType(const Magick::FilterType filterType_) { modifyImage(); image()->filter=filterType_; }
0
linux
6817ae225cd650fb1c3295d769298c38b1eba818
NOT_APPLICABLE
NOT_APPLICABLE
static int firm_set_dtr(struct usb_serial_port *port, __u8 onoff) { struct whiteheat_set_rdb dtr_command; dtr_command.port = port->port_number + 1; dtr_command.state = onoff; return firm_send_command(port, WHITEHEAT_SET_DTR, (__u8 *)&dtr_command, sizeof(dtr_command)); }
0
uriparser
864f5d4c127def386dd5cc926ad96934b297f04e
NOT_APPLICABLE
NOT_APPLICABLE
void testUriUserInfoHostPort23_Bug3510198_2() { UriParserStateA stateA; UriUriA uriA; stateA.uri = &uriA; int res; res = uriParseUriA(&stateA, "http" "://" "%2Fuser:%2F21" "@" "host" "/"); TEST_ASSERT(URI_SUCCESS == res); TEST_ASSERT(!memcmp(uriA.userInfo.first, "%2Fuser:%2F21", 13 * sizeof(char))); T...
0
samba
31f1a36901b5b8959dc51401c09c114829b50392
NOT_APPLICABLE
NOT_APPLICABLE
static void __pam_log_debug(const pam_handle_t *pamh, int ctrl, int err, const char *format, ...) { va_list args; if (!_pam_log_is_debug_enabled(ctrl)) { return; } va_start(args, format); _pam_log_int(pamh, err, format, args); va_end(args); }
0
Chrome
0bd1a6ddb5fb23dfea3e72d60e5e8df4cf5826bc
NOT_APPLICABLE
NOT_APPLICABLE
bool GetWindowDesktop(XID window, int* desktop) { return GetIntProperty(window, "_NET_WM_DESKTOP", desktop); }
0
mbedtls
740b218386083dc708ce98ccc94a63a95cd5629e
NOT_APPLICABLE
NOT_APPLICABLE
static int ssl_write_certificate_verify( mbedtls_ssl_context *ssl ) { int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; size_t n = 0, offset = 0; unsigned char hash[48]; unsigned char *hash_start = h...
0
linux-2.6
8faece5f906725c10e7a1f6caf84452abadbdc7b
CVE-2009-0787
CWE-189
ecryptfs_write_metadata_to_contents(struct ecryptfs_crypt_stat *crypt_stat, struct dentry *ecryptfs_dentry, char *virt) { int rc; rc = ecryptfs_write_lower(ecryptfs_dentry->d_inode, virt, 0, crypt_stat->num_header_bytes_at_front); if (rc) printk(KERN_ERR "%s: Error attempting to write header...
1
linux
a4270d6795b0580287453ea55974d948393e66ef
NOT_APPLICABLE
NOT_APPLICABLE
static int __netdev_adjacent_dev_insert(struct net_device *dev, struct net_device *adj_dev, struct list_head *dev_list, void *private, bool master) { struct netdev_adjacent *adj; int ret; adj = __netdev_find_adj(adj_dev, dev_list); if (adj) { adj->ref_nr += 1; pr_debug("Insert adjacency: dev %...
0
Android
e68cbc3e9e66df4231e70efa3e9c41abc12aea20
NOT_APPLICABLE
NOT_APPLICABLE
native_handle* Parcel::readNativeHandle() const { int numFds, numInts; status_t err; err = readInt32(&numFds); if (err != NO_ERROR) return 0; err = readInt32(&numInts); if (err != NO_ERROR) return 0; native_handle* h = native_handle_create(numFds, numInts); if (!h) { return 0; } for (int i=0 ; err...
0
frr
6d58272b4cf96f0daa846210dd2104877900f921
NOT_APPLICABLE
NOT_APPLICABLE
DEFUN (address_family_ipv4_safi, address_family_ipv4_safi_cmd, "address-family ipv4 (unicast|multicast)", "Enter Address Family command mode\n" "Address family\n" "Address Family modifier\n" "Address Family modifier\n") { if (strncmp (argv[0], "m", 1) == 0) vty->node = BG...
0
w3m
4e464819dd360ffd3d58fa2a89216fe413cfcc74
NOT_APPLICABLE
NOT_APPLICABLE
registerHref(Buffer *buf, char *url, char *target, char *referer, char *title, unsigned char key, int line, int pos) { Anchor *a; buf->href = putAnchor(buf->href, url, target, &a, referer, title, key, line, pos); return a; }
0
linux
0720a06a7518c9d0c0125bd5d1f3b6264c55c3dd
NOT_APPLICABLE
NOT_APPLICABLE
static int vfat_unlink(struct inode *dir, struct dentry *dentry) { struct inode *inode = dentry->d_inode; struct super_block *sb = dir->i_sb; struct fat_slot_info sinfo; int err; lock_super(sb); err = vfat_find(dir, &dentry->d_name, &sinfo); if (err) goto out; err = fat_remove_entries(dir, &sinfo); /* and ...
0
Android
68f67ef6cf1f41e77337be3bc4bff91f3a3c6324
NOT_APPLICABLE
NOT_APPLICABLE
bool ASessionDescription::isValid() const { return mIsValid; }
0
linux
59c4bd853abcea95eccc167a7d7fd5f1a5f47b98
NOT_APPLICABLE
NOT_APPLICABLE
static inline void switch_fpu_prepare(struct fpu *old_fpu, int cpu) { if (static_cpu_has(X86_FEATURE_FPU) && !(current->flags & PF_KTHREAD)) { if (!copy_fpregs_to_fpstate(old_fpu)) old_fpu->last_cpu = -1; else old_fpu->last_cpu = cpu; /* But leave fpu_fpregs_owner_ctx! */ trace_x86_fpu_regs_deactivated(...
0
Chrome
c552cd7b8a0862f6b3c8c6a07f98bda3721101eb
NOT_APPLICABLE
NOT_APPLICABLE
bool BrowserView::CanActivate() const { app_modal::AppModalDialogQueue* queue = app_modal::AppModalDialogQueue::GetInstance(); if (!queue->active_dialog() || !queue->active_dialog()->native_dialog() || !queue->active_dialog()->native_dialog()->IsShowing()) { return true; } #if defined(USE_AURA) &...
0
linux
72a763d805a48ac8c0bf48fdb510e84c12de51fe
NOT_APPLICABLE
NOT_APPLICABLE
static void __exit algif_hash_exit(void) { int err = af_alg_unregister_type(&algif_type_hash); BUG_ON(err); }
0
linux
983d8e60f50806f90534cc5373d0ce867e5aaf79
NOT_APPLICABLE
NOT_APPLICABLE
xfs_attr_filter( u32 ioc_flags) { if (ioc_flags & XFS_IOC_ATTR_ROOT) return XFS_ATTR_ROOT; if (ioc_flags & XFS_IOC_ATTR_SECURE) return XFS_ATTR_SECURE; return 0; }
0
Chrome
93bc623489bdcfc7e9127614fcfb3258edf3f0f9
NOT_APPLICABLE
NOT_APPLICABLE
void V8Console::countCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { ConsoleHelper helper(info); String16 title = helper.firstArgToString(String16()); String16 identifier; if (title.isEmpty()) { std::unique_ptr<V8StackTraceImpl> stackTrace = V8StackTraceImpl::capture(nullptr, 0, 1);...
0
Chrome
1777aa6484af15014b8691082a8c3075418786f5
NOT_APPLICABLE
NOT_APPLICABLE
void QQuickWebViewFlickablePrivate::_q_resume() { if (!interactionEngine) return; pageIsSuspended = false; webPageProxy->resumeActiveDOMObjectsAndAnimations(); if (isTransitioningToNewPage) { isTransitioningToNewPage = false; postTransitionState->apply(); } _q_commitSc...
0
Android
65c49d5b382de4085ee5668732bcb0f6ecaf7148
NOT_APPLICABLE
NOT_APPLICABLE
long VideoTrack::Seek(long long time_ns, const BlockEntry*& pResult) const { const long status = GetFirst(pResult); if (status < 0) // buffer underflow, etc return status; assert(pResult); if (pResult->EOS()) return 0; const Cluster* pCluster = pResult->GetCluster(); assert(pCluster); assert(pCluster->G...
0
linux
072684e8c58d17e853f8e8b9f6d9ce2e58d2b036
NOT_APPLICABLE
NOT_APPLICABLE
static void hidg_unbind(struct usb_configuration *c, struct usb_function *f) { struct f_hidg *hidg = func_to_hidg(f); device_destroy(hidg_class, MKDEV(major, hidg->minor)); cdev_del(&hidg->cdev); usb_free_all_descriptors(f); }
0
memcached
d9cd01ede97f4145af9781d448c62a3318952719
NOT_APPLICABLE
NOT_APPLICABLE
static const char *prot_text(enum protocol prot) { char *rv = "unknown"; switch(prot) { case ascii_prot: rv = "ascii"; break; case binary_prot: rv = "binary"; break; case negotiating_prot: rv = "auto-negotiate"; brea...
0
linux
6b3a707736301c2128ca85ce85fb13f60b5e350a
NOT_APPLICABLE
NOT_APPLICABLE
void trace_buffered_event_disable(void) { int cpu; WARN_ON_ONCE(!mutex_is_locked(&event_mutex)); if (WARN_ON_ONCE(!trace_buffered_event_ref)) return; if (--trace_buffered_event_ref) return; preempt_disable(); /* For each CPU, set the buffer as used. */ smp_call_function_many(tracing_buffer_mask, ...
0
libarchive
a550daeecf6bc689ade371349892ea17b5b97c77
NOT_APPLICABLE
NOT_APPLICABLE
skip(struct archive_read *a) { struct mtree *mtree; mtree = (struct mtree *)(a->format->data); if (mtree->fd >= 0) { close(mtree->fd); mtree->fd = -1; } return (ARCHIVE_OK); }
0
hhvm
8e7266fef1f329b805b37f32c9ad0090215ab269
NOT_APPLICABLE
NOT_APPLICABLE
SimpleXMLElement() { auto obj = Native::object<SimpleXMLElement>(this); obj->setAttribute(ObjectData::HasPropEmpty); obj->setAttribute(ObjectData::CallToImpl); }
0
tcpdump
061e7371a944588f231cb1b66d6fb070b646e376
NOT_APPLICABLE
NOT_APPLICABLE
ikev2_ID_print(netdissect_options *ndo, u_char tpay, const struct isakmp_gen *ext, u_int item_len _U_, const u_char *ep _U_, uint32_t phase _U_, uint32_t doi _U_, uint32_t proto _U_, int depth _U_) { struct ikev2_id id; int id_len, idtype_len, i; unsigned int dumpascii, dumphex; const unsigned char *typedat...
0
Chrome
7f3d85b096f66870a15b37c2f40b219b2e292693
NOT_APPLICABLE
NOT_APPLICABLE
png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr) { #ifdef PNG_SETJMP_SUPPORTED jmp_buf tmp_jmp; #endif png_error_ptr error_fn; png_error_ptr warning_fn; png_voidp error_ptr; #ifdef PNG_USER_MEM_SUPPORTED png_free_ptr free_fn; #endif png_debug(1, "in png_read_destr...
0
linux
189b0ddc245139af81198d1a3637cac74f96e13a
NOT_APPLICABLE
NOT_APPLICABLE
int create_pipe_files(struct file **res, int flags) { struct inode *inode = get_pipe_inode(); struct file *f; int error; if (!inode) return -ENFILE; if (flags & O_NOTIFICATION_PIPE) { error = watch_queue_init(inode->i_pipe); if (error) { free_pipe_info(inode->i_pipe); iput(inode); return error; ...
0
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
NOT_APPLICABLE
NOT_APPLICABLE
iperf_get_test_one_off(struct iperf_test *ipt) { return ipt->one_off; }
0
linux
a2d859e3fc97e79d907761550dbc03ff1b36479c
NOT_APPLICABLE
NOT_APPLICABLE
struct sctp_chunk *sctp_make_shutdown_complete( const struct sctp_association *asoc, const struct sctp_chunk *chunk) { struct sctp_chunk *retval; __u8 flags = 0; /* Set the T-bit if we have no association (vtag will be * reflected) */ flags |= asoc ? 0 : SCTP_CHUNK_FLAG_T; retval = sctp_make_contro...
0
Chrome
36fd3c9a6ba9fce9dd80c442c3ba5decd8e4c065
NOT_APPLICABLE
NOT_APPLICABLE
FakeExternalProtocolHandlerDelegate() : block_state_(ExternalProtocolHandler::BLOCK), os_state_(shell_integration::UNKNOWN_DEFAULT), has_launched_(false), has_prompted_(false), has_blocked_(false) {}
0
jsish
430ea27accd4d4ffddc946c9402e7c9064835a18
NOT_APPLICABLE
NOT_APPLICABLE
char *jsi_utf_tocase(const char *cp, int upper, Jsi_DString *dsPtr) { char unibuf[10]; while (*cp) { #if JSI__UTF8 if (*cp&0x80) { int32_t c; Jsi_UtfToUniChar(cp, &c); int n = Jsi_UniCharToUtf(c, unibuf); unibuf[n] = 0; cp += n; } else ...
0
Chrome
5a2de6455f565783c73e53eae2c8b953e7d48520
NOT_APPLICABLE
NOT_APPLICABLE
const char* webkit_web_view_get_custom_encoding(WebKitWebView* webView) { g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), NULL); String overrideEncoding = core(webView)->mainFrame()->loader()->documentLoader()->overrideEncoding(); if (overrideEncoding.isEmpty()) return 0; webView->priv->custom...
0
php-src
b34d7849ed90ced9345f8ea1c59bc8d101c18468
NOT_APPLICABLE
NOT_APPLICABLE
PHP_FUNCTION(gethostbyname) { char *hostname; int hostname_len; char *addr; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &hostname_len) == FAILURE) { return; } addr = php_gethostbyname(hostname); RETVAL_STRING(addr, 0); }
0
gpac
3dbe11b37d65c8472faf0654410068e5500b3adb
NOT_APPLICABLE
NOT_APPLICABLE
void gpp_read_style(GF_BitStream *bs, GF_StyleRecord *rec) { rec->startCharOffset = gf_bs_read_u16(bs); rec->endCharOffset = gf_bs_read_u16(bs); rec->fontID = gf_bs_read_u16(bs); rec->style_flags = gf_bs_read_u8(bs); rec->font_size = gf_bs_read_u8(bs); rec->text_color = gpp_read_rgba(bs); }
0
tensorflow
5f7975d09eac0f10ed8a17dbb6f5964977725adc
NOT_APPLICABLE
NOT_APPLICABLE
TEST(FloatPoolingOpTest, MaxPoolActivationRelu1) { FloatPoolingOpModel m(BuiltinOperator_MAX_POOL_2D, /*input=*/{TensorType_FLOAT32, {1, 2, 4, 1}}, /*filter_width=*/2, /*filter_height=*/2, /*output=*/{TensorType_FLOAT32, {}}, Padding_VALID, 2, ...
0
linux
d6f5e358452479fa8a773b5c6ccc9e4ec5a20880
NOT_APPLICABLE
NOT_APPLICABLE
smb2_set_credits(struct TCP_Server_Info *server, const int val) { int scredits, in_flight; spin_lock(&server->req_lock); server->credits = val; if (val == 1) server->reconnect_instance++; scredits = server->credits; in_flight = server->in_flight; spin_unlock(&server->req_lock); trace_smb3_set_credits(server...
0
openssl
3f3582139fbb259a1c3cbb0a25236500a409bf26
NOT_APPLICABLE
NOT_APPLICABLE
int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *ctx, int pad) { if (pad) ctx->flags &= ~EVP_CIPH_NO_PADDING; else ctx->flags |= EVP_CIPH_NO_PADDING; return 1; }
0
openssl
e97763c92c655dcf4af2860b3abd2bc4c8a267f9
NOT_APPLICABLE
NOT_APPLICABLE
static int tls1_check_ec_key(SSL *s, unsigned char *curve_id, unsigned char *comp_id) { const unsigned char *pformats, *pcurves; size_t num_formats, num_curves, i; int j; /* * If point formats extension present check it, otherwise everything is * supported (see RFC...
0
libarchive
59357157706d47c365b2227739e17daba3607526
NOT_APPLICABLE
NOT_APPLICABLE
lookup_uname(struct cpio *cpio, uid_t uid) { return (lookup_name(cpio, &cpio->uname_cache, &lookup_uname_helper, (id_t)uid)); }
0
Chrome
96dbafe288dbe2f0cc45fa3c39daf6d0c37acbab
NOT_APPLICABLE
NOT_APPLICABLE
xsltFreeStylePreComps(xsltStylesheetPtr style) { xsltElemPreCompPtr cur, next; if (style == NULL) return; cur = style->preComps; while (cur != NULL) { next = cur->next; if (cur->type == XSLT_FUNC_EXTENSION) cur->free(cur); else xsltFreeStylePreComp((xsltStylePreCompPtr) cur); cur = next...
0
busybox
352f79acbd759c14399e39baef21fc4ffe180ac2
NOT_APPLICABLE
NOT_APPLICABLE
static const char *valid_domain_label(const char *label) { unsigned char ch; unsigned pos = 0; for (;;) { ch = *label; if ((ch|0x20) < 'a' || (ch|0x20) > 'z') { if (ch < '0' || ch > '9') { if (ch == '\0' || ch == '.') return label; /* DNS allows only '-', but we are more permissive */ if (ch...
0
linux
fc739a058d99c9297ef6bfd923b809d85855b9a9
NOT_APPLICABLE
NOT_APPLICABLE
static void fastrpc_free_map(struct kref *ref) { struct fastrpc_map *map; map = container_of(ref, struct fastrpc_map, refcount); if (map->table) { dma_buf_unmap_attachment(map->attach, map->table, DMA_BIDIRECTIONAL); dma_buf_detach(map->buf, map->attach); dma_buf_put(map->buf); } kfree(map); }
0
Chrome
f7038db6ef172459f14b1b67a5155b8dd210be0f
NOT_APPLICABLE
NOT_APPLICABLE
inline J_DITHER_MODE ditherMode() { return JDITHER_NONE; }
0
Chrome
c442b3eda2f1fdd4d1d4864c34c43cbaf223acae
NOT_APPLICABLE
NOT_APPLICABLE
void SettingLevelBubble::ShowBubble(double percent, bool enabled) { hide_timer_.Stop(); const double old_target_percent = target_percent_; UpdateTargetPercent(percent); SkBitmap* current_icon = increase_icon_; if (!enabled || target_percent_ == 0) current_icon = disabled_icon_; else if (old_target_perc...
0
Chrome
d662b905d30cec7899bbb15140dcfacd73506167
NOT_APPLICABLE
NOT_APPLICABLE
void PluginObserver::OnMissingPluginStatus(int status) { #if defined(OS_WIN) if (status == webkit::npapi::default_plugin::MISSING_PLUGIN_AVAILABLE) { tab_contents_->AddInfoBar( new PluginInstallerInfoBarDelegate(tab_contents())); return; } DCHECK_EQ(webkit::npapi::default_plugin::MISSING_PLUGIN_U...
0
postgresql
08fa47c4850cea32c3116665975bca219fbf2fe6
NOT_APPLICABLE
NOT_APPLICABLE
elements_worker_jsonb(FunctionCallInfo fcinfo, const char *funcname, bool as_text) { Jsonb *jb = PG_GETARG_JSONB(0); ReturnSetInfo *rsi; Tuplestorestate *tuple_store; TupleDesc tupdesc; TupleDesc ret_tdesc; MemoryContext old_cxt, tmp_cxt; bool skipNested = false; JsonbIterator *it; JsonbValue v;...
0
php-src
1c0d06441aefee18b30520e2b1ae89cbfcf56a59
NOT_APPLICABLE
NOT_APPLICABLE
static void exif_thumbnail_build(image_info_type *ImageInfo) { size_t new_size, new_move, new_value; char *new_data; void *value_ptr; int i, byte_count; image_info_list *info_list; image_info_data *info_data; #ifdef EXIF_DEBUG char tagname[64]; ...
0
linux
294f2fc6da27620a506e6c050241655459ccd6bd
NOT_APPLICABLE
NOT_APPLICABLE
static int check_helper_mem_access(struct bpf_verifier_env *env, int regno, int access_size, bool zero_size_allowed, struct bpf_call_arg_meta *meta) { struct bpf_reg_state *regs = cur_regs(env), *reg = &regs[regno]; switch (reg->type) { case PTR_TO_PACKET: case PTR_TO_PACKET_META: return check_pack...
0
linux
52c479697c9b73f628140dcdfcd39ea302d05482
NOT_APPLICABLE
NOT_APPLICABLE
static inline int ep_events_available(struct eventpoll *ep) { return !list_empty_careful(&ep->rdllist) || READ_ONCE(ep->ovflist) != EP_UNACTIVE_PTR; }
0
jsish
430ea27accd4d4ffddc946c9402e7c9064835a18
NOT_APPLICABLE
NOT_APPLICABLE
static Jsi_OpCodes *code_inc(jsi_Pstate *p, jsi_Pline *line, int e) { JSI_NEW_CODESLN(0,OP_INC, e); }
0
linux
6d8c50dcb029872b298eea68cc6209c866fd3e14
NOT_APPLICABLE
NOT_APPLICABLE
static int sock_close(struct inode *inode, struct file *filp) { __sock_release(SOCKET_I(inode), inode); return 0; }
0
tensorflow
e6cf28c72ba2eb949ca950d834dd6d66bb01cfae
NOT_APPLICABLE
NOT_APPLICABLE
ALWAYS_INLINE void ScalarMulAdd3Way(const float a1, const float a2, const float a3, const float** inp1, const float** inp2, const float** inp3, float** out) { **out += a1 * **inp1 + a2 * **inp2 + a3 * **inp3; ...
0
Chrome
503bea2643350c6378de5f7a268b85cf2480e1ac
NOT_APPLICABLE
NOT_APPLICABLE
void AudioInputRendererHost::OnAssociateStreamWithConsumer(int stream_id, int render_view_id) { DVLOG(1) << "AudioInputRendererHost@" << this << "::OnAssociateStreamWithConsumer(stream_id=" << stream_id << ", render_view_id=" << render_v...
0
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
NOT_APPLICABLE
NOT_APPLICABLE
static int io_iopoll_check(struct io_ring_ctx *ctx, long min) { unsigned int nr_events = 0; int ret = 0; /* * We disallow the app entering submit/complete with polling, but we * still need to lock the ring to prevent racing with polled issue * that got punted to a workqueue. */ mutex_lock(&ctx->uring_lock)...
0
ovs
65c61b0c23a0d474696d7b1cea522a5016a8aeb3
NOT_APPLICABLE
NOT_APPLICABLE
parse_FIN_TIMEOUT(char *arg, const struct ofpact_parse_params *pp) { struct ofpact_fin_timeout *oft = ofpact_put_FIN_TIMEOUT(pp->ofpacts); char *key, *value; while (ofputil_parse_key_value(&arg, &key, &value)) { char *error; if (!strcmp(key, "idle_timeout")) { error = str_to_u...
0
linux
621b5060e823301d0cba4cb52a7ee3491922d291
NOT_APPLICABLE
NOT_APPLICABLE
static inline int valid_irq_stack(unsigned long sp, struct task_struct *p, unsigned long nbytes) { unsigned long stack_page; unsigned long cpu = task_cpu(p); /* * Avoid crashing if the stack has overflowed and corrupted * task_cpu(p), which is in the thread_info struct. */ if (cpu < NR_CPUS && cpu_poss...
0
NetHack
612755bfb5c412079795c68ba392df5d93874ed8
NOT_APPLICABLE
NOT_APPLICABLE
change_inv_order(op) char *op; { int oc_sym, num; char *sp, buf[BUFSZ]; num = 0; #ifndef GOLDOBJ if (!index(op, GOLD_SYM)) buf[num++] = COIN_CLASS; #else /* !!!! probably unnecessary with gold as normal inventory */ #endif for (sp = op; *sp; sp++) { oc_sym = def_char_to_objclass(*sp); /* r...
0
CImg
ac8003393569aba51048c9d67e1491559877b1d1
NOT_APPLICABLE
NOT_APPLICABLE
Tfloat _linear_atXYZ(const float fx, const float fy=0, const float fz=0, const int c=0) const { const float nfx = cimg::cut(fx,0,width() - 1), nfy = cimg::cut(fy,0,height() - 1), nfz = cimg::cut(fz,0,depth() - 1); const unsigned int x = (unsigned int)nfx, y = (un...
0
core
85fcb895ca7f0bcb8ee72047fe0e1e78532ff90b
NOT_APPLICABLE
NOT_APPLICABLE
const char *imap_parser_read_word(struct imap_parser *parser) { const unsigned char *data; size_t i, data_size; data = i_stream_get_data(parser->input, &data_size); for (i = 0; i < data_size; i++) { if (data[i] == ' ' || data[i] == '\r' || data[i] == '\n') break; } if (i < data_size) { data_size = i + (...
0
unicorn
c733bbada356b0373fa8aa72c044574bb855fd24
NOT_APPLICABLE
NOT_APPLICABLE
static uint8_t *encode_sleb128(uint8_t *p, target_long val) { int more, byte; do { byte = val & 0x7f; val >>= 7; more = !((val == 0 && (byte & 0x40) == 0) || (val == -1 && (byte & 0x40) != 0)); if (more) { byte |= 0x80; } *p++ = byte;...
0
cJSON
be749d7efa7c9021da746e685bd6dec79f9dd99b
NOT_APPLICABLE
NOT_APPLICABLE
CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string) { cJSON *item = cJSON_New_Item(&global_hooks); if (item != NULL) { item->type = cJSON_String | cJSON_IsReference; item->valuestring = (char*)cast_away_const(string); } return item; }
0
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
NOT_APPLICABLE
NOT_APPLICABLE
authentic_reduce_path(struct sc_card *card, struct sc_path *path) { struct sc_context *ctx = card->ctx; struct sc_path in_path, cur_path; size_t offs; LOG_FUNC_CALLED(ctx); if (!path || path->len <= 2 || path->type == SC_PATH_TYPE_DF_NAME) LOG_FUNC_RETURN(ctx, SC_SUCCESS); if (!card->cache.valid || !card->ca...
0
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
NOT_APPLICABLE
NOT_APPLICABLE
void Item_in_optimizer::keep_top_level_cache() { cache->keep_array(); save_cache= 1; }
0
End of preview. Expand in Data Studio

Merged BigVul and PrimeVul Dataset

Dataset ID: mahdin70/merged_bigvul_primevul

This dataset is a merged and preprocessed combination of the BigVul (bstee615/bigvul) and PrimeVul (colin/PrimeVul, "default" configuration) datasets, designed for vulnerability analysis and machine learning tasks. The preprocessing ensures consistency in column names, data types, and formats, making it suitable for fine-tuning models.

Dataset Overview

The dataset integrates vulnerability data from two sources:

The merged dataset retains key information about projects, commits, functions, and vulnerabilities, standardized for consistency.

Columns

The dataset contains the following columns:

  • project: String - The name of the project (e.g., "qemu", "linux-2.6").
  • commit_id: String - Unique identifier of the commit associated with the function.
  • func: String - The source code of the function before fixing (from func_before in BigVul).
  • vul: Int8 - Vulnerability label (1 = vulnerable, 0 = not vulnerable).
  • CVE ID: String - Common Vulnerabilities and Exposures identifier (e.g., CVE-2007-1320), or NOT_APPLICABLE if vul = 0.
  • CWE ID: String - Common Weakness Enumeration identifier (e.g., CWE-20), or NOT_APPLICABLE if vul = 0.

Splits

  • Train: Combined training data from BigVul and PrimeVul.
  • Test: Combined testing data from BigVul and PrimeVul.
  • Validation: Combined validation data from BigVul and PrimeVul.

Preprocessing Steps

The dataset was preprocessed to ensure consistency and quality:

BigVul Preprocessing

  • Source Columns:
    • project, commit_id, CVE ID, CWE ID, func_before, vul.
  • Transformations:
    • Renamed func_before to func.
    • Kept CWE ID in its original format (CWE-XXX).
    • Converted vul to int8.

PrimeVul Preprocessing

  • Source Columns:
    • project, commit_id, cve, cwe, func, target.
  • Transformations:
    • Renamed cve to CVE ID, cwe to CWE ID, target to vul.
    • Standardized CWE ID by removing brackets from list format (e.g., ["CWE-XXX"]CWE-XXX), taking the first element if multiple CWEs exist.
    • Converted vul from int64 to int8.

Merging and Final Preprocessing

  • Merging: Concatenated preprocessed BigVul and PrimeVul data for each split (train, test, validation).
  • Final Steps:
    • Removed rows with any null values.
    • Removed duplicates based on the func column.
    • For rows where vul = 0, replaced CVE ID and CWE ID with "NOT_APPLICABLE.

Dataset Statistics

Below are the analysis results for the final merged dataset:

Train Split

  • Number of rows: 239,822
  • Unique CWE IDs (excluding NOT_APPLICABLE): 127
  • Unique commit IDs: 7,559
  • Vulnerable functions (vul = 1): 9,037

Test Split

  • Number of rows: 51,390
  • Unique CWE IDs (excluding NOT_APPLICABLE): 87
  • Unique commit IDs: 6,032
  • Vulnerable functions (vul = 1): 1,911

Validation Split

  • Number of rows: 51,392
  • Unique CWE IDs (excluding NOT_APPLICABLE): 91
  • Unique commit IDs: 6,059
  • Vulnerable functions (vul = 1): 1,933

Usage

Loading the Dataset

from datasets import load_dataset

dataset = load_dataset("mahdin70/merged_bigvul_primevul")
Downloads last month
32