prompt stringclasses 1
value | completions listlengths 2 1.33k | labels listlengths 2 1.33k | source stringclasses 1
value | other_info dict | index int64 0 719 | cwe stringclasses 9
values | language stringclasses 6
values |
|---|---|---|---|---|---|---|---|
Determine whether the {function_name} code is vulnerable or not. | [
"int ecall_restore(const char *input, uint64_t input_len, char **output,\n uint64_t *output_len) {\n if (!asylo::primitives::TrustedPrimitives::IsOutsideEnclave(input,\n input_len) ||\n !asylo::primitives::TrustedPrimitives::IsOutsi... | [
1,
0,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 509,
"char_start": 361,
"chars": " ||\n !asylo::primitives::TrustedPrimitives::IsOutsideEnclave(output,\n *output_len)"
}
],
"deleted": []
},
"commit_link"... | 700 | cwe-787 | cc |
Determine whether the {function_name} code is vulnerable or not. | [
"int ecall_restore(const char *input, uint64_t input_len, char **output,\n uint64_t *output_len) {\n if (!asylo::primitives::TrustedPrimitives::IsOutsideEnclave(input,\n input_len) ||\n !asylo::primitives::TrustedPrimitives::IsOutsi... | [
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 509,
"char_start": 361,
"chars": " ||\n !asylo::primitives::TrustedPrimitives::IsOutsideEnclave(output,\n *output_len)"
}
],
"deleted": []
},
"commit_link"... | 700 | cwe-787 | cc |
Determine whether the {function_name} code is vulnerable or not. | [
"static void handle_PORT(ctrl_t *ctrl, char *str)\n{\n\tint a, b, c, d, e, f;\n\tchar addr[INET_ADDRSTRLEN];\n\tstruct sockaddr_in sin;",
"\tif (ctrl->data_sd > 0) {\n\t\tuev_io_stop(&ctrl->data_watcher);\n\t\tclose(ctrl->data_sd);\n\t\tctrl->data_sd = -1;\n\t}",
"\t/* Convert PORT command's argument to IP addr... | [
1,
1,
1,
0,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 363,
"char_start": 362,
"chars": "n"
},
{
"char_end": 388,
"char_start": 374,
"chars": ", sizeof(addr)"
}
],
"deleted": []
},
"commit_link": "github.com/troglobit/uftpd/commit/0fb2c031c... | 701 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static void handle_PORT(ctrl_t *ctrl, char *str)\n{\n\tint a, b, c, d, e, f;\n\tchar addr[INET_ADDRSTRLEN];\n\tstruct sockaddr_in sin;",
"\tif (ctrl->data_sd > 0) {\n\t\tuev_io_stop(&ctrl->data_watcher);\n\t\tclose(ctrl->data_sd);\n\t\tctrl->data_sd = -1;\n\t}",
"\t/* Convert PORT command's argument to IP addr... | [
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 363,
"char_start": 362,
"chars": "n"
},
{
"char_end": 388,
"char_start": 374,
"chars": ", sizeof(addr)"
}
],
"deleted": []
},
"commit_link": "github.com/troglobit/uftpd/commit/0fb2c031c... | 701 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"int rom_copy(uint8_t *dest, hwaddr addr, size_t size)\n{\n hwaddr end = addr + size;\n uint8_t *s, *d = dest;\n size_t l = 0;\n Rom *rom;",
" QTAILQ_FOREACH(rom, &roms, next) {\n if (rom->fw_file) {\n continue;\n }\n if (rom->mr) {\n continue;\n }\... | [
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 426,
"char_start": 406,
"chars": " || rom->addr < addr"
}
],
"deleted": []
},
"commit_link": "github.com/qemu/qemu/commit/4f1c6cb2f9afafda05eab150fd2bd284edce6676",
"file_name": "hw/core/loader.c",
"func_name": "rom_c... | 702 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"int rom_copy(uint8_t *dest, hwaddr addr, size_t size)\n{\n hwaddr end = addr + size;\n uint8_t *s, *d = dest;\n size_t l = 0;\n Rom *rom;",
" QTAILQ_FOREACH(rom, &roms, next) {\n if (rom->fw_file) {\n continue;\n }\n if (rom->mr) {\n continue;\n }\... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 426,
"char_start": 406,
"chars": " || rom->addr < addr"
}
],
"deleted": []
},
"commit_link": "github.com/qemu/qemu/commit/4f1c6cb2f9afafda05eab150fd2bd284edce6676",
"file_name": "hw/core/loader.c",
"func_name": "rom_c... | 702 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)\n{\n\tstatic const char module[] = \"NeXTDecode\";\n\tunsigned char *bp, *op;\n\ttmsize_t cc;\n\tuint8* row;\n\ttmsize_t scanline, n;",
"\t(void) s;\n\t/*\n\t * Each scanline is assumed to start off as all\n\t * white (we assume a PhotometricInterpretatio... | [
1,
1,
1,
0,
1,
0,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1486,
"char_start": 1450,
"chars": " tmsize_t op_offset = 0;\n"
},
{
"char_end": 1984,
"char_start": 1960,
"chars": " && op_offset < scanline"
},
{
"char_end": 2290,
... | 703 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)\n{\n\tstatic const char module[] = \"NeXTDecode\";\n\tunsigned char *bp, *op;\n\ttmsize_t cc;\n\tuint8* row;\n\ttmsize_t scanline, n;",
"\t(void) s;\n\t/*\n\t * Each scanline is assumed to start off as all\n\t * white (we assume a PhotometricInterpretatio... | [
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1486,
"char_start": 1450,
"chars": " tmsize_t op_offset = 0;\n"
},
{
"char_end": 1984,
"char_start": 1960,
"chars": " && op_offset < scanline"
},
{
"char_end": 2290,
... | 703 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"TiledInputFile::rawTileData (int &dx, int &dy,\n\t\t\t int &lx, int &ly,\n const char *&pixelData,\n\t\t\t int &pixelDataSize)\n{\n try\n {\n Lock lock (*_data->_streamData);",
" if (!isValidTile (dx, dy, lx, ly))\n throw IEX_NAMESPACE::ArgExc (\... | [
1,
1,
1,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1384,
"char_start": 1191,
"chars": "else\n {\n if(!isValidTile (dx, dy, lx, ly) )\n {\n throw IEX_NAMESPACE::IoExc (\"rawTileData read an invalid tile\");\n }\n }\n "... | 704 | cwe-787 | cpp |
Determine whether the {function_name} code is vulnerable or not. | [
"TiledInputFile::rawTileData (int &dx, int &dy,\n\t\t\t int &lx, int &ly,\n const char *&pixelData,\n\t\t\t int &pixelDataSize)\n{\n try\n {\n Lock lock (*_data->_streamData);",
" if (!isValidTile (dx, dy, lx, ly))\n throw IEX_NAMESPACE::ArgExc (\... | [
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1384,
"char_start": 1191,
"chars": "else\n {\n if(!isValidTile (dx, dy, lx, ly) )\n {\n throw IEX_NAMESPACE::IoExc (\"rawTileData read an invalid tile\");\n }\n }\n "... | 704 | cwe-787 | cpp |
Determine whether the {function_name} code is vulnerable or not. | [
"static int tcos_decipher(sc_card_t *card, const u8 * crgram, size_t crgram_len, u8 * out, size_t outlen)\n{\n\tsc_context_t *ctx;\n\tsc_apdu_t apdu;\n\tu8 rbuf[SC_MAX_APDU_BUFFER_SIZE];\n\tu8 sbuf[SC_MAX_APDU_BUFFER_SIZE];\n\ttcos_data *data;\n\tint tcos3, r;",
"\tassert(card != NULL && crgram != NULL && out != ... | [
1,
1,
1,
1,
1,
0,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 925,
"char_start": 853,
"chars": "if (sizeof sbuf - 1 < crgram_len)\n\t\treturn SC_ERROR_INVALID_ARGUMENTS;\n\t"
}
],
"deleted": []
},
"commit_link": "github.com/OpenSC/OpenSC/commit/9d294de90d1cc66956389856e60b6944b27b48... | 705 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int tcos_decipher(sc_card_t *card, const u8 * crgram, size_t crgram_len, u8 * out, size_t outlen)\n{\n\tsc_context_t *ctx;\n\tsc_apdu_t apdu;\n\tu8 rbuf[SC_MAX_APDU_BUFFER_SIZE];\n\tu8 sbuf[SC_MAX_APDU_BUFFER_SIZE];\n\ttcos_data *data;\n\tint tcos3, r;",
"\tassert(card != NULL && crgram != NULL && out != ... | [
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 925,
"char_start": 853,
"chars": "if (sizeof sbuf - 1 < crgram_len)\n\t\treturn SC_ERROR_INVALID_ARGUMENTS;\n\t"
}
],
"deleted": []
},
"commit_link": "github.com/OpenSC/OpenSC/commit/9d294de90d1cc66956389856e60b6944b27b48... | 705 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int decode_zbuf(AVBPrint *bp, const uint8_t *data,\n const uint8_t *data_end)\n{\n z_stream zstream;\n unsigned char *buf;\n unsigned buf_size;\n int ret;",
" zstream.zalloc = ff_png_zalloc;\n zstream.zfree = ff_png_zfree;\n zstream.opaque = NULL;\n if (infla... | [
1,
1,
1,
0,
1,
0,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 548,
"char_start": 547,
"chars": "2"
},
{
"char_end": 592,
"char_start": 588,
"chars": " < 2"
},
{
"char_end": 737,
"char_start": 733,
"chars": " - 1"
}
],
... | 706 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int decode_zbuf(AVBPrint *bp, const uint8_t *data,\n const uint8_t *data_end)\n{\n z_stream zstream;\n unsigned char *buf;\n unsigned buf_size;\n int ret;",
" zstream.zalloc = ff_png_zalloc;\n zstream.zfree = ff_png_zfree;\n zstream.opaque = NULL;\n if (infla... | [
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 548,
"char_start": 547,
"chars": "2"
},
{
"char_end": 592,
"char_start": 588,
"chars": " < 2"
},
{
"char_end": 737,
"char_start": 733,
"chars": " - 1"
}
],
... | 706 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"MultiPartInputFile::Data::chunkOffsetReconstruction(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is, const vector<InputPartData*>& parts)\n{\n //\n // Reconstruct broken chunk offset tables. Stop once we received any exception.\n //",
" Int64 position = is.tellg();",
" \n //\n // check we unde... | [
1,
1,
1,
0,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 3369,
"char_start": 3368,
"chars": "="
}
],
"deleted": []
},
"commit_link": "github.com/AcademySoftwareFoundation/openexr/commit/8b5370c688a7362673c3a5256d93695617a4cd9a",
"file_name": "OpenEXR/IlmImf/ImfMultiPartInputF... | 707 | cwe-787 | cpp |
Determine whether the {function_name} code is vulnerable or not. | [
"MultiPartInputFile::Data::chunkOffsetReconstruction(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is, const vector<InputPartData*>& parts)\n{\n //\n // Reconstruct broken chunk offset tables. Stop once we received any exception.\n //",
" Int64 position = is.tellg();",
" \n //\n // check we unde... | [
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 3369,
"char_start": 3368,
"chars": "="
}
],
"deleted": []
},
"commit_link": "github.com/AcademySoftwareFoundation/openexr/commit/8b5370c688a7362673c3a5256d93695617a4cd9a",
"file_name": "OpenEXR/IlmImf/ImfMultiPartInputF... | 707 | cwe-787 | cpp |
Determine whether the {function_name} code is vulnerable or not. | [
"make_canonical(struct ly_ctx *ctx, int type, const char **value, void *data1, void *data2)\n{\n const uint16_t buf_len = 511;\n char buf[buf_len + 1];\n struct lys_type_bit **bits = NULL;\n struct lyxp_expr *exp;\n const char *module_name, *cur_expr, *end;\n int i, j, count;\n int64_t num;\n ... | [
1,
1,
1,
1,
0,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1452,
"char_start": 1347,
"chars": "LY_CHECK_ERR_RETURN(strlen(module_name) + 1 + strlen(*value) > buf_len, LOGBUF(*value), -1);\n "
},
{
"char_end": 1591,
"char_start": 1512,
"chars": "\n ... | 708 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"make_canonical(struct ly_ctx *ctx, int type, const char **value, void *data1, void *data2)\n{\n const uint16_t buf_len = 511;\n char buf[buf_len + 1];\n struct lys_type_bit **bits = NULL;\n struct lyxp_expr *exp;\n const char *module_name, *cur_expr, *end;\n int i, j, count;\n int64_t num;\n ... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1452,
"char_start": 1347,
"chars": "LY_CHECK_ERR_RETURN(strlen(module_name) + 1 + strlen(*value) > buf_len, LOGBUF(*value), -1);\n "
},
{
"char_end": 1591,
"char_start": 1512,
"chars": "\n ... | 708 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int decode_frame(AVCodecContext *avctx, void *data,\n int *got_frame, AVPacket *avpkt)\n{\n EXRContext *s = avctx->priv_data;\n ThreadFrame frame = { .f = data };\n AVFrame *picture = data;\n uint8_t *ptr;",
" int i, y, ret, ymax;\n int planes;\n int out_line_si... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 4831,
"char_start": 4825,
"chars": "FFMIN("
},
{
"char_end": 4845,
"char_start": 4838,
"chars": ", s->h)"
}
],
"deleted": []
},
"commit_link": "github.com/FFmpeg/FFmpeg/commit/3e5959b34... | 709 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int decode_frame(AVCodecContext *avctx, void *data,\n int *got_frame, AVPacket *avpkt)\n{\n EXRContext *s = avctx->priv_data;\n ThreadFrame frame = { .f = data };\n AVFrame *picture = data;\n uint8_t *ptr;",
" int i, y, ret, ymax;\n int planes;\n int out_line_si... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 4831,
"char_start": 4825,
"chars": "FFMIN("
},
{
"char_end": 4845,
"char_start": 4838,
"chars": ", s->h)"
}
],
"deleted": []
},
"commit_link": "github.com/FFmpeg/FFmpeg/commit/3e5959b34... | 709 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static void add_password(AUTH_HDR *request, unsigned char type, CONST char *password, char *secret)\n{\n\tMD5_CTX md5_secret, my_md5;\n\tunsigned char misc[AUTH_VECTOR_LEN];\n\tint i;\n\tint length = strlen(password);\n\tunsigned char hashed[256 + AUTH_PASS_LEN];\t/* can't be longer than this */\n\tunsigned char *... | [
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 730,
"char_start": 727,
"chars": "gth"
}
],
"deleted": [
{
"char_end": 727,
"char_start": 724,
"chars": "str"
},
{
"char_end": 740,
"char_start": 730,
"chars":... | 710 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static void add_password(AUTH_HDR *request, unsigned char type, CONST char *password, char *secret)\n{\n\tMD5_CTX md5_secret, my_md5;\n\tunsigned char misc[AUTH_VECTOR_LEN];\n\tint i;\n\tint length = strlen(password);\n\tunsigned char hashed[256 + AUTH_PASS_LEN];\t/* can't be longer than this */\n\tunsigned char *... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 730,
"char_start": 727,
"chars": "gth"
}
],
"deleted": [
{
"char_end": 727,
"char_start": 724,
"chars": "str"
},
{
"char_end": 740,
"char_start": 730,
"chars":... | 710 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"unicode_unfold_key(OnigCodePoint code)\n{\n static const struct ByUnfoldKey wordlist[] =\n {\n {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},\n {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | SVEN | {
"char_changes": {
"added": [
{
"char_end": 39684,
"char_start": 39656,
"chars": " && wordlist[key].index >= 0"
}
],
"deleted": []
},
"commit_link": "github.com/kkos/oniguruma/commit/166a6c3999bf06b4de0ab4ce6b088a468cc4029f",
"file_name": "src/unicode_unfold_key.... | 711 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"unicode_unfold_key(OnigCodePoint code)\n{\n static const struct ByUnfoldKey wordlist[] =\n {\n {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},\n {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | SVEN | {
"char_changes": {
"added": [
{
"char_end": 39684,
"char_start": 39656,
"chars": " && wordlist[key].index >= 0"
}
],
"deleted": []
},
"commit_link": "github.com/kkos/oniguruma/commit/166a6c3999bf06b4de0ab4ce6b088a468cc4029f",
"file_name": "src/unicode_unfold_key.... | 711 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"PHP_FUNCTION(imagegammacorrect)\n{\n\tzval *IM;\n\tgdImagePtr im;\n\tint i;\n\tdouble input, output;",
"\tif (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, \"rdd\", &IM, &input, &output) == FAILURE) {\n\t\treturn;",
"",
"\t}",
"\tZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, \"Image\", le_gd);",
"\tif ... | [
1,
1,
0,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 347,
"char_start": 205,
"chars": "if ( input <= 0.0 || output <= 0.0 ) {\n\t\tphp_error_docref(NULL TSRMLS_CC, E_WARNING, \"Gamma values should be positive\");\n\t\tRETURN_FALSE;\n\t}\n\n\t"
}
],
"deleted": []
},
"commit_... | 712 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"PHP_FUNCTION(imagegammacorrect)\n{\n\tzval *IM;\n\tgdImagePtr im;\n\tint i;\n\tdouble input, output;",
"\tif (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, \"rdd\", &IM, &input, &output) == FAILURE) {\n\t\treturn;",
"\t}",
"\tif ( input <= 0.0 || output <= 0.0 ) {\n\t\tphp_error_docref(NULL TSRMLS_CC, E_W... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 347,
"char_start": 205,
"chars": "if ( input <= 0.0 || output <= 0.0 ) {\n\t\tphp_error_docref(NULL TSRMLS_CC, E_WARNING, \"Gamma values should be positive\");\n\t\tRETURN_FALSE;\n\t}\n\n\t"
}
],
"deleted": []
},
"commit_... | 712 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"char *rfbProcessFileTransferReadBuffer(rfbClientPtr cl, uint32_t length)\n{\n char *buffer=NULL;\n int n=0;",
" FILEXFER_ALLOWED_OR_CLOSE_AND_RETURN(\"\", cl, NULL);",
"",
" /*",
" rfbLog(\"rfbProcessFileTransferReadBuffer(%dlen)\\n\", length);",
" */",
"",
" if (length>0) {",
... | [
1,
1,
0,
1,
0,
1,
0,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 171,
"char_start": 170,
"chars": "\n"
},
{
"char_end": 192,
"char_start": 182,
"chars": " We late"
},
{
"char_end": 253,
"char_start": 193,
"chars": " alloc length+1... | 713 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"char *rfbProcessFileTransferReadBuffer(rfbClientPtr cl, uint32_t length)\n{\n char *buffer=NULL;\n int n=0;",
" FILEXFER_ALLOWED_OR_CLOSE_AND_RETURN(\"\", cl, NULL);",
"",
" /*",
" We later alloc length+1, which might wrap around on 32-bit systems if length equals\n 0XFFFFFFFF, i.... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 171,
"char_start": 170,
"chars": "\n"
},
{
"char_end": 192,
"char_start": 182,
"chars": " We late"
},
{
"char_end": 253,
"char_start": 193,
"chars": " alloc length+1... | 713 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t *buf, int size)\n{\n int i, j, ret;\n int64_t off;\n int val_1;\n int num_video;\n AVIOContext pb0, *pb = &pb0;",
" ffio_init_context(pb, buf, size, 0, NULL, NULL, NULL, NULL);",
" ffio_read_varlen(pb); // track... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
0,
1,
1,
1,
0,
1,
1,
0,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 2952,
"char_start": 2951,
"chars": "1"
},
{
"char_end": 3485,
"char_start": 3471,
"chars": " + 1 + len/255"
},
{
"char_end": 3829,
"char_start": 3819,
"chars": "av_ass... | 714 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t *buf, int size)\n{\n int i, j, ret;\n int64_t off;\n int val_1;\n int num_video;\n AVIOContext pb0, *pb = &pb0;",
" ffio_init_context(pb, buf, size, 0, NULL, NULL, NULL, NULL);",
" ffio_read_varlen(pb); // track... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 2952,
"char_start": 2951,
"chars": "1"
},
{
"char_end": 3485,
"char_start": 3471,
"chars": " + 1 + len/255"
},
{
"char_end": 3829,
"char_start": 3819,
"chars": "av_ass... | 714 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"yaffsfs_istat(TSK_FS_INFO *fs, TSK_FS_ISTAT_FLAG_ENUM flags, FILE * hFile, TSK_INUM_T inum,\n TSK_DADDR_T numblock, int32_t sec_skew)\n{\n TSK_FS_META *fs_meta;\n TSK_FS_FILE *fs_file;\n YAFFSFS_INFO *yfs = (YAFFSFS_INFO *)fs;\n char ls[12];\n YAFFSFS_PRINT_ADDR print;",
" char timeBuf[32];"... | [
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 303,
"char_start": 302,
"chars": "1"
},
{
"char_end": 305,
"char_start": 304,
"chars": "8"
}
],
"deleted": [
{
"char_end": 303,
"char_start": 302,
"chars": "3"... | 715 | cwe-787 | cpp |
Determine whether the {function_name} code is vulnerable or not. | [
"yaffsfs_istat(TSK_FS_INFO *fs, TSK_FS_ISTAT_FLAG_ENUM flags, FILE * hFile, TSK_INUM_T inum,\n TSK_DADDR_T numblock, int32_t sec_skew)\n{\n TSK_FS_META *fs_meta;\n TSK_FS_FILE *fs_file;\n YAFFSFS_INFO *yfs = (YAFFSFS_INFO *)fs;\n char ls[12];\n YAFFSFS_PRINT_ADDR print;",
" char timeBuf[128];... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 303,
"char_start": 302,
"chars": "1"
},
{
"char_end": 305,
"char_start": 304,
"chars": "8"
}
],
"deleted": [
{
"char_end": 303,
"char_start": 302,
"chars": "3"... | 715 | cwe-787 | cpp |
Determine whether the {function_name} code is vulnerable or not. | [
"static void InsertRow(unsigned char *p,ssize_t y,Image *image, int bpp)\n{\n ExceptionInfo\n *exception;",
" int\n bit;",
" ssize_t\n x;",
" register PixelPacket\n *q;",
" IndexPacket\n index;",
" register IndexPacket\n *indexes;",
" exception=(&image->exception);\n switch (bp... | [
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1641,
"char_start": 1640,
"chars": "4"
}
],
"deleted": [
{
"char_end": 1641,
"char_start": 1640,
"chars": "2"
}
]
},
"commit_link": "github.com/ImageMagick/ImageMagick/commit/b6ae2f... | 716 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static void InsertRow(unsigned char *p,ssize_t y,Image *image, int bpp)\n{\n ExceptionInfo\n *exception;",
" int\n bit;",
" ssize_t\n x;",
" register PixelPacket\n *q;",
" IndexPacket\n index;",
" register IndexPacket\n *indexes;",
" exception=(&image->exception);\n switch (bp... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1641,
"char_start": 1640,
"chars": "4"
}
],
"deleted": [
{
"char_end": 1641,
"char_start": 1640,
"chars": "2"
}
]
},
"commit_link": "github.com/ImageMagick/ImageMagick/commit/b6ae2f... | 716 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"int rds_rdma_extra_size(struct rds_rdma_args *args)\n{\n\tstruct rds_iovec vec;\n\tstruct rds_iovec __user *local_vec;\n\tint tot_pages = 0;\n\tunsigned int nr_pages;\n\tunsigned int i;",
"\tlocal_vec = (struct rds_iovec __user *)(unsigned long) args->local_vec_addr;",
"",
"\n\t/* figure out the number of pa... | [
1,
1,
0,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 301,
"char_start": 256,
"chars": "if (args->nr_local == 0)\n\t\treturn -EINVAL;\n\n\t"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/c095508770aebf1b9218e77026e48345d719b17c",
"file_name": "net/... | 717 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"int rds_rdma_extra_size(struct rds_rdma_args *args)\n{\n\tstruct rds_iovec vec;\n\tstruct rds_iovec __user *local_vec;\n\tint tot_pages = 0;\n\tunsigned int nr_pages;\n\tunsigned int i;",
"\tlocal_vec = (struct rds_iovec __user *)(unsigned long) args->local_vec_addr;",
"\n\tif (args->nr_local == 0)\n\t\treturn... | [
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 301,
"char_start": 256,
"chars": "if (args->nr_local == 0)\n\t\treturn -EINVAL;\n\n\t"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/c095508770aebf1b9218e77026e48345d719b17c",
"file_name": "net/... | 717 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int decode_frame(AVCodecContext *avctx,\n void *data, int *got_frame,\n AVPacket *avpkt)\n{\n PicContext *s = avctx->priv_data;\n AVFrame *frame = data;\n uint32_t *palette;\n int bits_per_plane, bpp, etype, esize, npal, pos_after_pal;\n int i, x,... | [
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1547,
"char_start": 1545,
"chars": "||"
}
],
"deleted": [
{
"char_end": 1547,
"char_start": 1545,
"chars": "&&"
}
]
},
"commit_link": "github.com/FFmpeg/FFmpeg/commit/8c2ea3030af7b4... | 718 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int decode_frame(AVCodecContext *avctx,\n void *data, int *got_frame,\n AVPacket *avpkt)\n{\n PicContext *s = avctx->priv_data;\n AVFrame *frame = data;\n uint32_t *palette;\n int bits_per_plane, bpp, etype, esize, npal, pos_after_pal;\n int i, x,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1547,
"char_start": 1545,
"chars": "||"
}
],
"deleted": [
{
"char_end": 1547,
"char_start": 1545,
"chars": "&&"
}
]
},
"commit_link": "github.com/FFmpeg/FFmpeg/commit/8c2ea3030af7b4... | 718 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"concat_opt_exact_str(OptStr* to, UChar* s, UChar* end, OnigEncoding enc)\n{\n int i, j, len;\n UChar *p;",
" for (i = to->len, p = s; p < end && i < OPT_EXACT_MAXLEN; ) {\n len = enclen(enc, p);",
" if (i + len > OPT_EXACT_MAXLEN) break;",
" for (j = 0; j < len && p < end; j++)\n to->s[i++] ... | [
1,
1,
0,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 213,
"char_start": 212,
"chars": "="
}
],
"deleted": []
},
"commit_link": "github.com/kkos/oniguruma/commit/cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0",
"file_name": "src/regcomp.c",
"func_name": "concat_opt_exact_str",... | 719 | cwe-787 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"concat_opt_exact_str(OptStr* to, UChar* s, UChar* end, OnigEncoding enc)\n{\n int i, j, len;\n UChar *p;",
" for (i = to->len, p = s; p < end && i < OPT_EXACT_MAXLEN; ) {\n len = enclen(enc, p);",
" if (i + len >= OPT_EXACT_MAXLEN) break;",
" for (j = 0; j < len && p < end; j++)\n to->s[i++]... | [
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 213,
"char_start": 212,
"chars": "="
}
],
"deleted": []
},
"commit_link": "github.com/kkos/oniguruma/commit/cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0",
"file_name": "src/regcomp.c",
"func_name": "concat_opt_exact_str",... | 719 | cwe-787 | c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.