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 |
|---|---|---|---|---|---|---|
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-119/source_files/66860/myfile_4.c | CWE121_Stack_Based_Buffer_Overflow__dest_wchar_t_alloca_cat_73a.cpp | 93,108 | 0 | 0 | CWE-119 |
void CWE121_Stack_Based_Buffer_Overflow__CWE806_wchar_t_alloca_ncpy_54c_goodG2BSink(wchar_t * data)
{
CWE121_Stack_Based_Buffer_Overflow__CWE806_wchar_t_alloca_ncpy_54d_goodG2BSink(data);
} | VulDeePecker-master-joern/CWE-119/source_files/66312/myfile_7.c | CWE121_Stack_Based_Buffer_Overflow__CWE806_wchar_t_alloca_ncpy_54c.c | 41,44 | 0 | 0 | CWE-119 |
static int proto_seq_show(struct seq_file *seq, void *v)
{
if (v == &proto_list)
seq_printf(seq, "%-9s %-4s %-8s %-6s %-5s %-7s %-4s %-10s %s",
"protocol",
"size",
"sockets",
"memory",
"press",
"maxhdr",
"slab",
"module",
"cl co di ac io in de sh ss gs se re sp... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2012-6704/myfile_14.c | linux_kernel_3.4.113_CVE_2012_6704_net_core_sock.c | 2621,2637 | 0 | 0 | CWE-119 |
void
AudioBufferSourceNode::SendBufferParameterToStream(JSContext* aCx)
{
AudioNodeStream* ns = static_cast<AudioNodeStream*>(mStream.get());
MOZ_ASSERT(ns, "Why don't we have a stream here?");
if (mBuffer) {
float rate = mBuffer->SampleRate();
nsRefPtr<ThreadSharedFloatArrayBufferList> data =
mB... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2014-1549/myfile_6.c | Firefox_27.0.1_CVE_2014_1549_content_media_webaudio_AudioBufferSourceNode.cpp | 523,542 | 0 | 0 | CWE-119 |
nsSize
nsFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
nsSize aCBSize, nscoord aAvailableWidth,
nsSize aMargin, nsSize aBorder, nsSize aPadding,
bool aShrinkWrap)
{
nsSize result(0xdeadbeef, NS_UNCONSTRAINEDSIZE);
i... | VulDeePecker-master-joern/CWE-399/source_files/CVE-2012-1974/myfile_59.c | firefox_14.0b12_CVE_2012_1974_layout_generic_nsFrame.cpp | 3893,3909 | 0 | 0 | CWE-399 |
static unsigned int rt_hash_code(u32 daddr, u32 saddr, u8 tos)
{
return (jhash_3words(daddr, saddr, (u32) tos, rt_hash_rnd)
& rt_hash_mask);
} | VulDeePecker-master-joern/CWE-399/source_files/CVE-2006-1525/myfile_3.c | linux_kernel_2.5.75_CVE_2006_1525_net_ipv4_route.c | 208,212 | 0 | 0 | CWE-399 |
static void xhci_wakeup_endpoint(USBBus *bus, USBEndpoint *ep,
unsigned int stream)
{
XHCIState *xhci = container_of(bus, XHCIState, bus);
int slotid;
DPRINTF("%s\n", __func__);
slotid = ep->dev->addr;
if (slotid == 0 || !xhci->slots[slotid-1].enabled) {
D... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2014-5263/myfile_65.c | qemu_1.6.0_CVE-2014-5263_hcd-xhci.c | 3276,3289 | 0 | 0 | CWE-119 |
void CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_10_bad()
{
char * data;
char dataBadBuffer[10];
char dataGoodBuffer[10+1];
if(globalTrue)
{
data = dataBadBuffer;
data[0] = '\0';
}
{
char source[10+1] = SRC_STRING;
... | VulDeePecker-master-joern/CWE-119/source_files/63401/myfile_1.c | CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_10.c | 28,47 | 1 | 44 | CWE-119 |
static struct create_durable *
create_reconnect_durable_buf(struct cifs_fid *fid)
{
struct create_durable *buf;
buf = kzalloc(sizeof(struct create_durable), GFP_KERNEL);
if (!buf)
return NULL;
buf->ccontext.DataOffset = cpu_to_le16(offsetof
(struct create_durable, Data));
buf->ccontext.DataLength = cpu_... | VulDeePecker-master-joern/CWE-399/source_files/CVE-2014-7145/myfile_12.c | linux_kernel_3.11.9_CVE_2014_7145_fs_cifs_smb2pdu.c | 872,894 | 0 | 0 | CWE-399 |
void gimp_context_set_tool_preset(GimpContext *context,GimpToolPreset *tool_preset)
{
do {
if (({
GTypeInstance *__inst = (GTypeInstance *)context;
GType __t = gimp_context_get_type();
gboolean __r;
if (!__inst) {
__r = 0;
}
else {
if (__inst -> g_class && __i... | VulDeePecker-master-joern/CWE-399/source_files/150665/myfile_66.c | gimpcontext.c | 3930,3987 | 0 | 0 | CWE-399 |
void CWE121_Stack_Based_Buffer_Overflow__CWE806_char_declare_ncat_31_bad()
{
char * data;
char dataBuffer[100];
data = dataBuffer;
memset(data, 'A', 100-1);
data[100-1] = '\0';
{
char * dataCopy = data;
char * data = dataCopy;
{
char dest[50] = "";
... | VulDeePecker-master-joern/CWE-119/source_files/65964/myfile_4.c | CWE121_Stack_Based_Buffer_Overflow__CWE806_char_declare_ncat_31.c | 23,42 | 1 | 37 | CWE-119 |
nsresult
nsCSSFrameConstructor::CreateAnonymousFrames(nsFrameConstructorState& aState,
nsIContent* aParent,
nsIDocument* aDocument,
nsIFrame* a... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2010-3778/myfile_212.c | Firefox_3.5.8_CVE_2010_3778_layout_base_nsCSSFrameConstructor.cpp | 5704,5777 | 0 | 0 | CWE-119 |
void good()
{
goodG2B1();
goodG2B2();
} | VulDeePecker-master-joern/CWE-119/source_files/74719/myfile_3.c | CWE124_Buffer_Underwrite__new_char_cpy_02.cpp | 115,119 | 0 | 0 | CWE-119 |
static int tag_tree_decode(Jpeg2000DecoderContext *s, Jpeg2000TgtNode *node,
int threshold)
{
Jpeg2000TgtNode *stack[30];
int sp = -1, curval = 0;
if (!node) {
av_log(s->avctx, AV_LOG_ERROR, "missing node\n");
return AVERROR_INVALIDDATA;
}
while (node &... | VulDeePecker-master-joern/CWE-119/source_files/CVE-2016-2213/myfile_22.c | Ffmpeg_2.8.2_CVE_2016_2213_libavcodec_jpeg2000dec.c | 150,188 | 0 | 0 | CWE-119 |
JS_HasPropertyById(JSContext *cx, JSObject *obj, jsid id, JSBool *foundp)
{
JSBool ok;
JSObject *obj2;
JSProperty *prop;
CHECK_REQUEST(cx);
ok = LookupPropertyById(cx, obj, id,
JSRESOLVE_QUALIFIED | JSRESOLVE_DETECTING,
&obj2, &prop);
if... | VulDeePecker-master-joern/CWE-399/source_files/CVE-2010-0160/myfile_210.c | firefox_3.5.7_CVE_2010_0160_js_src_jsapi.cpp | 3446,3462 | 0 | 0 | CWE-399 |
void svn_stream_set_skip(svn_stream_t *stream,svn_stream_skip_fn_t skip_fn)
{
stream -> skip_fn = skip_fn;
} | VulDeePecker-master-joern/CWE-399/source_files/151913/myfile_63.c | stream.c | 182,185 | 0 | 0 | CWE-399 |
void CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_memcpy_13_bad()
{
char * data;
data = NULL;
if(GLOBAL_CONST_FIVE==5)
{
data = (char *)malloc(10*sizeof(char));
}
{
char source[10+1] = SRC_STRING;
memcpy(data, source, (strlen(source) + 1) ... | VulDeePecker-master-joern/CWE-119/source_files/70844/myfile_1.c | CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_memcpy_13.c | 28,45 | 1 | 42 | CWE-119 |
static guint get_non_implicit_size(SmiType *sT)
{
SmiRange *sR;
guint size = 0xffffffff;
switch(sT -> basetype){
case SMI_BASETYPE_OCTETSTRING:
{
}
case SMI_BASETYPE_OBJECTIDENTIFIER:
break;
default:
return 0;
}
for (; sT; sT = smiGetParentType(sT)) {
for (sR = smiGetFirstRange(... | VulDeePecker-master-joern/CWE-119/source_files/152920/myfile_40.c | oids.c | 452,483 | 0 | 0 | CWE-119 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.