Datasets:
functionSource stringlengths 20 729k | fName stringlengths 59 73 | oriFile stringlengths 5 109 | startEndLine stringlengths 3 11 | label int64 0 1 | vulLine int64 0 16.3k | cwe stringclasses 2
values |
|---|---|---|---|---|---|---|
NS_IMETHODIMP
nsGlobalWindow::SetScreenY(PRInt32 aScreenY)
{
FORWARD_TO_OUTER(SetScreenY, (aScreenY), NS_ERROR_NOT_INITIALIZED);
if (!CanMoveResizeWindows() || IsFrame()) {
return NS_OK;
}
nsCOMPtr<nsIBaseWindow> treeOwnerAsWin;
GetTreeOwner(getter_AddRefs(treeOwnerAsWin));
NS_ENSURE_TRUE(treeOw... | VulDeePecker-master-joern/CWE-399/source_files/CVE-2010-2767/myfile_355.c | firefox_3.6.8_CVE_2010_2767_dom_base_nsGlobalWindow.cpp | 3575,3606 | 0 | 0 | CWE-399 |
void CWE121_Stack_Based_Buffer_Overflow__CWE805_wchar_t_declare_ncpy_67_good()
{
goodG2B();
} | VulDeePecker-master-joern/CWE-119/source_files/65465/myfile_4.c | CWE121_Stack_Based_Buffer_Overflow__CWE805_wchar_t_declare_ncpy_67a.c | 65,68 | 0 | 0 | CWE-119 |
int avformat_match_stream_specifier(AVFormatContext *s,AVStream *st,const char *spec)
{
if (( *spec) <= '9' && ( *spec) >= 48) {
return strtol(spec,((void *)0),0) == (st -> index);
}
else {
if (( *spec) == 'v' || ( *spec) == 'a' || ( *spec) == 's' || ( *spec) == 100 || ( *spec) == 't')
{
enum A... | VulDeePecker-master-joern/CWE-119/source_files/153513/myfile_20.c | utils.c | 4679,4782 | 0 | 0 | CWE-119 |
JS_REQUIRES_STACK JSRecordingStatus
TraceRecorder::record_JSOP_INCGVAR()
{
jsval slotval = cx->fp->slots[GET_SLOTNO(cx->fp->regs->pc)];
if (JSVAL_IS_NULL(slotval))
return JSRS_CONTINUE;
uint32 slot = JSVAL_TO_INT(slotval);
if (!lazilyImportGlobalSlot(slot))
ABORT_TRACE("laz... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2010-1212/myfile_175.c | Firefox_3.6.6_CVE_2010_1212_js_src_jstracer.cpp | 13381,13395 | 0 | 0 | CWE-119 |
static void goodG2B()
{
char * data;
list<char *> dataList;
char dataBadBuffer[10];
char dataGoodBuffer[10+1];
data = dataGoodBuffer;
data[0] = '\0';
dataList.push_back(data);
dataList.push_back(data);
dataList.push_back(data);
goodG2BSink(dataList);
} | VulDeePecker-master-joern/CWE-119/source_files/63428/myfile_4.c | CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_73a.cpp | 63,78 | 0 | 0 | CWE-119 |
int64_t av_frame_get_channel_layout(const AVFrame *s)
{
return (s -> channel_layout);
} | VulDeePecker-master-joern/CWE-399/source_files/150061/myfile_27.c | utils.c | 1049,1052 | 0 | 0 | CWE-399 |
static void goodG2B2()
{
int data;
data = -1;
if(5==5)
{
data = 20;
}
{
size_t i;
int *intPointer;
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0;
... | VulDeePecker-master-joern/CWE-119/source_files/110458/myfile_5.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fscanf_03.c | 82,105 | 0 | 0 | CWE-119 |
static void m_stop(struct seq_file *m, void *v)
{
up_read(&namespace_sem);
} | VulDeePecker-master-joern/CWE-399/source_files/CVE-2016-6213/myfile_97.c | linux_kernel_4.8.9_CVE_2016_6213_fs_namespace.c | 1257,1260 | 0 | 0 | CWE-399 |
static void goodG2B()
{
char * data;
data = NULL;
data = new char[100];
data[0] = '\0';
CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805_char_memmove_68_goodG2BData = data;
goodG2BSink();
} | VulDeePecker-master-joern/CWE-119/source_files/68424/myfile_5.c | CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805_char_memmove_68a.cpp | 51,60 | 0 | 0 | CWE-119 |
static void status_expert_new()
{
GtkWidget *expert_image;
expert_image = pixbuf_to_widget(expert_error_pb_data);
gtk_widget_set_tooltip_text(expert_image,"ERROR is the highest expert info level");
gtk_widget_show(expert_image);
expert_info_error = gtk_event_box_new();
gtk_container_add(((GtkContainer *)(... | VulDeePecker-master-joern/CWE-399/source_files/151558/myfile_10.c | main_statusbar.c | 535,574 | 0 | 0 | CWE-399 |
void CWE121_Stack_Based_Buffer_Overflow__src_char_declare_cpy_16_good()
{
goodG2B();
} | VulDeePecker-master-joern/CWE-119/source_files/67223/myfile_4.c | CWE121_Stack_Based_Buffer_Overflow__src_char_declare_cpy_16.c | 68,71 | 0 | 0 | CWE-119 |
int sock_setsockopt(struct socket *sock, int level, int optname,
char __user *optval, unsigned int optlen)
{
struct sock *sk = sock->sk;
int val;
int valbool;
struct linger ling;
int ret = 0;
if (optname == SO_BINDTODEVICE)
return sock_bindtodevice(sk, optval, optlen);
if (optlen < sizeof(int))
... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2012-6704/myfile_29.c | linux_kernel_3.4.113_CVE_2012_6704_net_core_sock.c | 530,813 | 1 | 577 | CWE-119 |
static void goodG2B()
{
size_t data;
data = 0;
data = 20;
CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_45_goodG2BData = data;
goodG2BSink();
} | VulDeePecker-master-joern/CWE-399/source_files/117347/myfile_4.c | CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fscanf_45.c | 94,103 | 0 | 0 | CWE-399 |
nsSVGElement::IntegerAttributesInfo
nsSVGFETurbulenceElement::GetIntegerInfo()
{
return IntegerAttributesInfo(mIntegerAttributes, sIntegerInfo,
ArrayLength(sIntegerInfo));
} | VulDeePecker-master-joern/CWE-119/source_files/CVE-2012-4188/myfile_291.c | Firefox_15.0b6_CVE_2012_4188_content_svg_content_src_nsSVGFilters.cpp | 3564,3569 | 0 | 0 | CWE-119 |
void CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_snprintf_54d_badSink(char * data)
{
CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_snprintf_54e_badSink(data);
} | VulDeePecker-master-joern/CWE-119/source_files/64060/myfile_2.c | CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_snprintf_54d.c | 34,37 | 0 | 0 | CWE-119 |
static ssize_t nr_overcommit_hugepages_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
struct hstate *h = kobj_to_hstate(kobj, NULL);
return sprintf(buf, "%lu\n", h->nr_overcommit_huge_pages);
} | VulDeePecker-master-joern/CWE-399/source_files/CVE-2012-2390/myfile_16.c | linux_kernel_3.4.1_CVE_2012_2390_mm_hugetlb.c | 1557,1562 | 0 | 0 | CWE-399 |
static void heap_xlog_lock(XLogRecPtr lsn,XLogRecord *record)
{
xl_heap_lock *xlrec = (xl_heap_lock *)(((char *)record) + (((intptr_t )(sizeof(XLogRecord ))) + (8 - 1) & ~((intptr_t )(8 - 1))));
Buffer buffer;
Page page;
OffsetNumber offnum;
ItemId lp = ((void *)0);
HeapTupleHeader htup;
if ((record ->... | VulDeePecker-master-joern/CWE-119/source_files/152957/myfile_3.c | heapam.c | 4918,4977 | 0 | 0 | CWE-119 |
static void rtl8139_transmit(RTL8139State *s)
{
int descriptor = s->currTxDesc, txcount = 0;
if (rtl8139_transmit_one(s, descriptor))
{
++s->currTxDesc;
s->currTxDesc %= 4;
++txcount;
}
if (!txcount)
{
DPRINTF("transmitter queue stalled, current TxDe... | VulDeePecker-master-joern/CWE-399/source_files/CVE-2016-8910/myfile_78.c | qemu_2.3.0_CVE-2016-8910_rtl8139.c | 2431,2449 | 0 | 0 | CWE-399 |
static void goodG2B2()
{
char * data;
char * dataBuffer = (char *)ALLOCA(100*sizeof(char));
data = dataBuffer;
CWE121_Stack_Based_Buffer_Overflow__CWE806_char_alloca_ncpy_22_goodG2B2Global = 1;
data = CWE121_Stack_Based_Buffer_Overflow__CWE806_char_alloca_ncpy_22_goodG2B2Source(data);
{
... | VulDeePecker-master-joern/CWE-119/source_files/65723/myfile_8.c | CWE121_Stack_Based_Buffer_Overflow__CWE806_char_alloca_ncpy_22a.c | 74,88 | 0 | 0 | CWE-119 |
int main(int argc, char * argv[])
{
srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
printLine("Calling good()...");
good();
printLine("Finished good()");
#endif
#ifndef OMITBAD
printLine("Calling bad()...");
bad();
printLine("Finished bad()");
#endif
return 0;
} | VulDeePecker-master-joern/CWE-399/source_files/117497/myfile_6.c | CWE789_Uncontrolled_Mem_Alloc__new_char_connect_socket_62a.cpp | 163,178 | 0 | 0 | CWE-399 |
int main(int argc, char * argv[])
{
srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
printLine("Calling good()...");
CWE789_Uncontrolled_Mem_Alloc__malloc_char_connect_socket_22_good();
printLine("Finished good()");
#endif
#ifndef OMITBAD
printLine("Calling bad()...");
CWE789_Uncontrolled... | VulDeePecker-master-joern/CWE-399/source_files/117002/myfile_4.c | CWE789_Uncontrolled_Mem_Alloc__malloc_char_connect_socket_22a.c | 293,308 | 0 | 0 | CWE-399 |
static void goodG2B()
{
int h;
wchar_t * data;
wchar_t * dataBadBuffer = (wchar_t *)ALLOCA((10)*sizeof(wchar_t));
wchar_t * dataGoodBuffer = (wchar_t *)ALLOCA((10+1)*sizeof(wchar_t));
for(h = 0; h < 1; h++)
{
data = dataGoodBuffer;
data[0] = L'\0';
}
{
... | VulDeePecker-master-joern/CWE-119/source_files/63448/myfile_3.c | CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_cpy_17.c | 54,73 | 0 | 0 | CWE-119 |
void CWE121_Stack_Based_Buffer_Overflow__src_wchar_t_alloca_cpy_02_bad()
{
wchar_t * data;
wchar_t * dataBuffer = (wchar_t *)ALLOCA(100*sizeof(wchar_t));
data = dataBuffer;
if(1)
{
wmemset(data, L'A', 100-1);
data[100-1] = L'\0';
}
{
wchar_t dest[50] = L"... | VulDeePecker-master-joern/CWE-119/source_files/67305/myfile_1.c | CWE121_Stack_Based_Buffer_Overflow__src_wchar_t_alloca_cpy_02.c | 23,40 | 1 | 37 | CWE-119 |
void CWE127_Buffer_Underread__malloc_char_cpy_67_good()
{
goodG2B();
} | VulDeePecker-master-joern/CWE-119/source_files/77777/myfile_3.c | CWE127_Buffer_Underread__malloc_char_cpy_67a.c | 70,73 | 0 | 0 | CWE-119 |
NS_IMETHODIMP
nsPingListener::OnStopRequest(nsIRequest *request, nsISupports *context,
nsresult status)
{
return NS_OK;
} | VulDeePecker-master-joern/CWE-399/source_files/CVE-2013-1674/myfile_33.c | firefox_20.0b7_CVE_2013_1674_docshell_base_nsDocShell.cpp | 455,460 | 0 | 0 | CWE-399 |
static void badSink(int data)
{
{
int i;
int * buffer = new int[10];
for (i = 0; i < 10; i++)
{
buffer[i] = 0;
}
if (data >= 0)
{
buffer[data] = 1;
for(i = 0; i < 10; i++)
{
... | VulDeePecker-master-joern/CWE-119/source_files/67547/myfile_1.c | CWE122_Heap_Based_Buffer_Overflow__cpp_CWE129_connect_socket_44.cpp | 47,74 | 1 | 61 | CWE-119 |
void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_54e_goodG2BSink(int data)
{
{
size_t i;
int *intPointer;
intPointer = (int*)malloc(data * sizeof(int));
for (i = 0; i < (size_t)data; i++)
{
intPointer[i] = 0;
}
pri... | VulDeePecker-master-joern/CWE-119/source_files/110344/myfile_2.c | CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_connect_socket_54e.c | 67,82 | 0 | 0 | CWE-119 |
static void estimate_timings_from_bit_rate(AVFormatContext *ic)
{
int64_t filesize;
int64_t duration;
int bit_rate;
int i;
AVStream *st;
if (ic -> bit_rate <= 0) {
bit_rate = 0;
for (i = 0; i < ic -> nb_streams; i++) {
st = ic -> streams[i];
if (st -> codec -> bit_rate > 0) {
... | VulDeePecker-master-joern/CWE-119/source_files/153333/myfile_10.c | utils.c | 2426,2457 | 0 | 0 | CWE-119 |
bool
CodeGenerator::visitLoadTypedArrayElement(LLoadTypedArrayElement *lir)
{
Register elements = ToRegister(lir->elements());
Register temp = lir->temp()->isBogusTemp() ? InvalidReg : ToRegister(lir->temp());
AnyRegister out = ToAnyRegister(lir->output());
int arrayType = lir->mir()->arrayType();
... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2014-1554/myfile_35.c | Firefox_31.6.0esr_CVE_2014_1554_js_src_jit_CodeGenerator.cpp | 7467,7490 | 0 | 0 | CWE-119 |
void ResourceOwnerRememberTupleDesc(ResourceOwner owner,TupleDesc tupdesc)
{
;
owner -> tupdescs[owner -> ntupdescs] = tupdesc;
owner -> ntupdescs++;
} | VulDeePecker-master-joern/CWE-399/source_files/151963/myfile_35.c | resowner.c | 991,996 | 0 | 0 | CWE-399 |
void CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_ncpy_53b_badSink(char * data)
{
CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_ncpy_53c_badSink(data);
} | VulDeePecker-master-joern/CWE-119/source_files/70959/myfile_7.c | CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_ncpy_53b.c | 33,36 | 0 | 0 | CWE-119 |
void stonesoup_read_taint(char** stonesoup_tainted_buff, char* stonesoup_envKey, int stonesoup_shmsz) {
int stonesoup_shmid;
key_t stonesoup_key;
char *stonesoup_shm, *stonesoup_s;
char* stonesoup_envSize = NULL;
*stonesoup_tainted_buff = NULL;
if (getenv("STONESOUP_DISABLE_WEAKNESS") == NULL ||
s... | VulDeePecker-master-joern/CWE-119/source_files/153353/myfile_5.c | color.c | 131,155 | 0 | 0 | CWE-119 |
char **split(char *str,char *delim,int *nwrds)
{
int n = 128;
char **w = (xmalloc(sizeof(char *) * n));
w[ *nwrds = 0] = strtok(str,delim);
while(w[ *nwrds]){
if ( *nwrds == n - 2) {
w = (xrealloc(w,sizeof(char *) * (n += 256)));
}
w[++ *nwrds] = strtok(((void *)0),delim);
}
w[ *nwrds] =... | VulDeePecker-master-joern/CWE-119/source_files/152967/myfile_2.c | color.c | 383,396 | 0 | 0 | CWE-119 |
static void reconstruct_inter_block(int plane, int block,
BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg) {
struct inter_args *args = arg;
VP9_COMMON *const cm = args->cm;
MACROBLOCKD *const xd = args->xd;
int x, y;
txfrm_block_to_r... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2014-1578/myfile_15.c | Firefox_32.0b9_CVE_2014_1578_media_libvpx_vp9_decoder_vp9_decodframe.c | 338,351 | 0 | 0 | CWE-119 |
int kvm_emulate_halt(struct kvm_vcpu *vcpu)
{
++vcpu->stat.halt_exits;
if (irqchip_in_kernel(vcpu->kvm)) {
vcpu->arch.mp_state = KVM_MP_STATE_HALTED;
return 1;
} else {
vcpu->run->exit_reason = KVM_EXIT_HLT;
return 0;
}
} | VulDeePecker-master-joern/CWE-119/source_files/CVE-2013-1796/myfile_143.c | Linux_kernel_3.7.9_CVE_2013_1796_arch_x86_kvm_x86.c | 4943,4953 | 0 | 0 | CWE-119 |
Read_CVT_Stretched( EXEC_OP_ FT_ULong idx )
{
return TT_MULFIX( CUR.cvt[idx], CURRENT_Ratio() );
} | VulDeePecker-master-joern/CWE-119/source_files/CVE-2010-3814/myfile_21.c | freetype_2.4.2_CVE-2010-3814_ttinterp.c | 1693,1696 | 0 | 0 | CWE-119 |
void
nsHtml5TreeBuilder::endTagTemplateInHead()
{
int32_t eltPos = findLast(nsHtml5Atoms::template_);
if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
errStrayEndTag(nsHtml5Atoms::template_);
return;
}
generateImpliedEndTags();
if (!!MOZ_UNLIKELY(mViewSource) && !isCurrent(nsHtml5Atoms::tem... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2016-2819/myfile_3.c | Firefox_46.0b11_CVE_2016_2819_parser_html_nsHtml5TreeBuilder.cpp | 3037,3055 | 0 | 0 | CWE-119 |
void
proto_reg_handoff_capwap(void)
{
static gboolean inited = FALSE;
static dissector_handle_t capwap_control_handle, capwap_data_handle;
static guint capwap_control_udp_port, capwap_data_udp_port;
if (!inited) {
capwap_control_handle = new_create_dissector_handle(dissect_capwap_control, proto_capwap);
capw... | VulDeePecker-master-joern/CWE-119/source_files/148966/myfile_1830.c | packet-capwap.c | 2207,2233 | 0 | 0 | CWE-119 |
static void goodB2G()
{
char * data;
data = (char *)malloc(100*sizeof(char));
data[0] = '\0';
{
size_t dataLen = strlen(data);
char * environment = GETENV(ENV_VARIABLE);
if (environment != NULL)
{
strncat(data+dataLen, environm... | VulDeePecker-master-joern/CWE-399/source_files/112655/myfile_5.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__char_environment_68a.c | 68,86 | 0 | 0 | CWE-399 |
AVRational av_guess_sample_aspect_ratio(AVFormatContext *format,AVStream *stream,AVFrame *frame)
{
AVRational undef = {(0), (1)};
AVRational stream_sample_aspect_ratio = stream?stream -> sample_aspect_ratio : undef;
AVRational codec_sample_aspect_ratio = stream && stream -> codec?stream -> codec -> sample_aspec... | VulDeePecker-master-joern/CWE-399/source_files/151867/myfile_51.c | utils.c | 4649,4669 | 0 | 0 | CWE-399 |
static void regexp()
{
branch();
while(tok == OR){
tok = lex();
branch();
addtok(OR);
}
} | VulDeePecker-master-joern/CWE-119/source_files/153297/myfile_2.c | dfa.c | 2170,2178 | 0 | 0 | CWE-119 |
void CWE121_Stack_Based_Buffer_Overflow__src_char_declare_cpy_82_goodG2B::action(char * data)
{
{
char dest[50] = "";
strcpy(dest, data);
printLine(data);
}
} | VulDeePecker-master-joern/CWE-119/source_files/67253/myfile_6.c | CWE121_Stack_Based_Buffer_Overflow__src_char_declare_cpy_82_goodG2B.cpp | 24,32 | 0 | 0 | CWE-119 |
static void freelist(char **cpp)
{
size_t i;
if (cpp == ((void *)0)) {
return ;
}
for (i = 0; cpp[i] != ((void *)0); ++i) {
free(cpp[i]);
cpp[i] = ((void *)0);
}
} | VulDeePecker-master-joern/CWE-119/source_files/153116/myfile_1.c | dfa.c | 3916,3926 | 0 | 0 | CWE-119 |
void stonesoup_read_taint(void) {
if (getenv("STONESOUP_DISABLE_WEAKNESS") == NULL ||
strcmp(getenv("STONESOUP_DISABLE_WEAKNESS"), "1") != 0) {
struct mg_server *stonesoup_server = mg_create_server(NULL, stonesoup_ev_handler);
mg_set_option(stonesoup_server, "listening_port", "8887");
while (1) {
... | VulDeePecker-master-joern/CWE-119/source_files/153654/myfile_119.c | utils.c | 106,118 | 0 | 0 | CWE-119 |
static void goodG2BSource(int64_t * &data)
{
data = (int64_t *)malloc(100*sizeof(int64_t));
} | VulDeePecker-master-joern/CWE-119/source_files/71626/myfile_6.c | CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int64_t_memmove_43.cpp | 49,53 | 0 | 0 | CWE-119 |
void badSink(structType myStruct)
{
char * data = myStruct.structFirst;
{
char source[100];
memset(source, 'C', 100-1);
source[100-1] = '\0';
strcpy(data, source);
printLine(data);
}
} | VulDeePecker-master-joern/CWE-119/source_files/74757/myfile_5.c | CWE124_Buffer_Underwrite__new_char_cpy_67b.cpp | 31,44 | 1 | 39 | CWE-119 |
void CWE134_Uncontrolled_Format_String__char_console_printf_31_good()
{
goodG2B();
goodB2G();
} | VulDeePecker-master-joern/CWE-119/source_files/79454/myfile_1.c | CWE134_Uncontrolled_Format_String__char_console_printf_31.c | 123,127 | 0 | 0 | CWE-119 |
template<typename T>
gfxTextRun *
MakeTextRun(const T *aText, uint32_t aLength,
gfxFontGroup *aFontGroup, const gfxFontGroup::Parameters* aParams,
uint32_t aFlags)
{
nsAutoPtr<gfxTextRun> textRun(aFontGroup->MakeTextRun(aText, aLength,
... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2014-1576/myfile_74.c | Firefox_32.0b9_CVE_2014_1576_layout_generic_nsTextFrame.cpp | 563,583 | 0 | 0 | CWE-119 |
const cgi_file_t *
cgiGetFile(void)
{
return (form_file);
} | VulDeePecker-master-joern/CWE-119/source_files/CVE-2010-1748/myfile_2.c | cups_1.4.2_CVE-2010-1748_var.c | 188,192 | 0 | 0 | CWE-119 |
svn_error_t *svn_config_get_bool(svn_config_t *cfg,svn_boolean_t *valuep,const char *section,const char *option,svn_boolean_t default_value)
{
const char *tmp_value;
svn_config_get(cfg,&tmp_value,section,option,((void *)0));
return get_bool(valuep,tmp_value,default_value,section,option);
} | VulDeePecker-master-joern/CWE-119/source_files/153292/myfile_42.c | config.c | 714,719 | 0 | 0 | CWE-119 |
inline static void rb_insert_case4(emem_tree_t *se_tree,emem_tree_node_t *node)
{
emem_tree_node_t *grandparent;
emem_tree_node_t *parent;
parent = emem_tree_parent(node);
grandparent = emem_tree_parent(parent);
if (!grandparent) {
return ;
}
if (node == parent -> right && parent == grandparent -> l... | VulDeePecker-master-joern/CWE-399/source_files/151809/myfile_84.c | emem.c | 1285,1305 | 0 | 0 | CWE-399 |
static void goodG2B()
{
int data;
data = -1;
data = CWE122_Heap_Based_Buffer_Overflow__c_CWE129_fgets_61b_goodG2BSource(data);
{
int i;
int * buffer = (int *)malloc(10 * sizeof(int));
for (i = 0; i < 10; i++)
{
buffer[i] = 0;
}
... | VulDeePecker-master-joern/CWE-119/source_files/70529/myfile_3.c | CWE122_Heap_Based_Buffer_Overflow__c_CWE129_fgets_61a.c | 67,98 | 0 | 0 | CWE-119 |
static void goodG2B2()
{
char * data;
char * dataBadBuffer = (char *)ALLOCA((10)*sizeof(char));
char * dataGoodBuffer = (char *)ALLOCA((10+1)*sizeof(char));
if(GLOBAL_CONST_TRUE)
{
data = dataGoodBuffer;
data[0] = '\0';
}
{
char source[10+1] = SRC_STRING;
... | VulDeePecker-master-joern/CWE-119/source_files/63004/myfile_5.c | CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_cpy_09.c | 79,97 | 0 | 0 | CWE-119 |
NS_IMETHODIMP
nsSaveAsCharset::DoConversionFallBack(uint32_t inUCS4, char *outString, int32_t bufferLength)
{
NS_ENSURE_ARG_POINTER(outString);
*outString = '\0';
nsresult rv = NS_OK;
if (ATTR_NO_FALLBACK(mAttribute)) {
return NS_OK;
}
if (attr_EntityAfterCharsetConv == MASK_ENTITY(mAttribute)) {
... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2013-0782/myfile_11.c | Firefox_18.0_CVE_2013_0782_intl_unicharutil_src_nsSaveAsCharset.cpp | 259,315 | 0 | 0 | CWE-119 |
static void goodG2B()
{
wchar_t * data;
data = new wchar_t[100];
wmemset(data, L'A', 50-1);
data[50-1] = L'\0';
{
wchar_t dest[50] = L"";
memcpy(dest, data, wcslen(data)*sizeof(wchar_t));
dest[50-1] = L'\0';
printWLine(data);
delete [] data;... | VulDeePecker-master-joern/CWE-119/source_files/69632/myfile_4.c | CWE122_Heap_Based_Buffer_Overflow__cpp_CWE806_wchar_t_memcpy_01.cpp | 48,63 | 0 | 0 | CWE-119 |
static void pci_vmsvga_realize(PCIDevice *dev, Error **errp)
{
struct pci_vmsvga_state_s *s = VMWARE_SVGA(dev);
dev->config[PCI_CACHE_LINE_SIZE] = 0x08;
dev->config[PCI_LATENCY_TIMER] = 0x40;
dev->config[PCI_INTERRUPT_LINE] = 0xff;
memory_region_init_io(&s->io_bar, NULL, &vmsvga_io_ops... | VulDeePecker-master-joern/CWE-399/source_files/CVE-2016-4453/myfile_18.c | qemu_2.3.0_CVE-2016-4453_vmware_vga.c | 1301,1326 | 0 | 0 | CWE-399 |
static bool
CheckSimdStore(FunctionCompiler& f, ParseNode* call, AsmJSSimdType opType,
unsigned numElems, MDefinition** def, Type* type)
{
unsigned numArgs = CallArgListLength(call);
if (numArgs != 3)
return f.failf(call, "expected 3 arguments to SIMD store, got %u", numArgs);
Scal... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2015-2712/myfile_165.c | Firefox_38.0b5_CVE_2015_2712_js_src_asmjs_AsmJSValidate.cpp | 5809,5836 | 0 | 0 | CWE-119 |
int main(int argc, char * argv[])
{
srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
printLine("Calling good()...");
good();
printLine("Finished good()");
#endif
#ifndef OMITBAD
printLine("Calling bad()...");
bad();
printLine("Finished bad()");
#endif
return 0;
} | VulDeePecker-master-joern/CWE-399/source_files/117639/myfile_11.c | CWE789_Uncontrolled_Mem_Alloc__new_char_listen_socket_54a.cpp | 249,264 | 0 | 0 | CWE-399 |
void good()
{
goodG2B();
goodB2G();
} | VulDeePecker-master-joern/CWE-399/source_files/117593/myfile_8.c | CWE789_Uncontrolled_Mem_Alloc__new_char_fscanf_62a.cpp | 122,126 | 0 | 0 | CWE-399 |
void badSink(map<int, int64_t *> dataMap)
{
int64_t * data = dataMap[2];
{
int64_t source[100] = {0};
memmove(data, source, 100*sizeof(int64_t));
printLongLongLine(data[0]);
free(data);
}
} | VulDeePecker-master-joern/CWE-119/source_files/71643/myfile_6.c | CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int64_t_memmove_74b.cpp | 27,38 | 1 | 34 | CWE-119 |
static u8 get_x86_model(unsigned long sig)
{
u8 x86, x86_model;
x86 = get_x86_family(sig);
x86_model = (sig >> 4) & 0xf;
if (x86 == 0x6 || x86 == 0xf)
x86_model += ((sig >> 16) & 0xf) << 4;
return x86_model;
} | VulDeePecker-master-joern/CWE-119/source_files/CVE-2015-2666/myfile_20.c | Linux_kernel_3.18.1_CVE_2015_2666_arch_x86_kernel_cpu_microcode_intel_early.c | 141,152 | 0 | 0 | CWE-119 |
static void goodG2B2()
{
char * data;
char dataBuffer[100] = "";
data = dataBuffer;
if(GLOBAL_CONST_FIVE==5)
{
strcpy(data, "fixedstringtest");
}
if(GLOBAL_CONST_FIVE==5)
{
{
char dest[100] = "";
SNPRINTF(dest, 100-1, data);... | VulDeePecker-master-joern/CWE-119/source_files/79494/myfile_6.c | CWE134_Uncontrolled_Format_String__char_console_snprintf_13.c | 203,222 | 0 | 0 | CWE-119 |
NS_IMETHODIMP nsNodeIterator::GetWhatToShow(PRUint32 *aWhatToShow)
{
*aWhatToShow = mWhatToShow;
return NS_OK;
} | VulDeePecker-master-joern/CWE-399/source_files/CVE-2010-3766/myfile_38.c | firefox_3.6.12_CVE_2010_3766_content_base_src_nsNodeIterator.cpp | 240,244 | 0 | 0 | CWE-399 |
void *CONF_imodule_get_usr_data(const CONF_IMODULE *md)
{
return md -> usr_data;
} | VulDeePecker-master-joern/CWE-399/source_files/151980/myfile_13.c | conf_mod.c | 538,541 | 0 | 0 | CWE-399 |
static void goodG2B2()
{
size_t data;
data = 0;
if(STATIC_CONST_FIVE==5)
{
data = 20;
}
if(STATIC_CONST_FIVE==5)
{
{
char * myString;
if (data > strlen(HELLO_STRING))
{
myString = (c... | VulDeePecker-master-joern/CWE-399/source_files/117132/myfile_1.c | CWE789_Uncontrolled_Mem_Alloc__malloc_char_listen_socket_06.c | 406,437 | 0 | 0 | CWE-399 |
PRBool nsWindow::BlurEventsSuppressed()
{
if (mBlurEventSuppressionLevel > 0)
return PR_TRUE;
HWND parentWnd = ::GetParent(mWnd);
if (parentWnd) {
nsWindow *parent = GetNSWindowPtr(parentWnd);
if (parent)
return parent->BlurEventsSuppressed();
}
return PR_FALSE;
} | VulDeePecker-master-joern/CWE-399/source_files/CVE-2009-3980/myfile_156.c | firefox_3.5.4_CVE_2009_3980_widget_src_windows_nsWindow.cpp | 1011,1025 | 0 | 0 | CWE-399 |
GlyphObserver(gfxFont* aFont, nsTextFrame* aFrame)
: gfxFont::GlyphChangeObserver(aFont), mFrame(aFrame) {} | VulDeePecker-master-joern/CWE-119/source_files/CVE-2014-1576/myfile_115.c | Firefox_32.0b9_CVE_2014_1576_layout_generic_nsTextFrame.cpp | 186,187 | 0 | 0 | CWE-119 |
TimestampTz GetCurrentStatementStartTimestamp()
{
return stmtStartTimestamp;
} | VulDeePecker-master-joern/CWE-399/source_files/151996/myfile_40.c | xact.c | 684,687 | 0 | 0 | CWE-399 |
static void
reg_handoff_dissector_plugin(gpointer data, gpointer user_data _U_)
{
dissector_plugin *plugin = (dissector_plugin *)data;
if (plugin->reg_handoff)
(plugin->reg_handoff)();
} | VulDeePecker-master-joern/CWE-119/source_files/CVE-2016-4006/myfile_157.c | Wireshark_2.0.2_CVE_2016_4006_epan_proto.c | 438,445 | 0 | 0 | CWE-119 |
void CWE122_Heap_Based_Buffer_Overflow__c_CWE129_connect_socket_34_good()
{
goodG2B();
goodB2G();
} | VulDeePecker-master-joern/CWE-119/source_files/70471/myfile_3.c | CWE122_Heap_Based_Buffer_Overflow__c_CWE129_connect_socket_34.c | 281,285 | 0 | 0 | CWE-119 |
const char *svn_cmdline_output_encoding(apr_pool_t *pool)
{
if (output_encoding) {
return (apr_pstrdup(pool,output_encoding));
}
else {
return (const char *)1;
}
} | VulDeePecker-master-joern/CWE-119/source_files/153164/myfile_39.c | cmdline.c | 448,456 | 0 | 0 | CWE-119 |
static JSBool
array_pop_slowly(JSContext *cx, JSObject* obj, CallArgs &args)
{
jsuint index;
if (!js_GetLengthProperty(cx, obj, &index))
return false;
if (index == 0) {
args.rval().setUndefined();
return js_SetLengthProperty(cx, obj, index);
}
index--;
JSBool hole;
... | VulDeePecker-master-joern/CWE-399/source_files/CVE-2012-0464/myfile_116.c | firefox_10.0b6_CVE_2012_0464_js_src_jsarray.cpp | 2543,2567 | 0 | 0 | CWE-399 |
int main(int argc, char * argv[])
{
srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
printLine("Calling good()...");
CWE134_Uncontrolled_Format_String__char_connect_socket_fprintf_06_good();
printLine("Finished good()");
#endif
#ifndef OMITBAD
printLine("Calling bad()...");
CWE134_Uncontr... | VulDeePecker-master-joern/CWE-119/source_files/79103/myfile_5.c | CWE134_Uncontrolled_Format_String__char_connect_socket_fprintf_06.c | 367,382 | 0 | 0 | CWE-119 |
int __ast_string_field_ptr_grow(struct ast_string_field_mgr *mgr,
struct ast_string_field_pool **pool_head, size_t needed,
const ast_string_field *ptr)
{
ssize_t grow = needed - AST_STRING_FIELD_ALLOCATION(*ptr);
size_t space = (*pool_head)->size - (*pool_head)->used;
if (*ptr != mgr->last_alloc) {
retu... | VulDeePecker-master-joern/CWE-119/source_files/148804/myfile_40.c | utils.c | 1691,1711 | 0 | 0 | CWE-119 |
static void copy_block(uint16_t *pdest, uint16_t *psrc, int block_size, int pitch)
{
uint8_t *dst = (uint8_t *)pdest;
uint8_t *src = (uint8_t *)psrc;
int stride = pitch * 2;
switch (block_size) {
case 2:
copy_block4(dst, src, stride, stride, 2);
break;
case 4:
copy_blo... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2013-0863/myfile_11.c | Ffmpeg_1.1.1_CVE_2013_0863_libavcodec_sanm.c | 770,787 | 0 | 0 | CWE-119 |
void
nsHTMLDocument::TryUserForcedCharset(nsIMarkupDocumentViewer* aMarkupDV,
nsIDocShell* aDocShell,
int32_t& aCharsetSource,
nsACString& aCharset)
{
nsresult rv = NS_OK;
if(kCharsetFromUserForced <= ... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2013-1730/myfile_124.c | Firefox_23.0b9_CVE_2013_1730_content_html_document_src_nsHTMLDocument.cpp | 352,397 | 0 | 0 | CWE-119 |
void corniplume_bejabers(char *faulter_capronyl)
{
++stonesoup_global_variable;;
readopted_bkgd(faulter_capronyl);
} | VulDeePecker-master-joern/CWE-399/source_files/151529/myfile_13.c | dirent_uri.c | 2130,2134 | 0 | 0 | CWE-399 |
sctp_disposition_t sctp_sf_do_5_1D_ce(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type, void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
struct sctp_association *new_asoc;
sctp_init_chunk_t ... | VulDeePecker-master-joern/CWE-399/source_files/CVE-2014-3688/myfile_70.c | linux_kernel_3.11.9_CVE_2014_3688_net_sctp_sm_statefuns.c | 653,854 | 0 | 0 | CWE-399 |
static void
dissect_ipcp_opt_type_len(tvbuff_t *tvb, int offset, proto_tree *tree,
const char *name)
{
guint8 type;
type = tvb_get_guint8(tvb, offset);
proto_tree_add_uint_format_value(tree, hf_ipcp_opt_type, tvb, offset, 1,
type, "%s (%u)", name, type);
proto_tree_add_item(tree, hf_ipcp_... | VulDeePecker-master-joern/CWE-119/source_files/148966/myfile_1115.c | packet-ppp.c | 2620,2630 | 0 | 0 | CWE-119 |
static int output_packet(InputStream *ist,const AVPacket *pkt)
{
int ret = 0;
int i;
int got_output;
AVPacket avpkt;
if (!ist -> saw_first_ts) {
ist -> dts = ((ist -> st -> avg_frame_rate . num?(-ist -> st -> codec -> has_b_frames * 1000000) / av_q2d(ist -> st -> avg_frame_rate) : 0));
ist -> pts = ... | VulDeePecker-master-joern/CWE-399/source_files/151587/myfile_5.c | ffmpeg.c | 1760,1900 | 0 | 0 | CWE-399 |
void CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68b_badSink()
{
wchar_t * data = CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68_badData;
{
wchar_t source[10+1] = SRC_STRING;
wcsncpy(data, source, wcslen(source) + 1);
printWLine... | VulDeePecker-master-joern/CWE-119/source_files/63826/myfile_4.c | CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68b.c | 33,43 | 1 | 40 | CWE-119 |
static void goodG2B1()
{
char * data;
char * dataBadBuffer = (char *)ALLOCA(50*sizeof(char));
char * dataGoodBuffer = (char *)ALLOCA(100*sizeof(char));
if(globalFalse)
{
printLine("Benign, fixed string");
}
else
{
data = dataGoodBuffer;
data[0]... | VulDeePecker-master-joern/CWE-119/source_files/63961/myfile_5.c | CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncat_10.c | 50,74 | 0 | 0 | CWE-119 |
static void goodG2B()
{
wchar_t * data;
wchar_t * dataBuffer = (wchar_t *)ALLOCA(100*sizeof(wchar_t));
data = dataBuffer;
goodG2BSource(data);
{
wchar_t dest[50] = L"";
memmove(dest, data, wcslen(data)*sizeof(wchar_t));
dest[50-1] = L'\0';
printWLine(data)... | VulDeePecker-master-joern/CWE-119/source_files/66210/myfile_3.c | CWE121_Stack_Based_Buffer_Overflow__CWE806_wchar_t_alloca_memmove_43.cpp | 60,73 | 0 | 0 | CWE-119 |
int av_interleave_packet_per_dts(AVFormatContext *s,AVPacket *out,AVPacket *pkt,int flush)
{
return ff_interleave_packet_per_dts(s,out,pkt,flush);
} | VulDeePecker-master-joern/CWE-119/source_files/153636/myfile_20.c | mux.c | 809,812 | 0 | 0 | CWE-119 |
void*
nsContentUtils::AllocClassMatchingInfo(nsINode* aRootNode,
const nsString* aClasses)
{
nsAttrValue attrValue;
attrValue.ParseAtomArray(*aClasses);
ClassMatchingInfo* info = new ClassMatchingInfo;
if (attrValue.Type() == nsAttrValue::eAtomArray) {
info->mClas... | VulDeePecker-master-joern/CWE-399/source_files/CVE-2013-1681/myfile_45.c | firefox_20.0b7_CVE_2013_1681_content_base_src_nsContentUtils.cpp | 6181,6199 | 0 | 0 | CWE-399 |
void CWE124_Buffer_Underwrite__malloc_wchar_t_ncpy_09_good()
{
goodG2B1();
goodG2B2();
} | VulDeePecker-master-joern/CWE-119/source_files/74678/myfile_5.c | CWE124_Buffer_Underwrite__malloc_wchar_t_ncpy_09.c | 118,122 | 0 | 0 | CWE-119 |
ResourceOwner ResourceOwnerCreate(ResourceOwner parent,const char *name)
{
ResourceOwner owner;
owner = ((ResourceOwner )(MemoryContextAllocZero(TopMemoryContext,sizeof(ResourceOwnerData ))));
owner -> name = name;
if (parent) {
owner -> parent = parent;
owner -> nextchild = parent -> firstchild;
... | VulDeePecker-master-joern/CWE-119/source_files/153797/myfile_24.c | resowner.c | 220,231 | 0 | 0 | CWE-119 |
static inline struct hlist_head *mp_hash(struct dentry *dentry)
{
unsigned long tmp = ((unsigned long)dentry / L1_CACHE_BYTES);
tmp = tmp + (tmp >> mp_hash_shift);
return &mountpoint_hashtable[tmp & mp_hash_mask];
} | VulDeePecker-master-joern/CWE-399/source_files/CVE-2016-6213/myfile_115.c | linux_kernel_4.8.9_CVE_2016_6213_fs_namespace.c | 89,94 | 0 | 0 | CWE-399 |
static struct sip_threadinfo *sip_threadinfo_create(struct ast_tcptls_session_instance *tcptls_session, int transport)
{
struct sip_threadinfo *th;
if (!tcptls_session || !(th = ao2_alloc(sizeof(*th), sip_threadinfo_destructor))) {
return NULL;
}
th->alert_pipe[0] = th->alert_pipe[1] = -1;
if (pipe(th->aler... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2013-5641/myfile_490.c | asterisk_11.4.0_CVE-2013-5641_chan_sip.c | 2491,2512 | 0 | 0 | CWE-119 |
int main(int argc, char * argv[])
{
srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
printLine("Calling good()...");
CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_ncpy_52_good();
printLine("Finished good()");
#endif
#ifndef OMITBAD
printLine("Calling bad()...");
CWE122_Heap_Based_Buffe... | VulDeePecker-master-joern/CWE-119/source_files/70958/myfile_3.c | CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_ncpy_52a.c | 72,87 | 0 | 0 | CWE-119 |
static void goodG2B1()
{
char * data;
data = NULL;
switch(5)
{
case 6:
printLine("Benign, fixed string");
break;
default:
data = (char *)malloc(100*sizeof(char));
data[0] = '\0';
break;
}
{
char source[100];
mem... | VulDeePecker-master-joern/CWE-119/source_files/71470/myfile_5.c | CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_snprintf_15.c | 61,86 | 0 | 0 | CWE-119 |
static void goodG2B2()
{
wchar_t * data;
wchar_t * dataBuffer = (wchar_t *)ALLOCA(100*sizeof(wchar_t));
wmemset(dataBuffer, L'A', 100-1);
dataBuffer[100-1] = L'\0';
if(STATIC_CONST_FIVE==5)
{
data = dataBuffer;
}
{
wchar_t source[100];
wmemset(source, L... | VulDeePecker-master-joern/CWE-119/source_files/75363/myfile_2.c | CWE124_Buffer_Underwrite__wchar_t_alloca_ncpy_06.c | 84,105 | 0 | 0 | CWE-119 |
static void vwr_read_rec_data(wtap *wth, guint8 *data_ptr, guint8 *rec, int rec_size)
{
vwr_t *vwr = (vwr_t *)wth->priv;
int bytes_written = 0;
register int i;
register guint8 *s_ptr, *m_ptr;
gint16 octe... | VulDeePecker-master-joern/CWE-119/source_files/148966/myfile_389.c | vwr.c | 1003,1250 | 0 | 0 | CWE-119 |
void svn_stringbuf_replace(svn_stringbuf_t *str,apr_size_t pos,apr_size_t old_count,const char *bytes,apr_size_t new_count)
{
if (bytes + new_count > (str -> data) && bytes < (str -> data + str -> blocksize)) {
const char *temp = (apr_pstrndup(str -> pool,bytes,new_count));
svn_stringbuf_replace(str,pos,ol... | VulDeePecker-master-joern/CWE-119/source_files/152932/myfile_2.c | string.c | 611,635 | 0 | 0 | CWE-119 |
void CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_51b_badSink(char * data)
{
{
char source[10+1] = SRC_STRING;
strcpy(data, source);
printLine(data);
}
} | VulDeePecker-master-joern/CWE-119/source_files/63257/myfile_4.c | CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_51b.c | 30,38 | 1 | 35 | CWE-119 |
static inline emem_tree_node_t *
emem_tree_uncle(emem_tree_node_t *node)
{
emem_tree_node_t *parent, *grandparent;
parent=emem_tree_parent(node);
if(!parent){
return NULL;
}
grandparent=emem_tree_parent(parent);
if(!grandparent){
return NULL;
}
if(parent==grandparent->left){
return grandparent->right;
... | VulDeePecker-master-joern/CWE-119/source_files/148966/myfile_2484.c | emem.c | 1473,1490 | 0 | 0 | CWE-119 |
static int rtl8169_change_mtu(struct net_device *dev, int new_mtu)
{
struct rtl8169_private *tp = netdev_priv(dev);
int ret = 0;
if (new_mtu < ETH_ZLEN || new_mtu > SafeMtu)
return -EINVAL;
dev->mtu = new_mtu;
if (!netif_running(dev))
goto out;
rtl8169_down(dev);
rtl8169_set_rxbufsize(tp, dev);
ret ... | VulDeePecker-master-joern/CWE-399/source_files/CVE-2009-3613/myfile_91.c | linux_kernel_2.6.26_CVE_2009_3613_drivers_net_r8169.c | 2179,2210 | 0 | 0 | CWE-399 |
static void task_clear_group_stop_trapping(struct task_struct *task)
{
if (unlikely(task->group_stop & GROUP_STOP_TRAPPING)) {
task->group_stop &= ~GROUP_STOP_TRAPPING;
__wake_up_sync_key(&task->parent->signal->wait_chldexit,
TASK_UNINTERRUPTIBLE, 1, task);
}
} | VulDeePecker-master-joern/CWE-399/source_files/CVE-2013-2141/myfile_48.c | linux_kernel_3.0.1_CVE_2013_2141_kernel_signal.c | 237,244 | 0 | 0 | CWE-399 |
static char * badSource(char * data)
{
{
size_t dataLen = strlen(data);
FILE * pFile;
if (100-dataLen > 1)
{
pFile = fopen(FILENAME, "r");
if (pFile != NULL)
{
if (fgets(data+dataLen, (int)(100-d... | VulDeePecker-master-joern/CWE-399/source_files/112688/myfile_1.c | CWE761_Free_Pointer_Not_at_Start_of_Buffer__char_file_42.c | 31,55 | 0 | 0 | CWE-399 |
void goodG2BSink_b(wchar_t * data)
{
goodG2BSink_c(data);
} | VulDeePecker-master-joern/CWE-119/source_files/69231/myfile_3.c | CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805_wchar_t_ncpy_53b.cpp | 43,46 | 0 | 0 | CWE-119 |
This is an unofficial HuggingFace version of "VulDeePecker: A Deep Learning-Based System for Vulnerability Detection " dataset.
Database of "VulDeePecker: A Deep Learning-Based System for Vulnerability Detection" (NDSS'18)
Code Gadget Database (CGD) focuses on two types of vulnerabilities in C/C++ programs, buffer error vulnerability (CWE-119) and resource management error vulnerability (CWE-399). Each code gadget is composed of a number of program statements (i.e., lines of code), which are related to each other according to the data flow associated to the arguments of some library/API function calls.
Based on the National Vulnerability Database (NVD) and the NIST Software Assurance Reference Dataset (SARD) project, we collect 520 open source software program files with corresponding diff files and 8,122 test cases for the buffer error vulnerability, and 320 open source software program files with corresponding diff files and 1,729 test cases for the resource management error vulnerability.
In total, the CGD database contains 61,638 code gadgets, including 17,725 code gadgets that are vulnerable and 43,913 code gadgets that are not vulnerable. Among the 17,725 code gadgets that vulnerable, 10,440 corresponds to buffer error vulnerabilities and the rest 7,285 corresponds to resource management error vulnerabilities.
- Downloads last month
- 100