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. | [
"void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)\n{\n\tstruct snd_pcm_runtime *runtime;\n\tunsigned long flags;",
"\tif (PCM_RUNTIME_CHECK(substream))\n\t\treturn;\n\truntime = substream->runtime;",
"\tsnd_pcm_stream_lock_irqsave(substream, flags);\n\tif (!snd_pcm_running(substream) ||\n\t s... | [
1,
1,
1,
1,
0,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 512,
"char_start": 464,
"chars": "kill_fasync(&runtime->fasync, SIGIO, POLL_IN);\n\t"
}
],
"deleted": [
{
"char_end": 561,
"char_start": 513,
"chars": ");\n\tkill_fasync(&runtime->fasync, SIGIO, POLL_IN"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4",
"file_name": "sound/core/pcm_lib.c",
"func_name": "snd_pcm_period_elapsed",
"line_changes": {
"added": [
{
"char_end": 564,
"char_start": 511,
"line": "\tsnd_pcm_stream_unlock_irqrestore(substream, flags);\n",
"line_no": 21
}
],
"deleted": [
{
"char_end": 516,
"char_start": 463,
"line": "\tsnd_pcm_stream_unlock_irqrestore(substream, flags);\n",
"line_no": 20
}
]
},
"vul_type": "cwe-416"
} | 550 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)\n{\n\tstruct snd_pcm_runtime *runtime;\n\tunsigned long flags;",
"\tif (PCM_RUNTIME_CHECK(substream))\n\t\treturn;\n\truntime = substream->runtime;",
"\tsnd_pcm_stream_lock_irqsave(substream, flags);\n\tif (!snd_pcm_running(substream) ||\n\t s... | [
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 512,
"char_start": 464,
"chars": "kill_fasync(&runtime->fasync, SIGIO, POLL_IN);\n\t"
}
],
"deleted": [
{
"char_end": 561,
"char_start": 513,
"chars": ");\n\tkill_fasync(&runtime->fasync, SIGIO, POLL_IN"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4",
"file_name": "sound/core/pcm_lib.c",
"func_name": "snd_pcm_period_elapsed",
"line_changes": {
"added": [
{
"char_end": 564,
"char_start": 511,
"line": "\tsnd_pcm_stream_unlock_irqrestore(substream, flags);\n",
"line_no": 21
}
],
"deleted": [
{
"char_end": 516,
"char_start": 463,
"line": "\tsnd_pcm_stream_unlock_irqrestore(substream, flags);\n",
"line_no": 20
}
]
},
"vul_type": "cwe-416"
} | 550 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"int wwunpack(uint8_t *exe, uint32_t exesz, uint8_t *wwsect, struct cli_exe_section *sects, uint16_t scount, uint32_t pe, int desc) {\n uint8_t *structs = wwsect + 0x2a1, *compd, *ccur, *unpd, *ucur, bc;\n uint32_t src, srcend, szd, bt, bits;\n int error=0, i;",
" cli_dbgmsg(\"in wwunpack\\n\");\n while (1) ... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 3906,
"char_start": 3545,
"chars": "if (!CLI_ISCONTAINED(wwsect, sects[scount].rsz, wwsect+0x295, 4) ||\n !CLI_ISCONTAINED(wwsect, sects[scount].rsz, wwsect+0x295+sects[scount].rva, 4) ||\n !CLI_ISCONTAINED(wwsect, sects[scount].rsz, wwsect+0x295+sects[scount].rva+0x299, 4)) {\n cli_dbgmsg(\"WWPack: unpack memory address out of bounds.\\n\");\n return CL_EFORMAT;\n }\n "
}
],
"deleted": []
},
"commit_link": "github.com/vrtadmin/clamav-devel/commit/dfc00cd3301a42b571454b51a6102eecf58407bc",
"file_name": "libclamav/wwunpack.c",
"func_name": "wwunpack",
"line_changes": {
"added": [
{
"char_end": 3613,
"char_start": 3541,
"line": " if (!CLI_ISCONTAINED(wwsect, sects[scount].rsz, wwsect+0x295, 4) ||\n",
"line_no": 155
},
{
"char_end": 3703,
"char_start": 3613,
"line": " !CLI_ISCONTAINED(wwsect, sects[scount].rsz, wwsect+0x295+sects[scount].rva, 4) ||\n",
"line_no": 156
},
{
"char_end": 3799,
"char_start": 3703,
"line": " !CLI_ISCONTAINED(wwsect, sects[scount].rsz, wwsect+0x295+sects[scount].rva+0x299, 4)) {\n",
"line_no": 157
},
{
"char_end": 3869,
"char_start": 3799,
"line": " cli_dbgmsg(\"WWPack: unpack memory address out of bounds.\\n\");\n",
"line_no": 158
},
{
"char_end": 3896,
"char_start": 3869,
"line": " return CL_EFORMAT;\n",
"line_no": 159
},
{
"char_end": 3902,
"char_start": 3896,
"line": " }\n",
"line_no": 160
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 551 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"int wwunpack(uint8_t *exe, uint32_t exesz, uint8_t *wwsect, struct cli_exe_section *sects, uint16_t scount, uint32_t pe, int desc) {\n uint8_t *structs = wwsect + 0x2a1, *compd, *ccur, *unpd, *ucur, bc;\n uint32_t src, srcend, szd, bt, bits;\n int error=0, i;",
" cli_dbgmsg(\"in wwunpack\\n\");\n while (1) ... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 3906,
"char_start": 3545,
"chars": "if (!CLI_ISCONTAINED(wwsect, sects[scount].rsz, wwsect+0x295, 4) ||\n !CLI_ISCONTAINED(wwsect, sects[scount].rsz, wwsect+0x295+sects[scount].rva, 4) ||\n !CLI_ISCONTAINED(wwsect, sects[scount].rsz, wwsect+0x295+sects[scount].rva+0x299, 4)) {\n cli_dbgmsg(\"WWPack: unpack memory address out of bounds.\\n\");\n return CL_EFORMAT;\n }\n "
}
],
"deleted": []
},
"commit_link": "github.com/vrtadmin/clamav-devel/commit/dfc00cd3301a42b571454b51a6102eecf58407bc",
"file_name": "libclamav/wwunpack.c",
"func_name": "wwunpack",
"line_changes": {
"added": [
{
"char_end": 3613,
"char_start": 3541,
"line": " if (!CLI_ISCONTAINED(wwsect, sects[scount].rsz, wwsect+0x295, 4) ||\n",
"line_no": 155
},
{
"char_end": 3703,
"char_start": 3613,
"line": " !CLI_ISCONTAINED(wwsect, sects[scount].rsz, wwsect+0x295+sects[scount].rva, 4) ||\n",
"line_no": 156
},
{
"char_end": 3799,
"char_start": 3703,
"line": " !CLI_ISCONTAINED(wwsect, sects[scount].rsz, wwsect+0x295+sects[scount].rva+0x299, 4)) {\n",
"line_no": 157
},
{
"char_end": 3869,
"char_start": 3799,
"line": " cli_dbgmsg(\"WWPack: unpack memory address out of bounds.\\n\");\n",
"line_no": 158
},
{
"char_end": 3896,
"char_start": 3869,
"line": " return CL_EFORMAT;\n",
"line_no": 159
},
{
"char_end": 3902,
"char_start": 3896,
"line": " }\n",
"line_no": 160
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 551 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle)\n{\n\tstruct super_block *sb;\n\tint err;\n\tint rc;",
"\tif (!ext4_handle_valid(handle)) {\n\t\text4_put_nojournal(handle);\n\t\treturn 0;\n\t}\n",
"",
"\tif (!handle->h_transaction) {",
"\t\terr = jbd2_journal_stop(handle);\n... | [
1,
1,
0,
1,
0,
1,
1,
0,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 231,
"char_start": 209,
"chars": "err = handle->h_err;\n\t"
},
{
"char_end": 265,
"char_start": 264,
"chars": "c"
},
{
"char_end": 318,
"char_start": 317,
"chars": "c"
}
],
"deleted": [
{
"char_end": 242,
"char_start": 241,
"chars": "e"
},
{
"char_end": 244,
"char_start": 243,
"chars": "r"
},
{
"char_end": 293,
"char_start": 283,
"chars": "handle->h_"
},
{
"char_end": 309,
"char_start": 299,
"chars": "handle->h_"
},
{
"char_end": 316,
"char_start": 315,
"chars": "e"
},
{
"char_end": 318,
"char_start": 317,
"chars": "r"
},
{
"char_end": 395,
"char_start": 373,
"chars": ";\n\terr = handle->h_err"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/6934da9238da947628be83635e365df41064b09b",
"file_name": "fs/ext4/ext4_jbd2.c",
"func_name": "__ext4_journal_stop",
"line_changes": {
"added": [
{
"char_end": 230,
"char_start": 208,
"line": "\terr = handle->h_err;\n",
"line_no": 12
},
{
"char_end": 295,
"char_start": 261,
"line": "\t\trc = jbd2_journal_stop(handle);\n",
"line_no": 14
},
{
"char_end": 320,
"char_start": 295,
"line": "\t\treturn err ? err : rc;\n",
"line_no": 15
}
],
"deleted": [
{
"char_end": 274,
"char_start": 239,
"line": "\t\terr = jbd2_journal_stop(handle);\n",
"line_no": 13
},
{
"char_end": 320,
"char_start": 274,
"line": "\t\treturn handle->h_err ? handle->h_err : err;\n",
"line_no": 14
},
{
"char_end": 397,
"char_start": 375,
"line": "\terr = handle->h_err;\n",
"line_no": 18
}
]
},
"vul_type": "cwe-416"
} | 552 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle)\n{\n\tstruct super_block *sb;\n\tint err;\n\tint rc;",
"\tif (!ext4_handle_valid(handle)) {\n\t\text4_put_nojournal(handle);\n\t\treturn 0;\n\t}\n",
"\terr = handle->h_err;",
"\tif (!handle->h_transaction) {",
"\t\trc = jbd2_jo... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 231,
"char_start": 209,
"chars": "err = handle->h_err;\n\t"
},
{
"char_end": 265,
"char_start": 264,
"chars": "c"
},
{
"char_end": 318,
"char_start": 317,
"chars": "c"
}
],
"deleted": [
{
"char_end": 242,
"char_start": 241,
"chars": "e"
},
{
"char_end": 244,
"char_start": 243,
"chars": "r"
},
{
"char_end": 293,
"char_start": 283,
"chars": "handle->h_"
},
{
"char_end": 309,
"char_start": 299,
"chars": "handle->h_"
},
{
"char_end": 316,
"char_start": 315,
"chars": "e"
},
{
"char_end": 318,
"char_start": 317,
"chars": "r"
},
{
"char_end": 395,
"char_start": 373,
"chars": ";\n\terr = handle->h_err"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/6934da9238da947628be83635e365df41064b09b",
"file_name": "fs/ext4/ext4_jbd2.c",
"func_name": "__ext4_journal_stop",
"line_changes": {
"added": [
{
"char_end": 230,
"char_start": 208,
"line": "\terr = handle->h_err;\n",
"line_no": 12
},
{
"char_end": 295,
"char_start": 261,
"line": "\t\trc = jbd2_journal_stop(handle);\n",
"line_no": 14
},
{
"char_end": 320,
"char_start": 295,
"line": "\t\treturn err ? err : rc;\n",
"line_no": 15
}
],
"deleted": [
{
"char_end": 274,
"char_start": 239,
"line": "\t\terr = jbd2_journal_stop(handle);\n",
"line_no": 13
},
{
"char_end": 320,
"char_start": 274,
"line": "\t\treturn handle->h_err ? handle->h_err : err;\n",
"line_no": 14
},
{
"char_end": 397,
"char_start": 375,
"line": "\terr = handle->h_err;\n",
"line_no": 18
}
]
},
"vul_type": "cwe-416"
} | 552 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,\n\t\t\tstruct rq_map_data *map_data,\n\t\t\tconst struct iov_iter *iter, gfp_t gfp_mask)\n{\n\tbool copy = false;\n\tunsigned long align = q->dma_pad_mask | queue_dma_alignment(q);\n\tstruct bio *bio = NULL;\n\tstruct iov_iter i;\n\tint ret;",
... | [
1,
0,
1,
1,
1,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 339,
"char_start": 298,
"chars": "!iter_is_iovec(iter))\n\t\tgoto fail;\n\n\tif ("
},
{
"char_end": 824,
"char_start": 818,
"chars": "\nfail:"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/a0ac402cfcdc904f9772e1762b3fda112dcc56a0",
"file_name": "block/blk-map.c",
"func_name": "blk_rq_map_user_iov",
"line_changes": {
"added": [
{
"char_end": 320,
"char_start": 293,
"line": "\tif (!iter_is_iovec(iter))\n",
"line_no": 11
},
{
"char_end": 333,
"char_start": 320,
"line": "\t\tgoto fail;\n",
"line_no": 12
},
{
"char_end": 334,
"char_start": 333,
"line": "\n",
"line_no": 13
},
{
"char_end": 825,
"char_start": 819,
"line": "fail:\n",
"line_no": 36
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 553 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,\n\t\t\tstruct rq_map_data *map_data,\n\t\t\tconst struct iov_iter *iter, gfp_t gfp_mask)\n{\n\tbool copy = false;\n\tunsigned long align = q->dma_pad_mask | queue_dma_alignment(q);\n\tstruct bio *bio = NULL;\n\tstruct iov_iter i;\n\tint ret;",
... | [
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 339,
"char_start": 298,
"chars": "!iter_is_iovec(iter))\n\t\tgoto fail;\n\n\tif ("
},
{
"char_end": 824,
"char_start": 818,
"chars": "\nfail:"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/a0ac402cfcdc904f9772e1762b3fda112dcc56a0",
"file_name": "block/blk-map.c",
"func_name": "blk_rq_map_user_iov",
"line_changes": {
"added": [
{
"char_end": 320,
"char_start": 293,
"line": "\tif (!iter_is_iovec(iter))\n",
"line_no": 11
},
{
"char_end": 333,
"char_start": 320,
"line": "\t\tgoto fail;\n",
"line_no": 12
},
{
"char_end": 334,
"char_start": 333,
"line": "\n",
"line_no": 13
},
{
"char_end": 825,
"char_start": 819,
"line": "fail:\n",
"line_no": 36
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 553 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int mif_process_cmpt(mif_hdr_t *hdr, char *buf)\n{\n\tjas_tvparser_t *tvp;\n\tmif_cmpt_t *cmpt;\n\tint id;",
"\tcmpt = 0;\n\ttvp = 0;",
"\tif (!(cmpt = mif_cmpt_create())) {\n\t\tgoto error;\n\t}\n\tcmpt->tlx = 0;\n\tcmpt->tly = 0;\n\tcmpt->sampperx = 0;\n\tcmpt->samppery = 0;\n\tcmpt->width = 0;\n\tcmp... | [
1,
1,
1,
1,
0,
1,
0,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1428,
"char_start": 1400,
"chars": "\n\tjas_tvparser_destroy(tvp);"
}
],
"deleted": [
{
"char_end": 1303,
"char_start": 1275,
"chars": "jas_tvparser_destroy(tvp);\n\t"
}
]
},
"commit_link": "github.com/mdadams/jasper/commit/df5d2867e8004e51e18b89865bc4aa69229227b3",
"file_name": "src/libjasper/mif/mif_cod.c",
"func_name": "mif_process_cmpt",
"line_changes": {
"added": [
{
"char_end": 1429,
"char_start": 1401,
"line": "\tjas_tvparser_destroy(tvp);\n",
"line_no": 66
}
],
"deleted": [
{
"char_end": 1302,
"char_start": 1274,
"line": "\tjas_tvparser_destroy(tvp);\n",
"line_no": 60
}
]
},
"vul_type": "cwe-416"
} | 554 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int mif_process_cmpt(mif_hdr_t *hdr, char *buf)\n{\n\tjas_tvparser_t *tvp;\n\tmif_cmpt_t *cmpt;\n\tint id;",
"\tcmpt = 0;\n\ttvp = 0;",
"\tif (!(cmpt = mif_cmpt_create())) {\n\t\tgoto error;\n\t}\n\tcmpt->tlx = 0;\n\tcmpt->tly = 0;\n\tcmpt->sampperx = 0;\n\tcmpt->samppery = 0;\n\tcmpt->width = 0;\n\tcmp... | [
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1428,
"char_start": 1400,
"chars": "\n\tjas_tvparser_destroy(tvp);"
}
],
"deleted": [
{
"char_end": 1303,
"char_start": 1275,
"chars": "jas_tvparser_destroy(tvp);\n\t"
}
]
},
"commit_link": "github.com/mdadams/jasper/commit/df5d2867e8004e51e18b89865bc4aa69229227b3",
"file_name": "src/libjasper/mif/mif_cod.c",
"func_name": "mif_process_cmpt",
"line_changes": {
"added": [
{
"char_end": 1429,
"char_start": 1401,
"line": "\tjas_tvparser_destroy(tvp);\n",
"line_no": 66
}
],
"deleted": [
{
"char_end": 1302,
"char_start": 1274,
"line": "\tjas_tvparser_destroy(tvp);\n",
"line_no": 60
}
]
},
"vul_type": "cwe-416"
} | 554 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"onig_new_deluxe(regex_t** reg, const UChar* pattern, const UChar* pattern_end,\n OnigCompileInfo* ci, OnigErrorInfo* einfo)\n{\n int r;\n UChar *cpat, *cpat_end;",
" if (IS_NOT_NULL(einfo)) einfo->par = (UChar* )NULL;",
" if (ci->pattern_enc != ci->target_enc) {",
" r = conv_encoding(ci... | [
1,
1,
1,
0,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 282,
"char_start": 281,
"chars": "u"
},
{
"char_end": 292,
"char_start": 285,
"chars": "ONIGERR"
},
{
"char_end": 296,
"char_start": 293,
"chars": "NOT"
},
{
"char_end": 315,
"char_start": 297,
"chars": "SUPPORTED_ENCODING"
},
{
"char_end": 327,
"char_start": 316,
"chars": "COMBINATION"
}
],
"deleted": [
{
"char_end": 287,
"char_start": 279,
"chars": " = conv_"
},
{
"char_end": 302,
"char_start": 288,
"chars": "ncoding(ci->pa"
},
{
"char_end": 305,
"char_start": 303,
"chars": "te"
},
{
"char_end": 323,
"char_start": 308,
"chars": "enc, ci->target"
},
{
"char_end": 345,
"char_start": 324,
"chars": "enc, pattern, pattern"
},
{
"char_end": 385,
"char_start": 346,
"chars": "end,\n &cpat, &cpat"
},
{
"char_end": 416,
"char_start": 386,
"chars": "end);\n if (r != 0) return r"
}
]
},
"commit_link": "github.com/kkos/oniguruma/commit/0f7f61ed1b7b697e283e37bd2d731d0bd57adb55",
"file_name": "src/regext.c",
"func_name": "onig_new_deluxe",
"line_changes": {
"added": [
{
"char_end": 329,
"char_start": 274,
"line": " return ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION;\n",
"line_no": 10
}
],
"deleted": [
{
"char_end": 351,
"char_start": 274,
"line": " r = conv_encoding(ci->pattern_enc, ci->target_enc, pattern, pattern_end,\n",
"line_no": 10
},
{
"char_end": 392,
"char_start": 351,
"line": " &cpat, &cpat_end);\n",
"line_no": 11
},
{
"char_end": 418,
"char_start": 392,
"line": " if (r != 0) return r;\n",
"line_no": 12
}
]
},
"vul_type": "cwe-416"
} | 555 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"onig_new_deluxe(regex_t** reg, const UChar* pattern, const UChar* pattern_end,\n OnigCompileInfo* ci, OnigErrorInfo* einfo)\n{\n int r;\n UChar *cpat, *cpat_end;",
" if (IS_NOT_NULL(einfo)) einfo->par = (UChar* )NULL;",
" if (ci->pattern_enc != ci->target_enc) {",
" return ONIGERR_NOT_S... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 282,
"char_start": 281,
"chars": "u"
},
{
"char_end": 292,
"char_start": 285,
"chars": "ONIGERR"
},
{
"char_end": 296,
"char_start": 293,
"chars": "NOT"
},
{
"char_end": 315,
"char_start": 297,
"chars": "SUPPORTED_ENCODING"
},
{
"char_end": 327,
"char_start": 316,
"chars": "COMBINATION"
}
],
"deleted": [
{
"char_end": 287,
"char_start": 279,
"chars": " = conv_"
},
{
"char_end": 302,
"char_start": 288,
"chars": "ncoding(ci->pa"
},
{
"char_end": 305,
"char_start": 303,
"chars": "te"
},
{
"char_end": 323,
"char_start": 308,
"chars": "enc, ci->target"
},
{
"char_end": 345,
"char_start": 324,
"chars": "enc, pattern, pattern"
},
{
"char_end": 385,
"char_start": 346,
"chars": "end,\n &cpat, &cpat"
},
{
"char_end": 416,
"char_start": 386,
"chars": "end);\n if (r != 0) return r"
}
]
},
"commit_link": "github.com/kkos/oniguruma/commit/0f7f61ed1b7b697e283e37bd2d731d0bd57adb55",
"file_name": "src/regext.c",
"func_name": "onig_new_deluxe",
"line_changes": {
"added": [
{
"char_end": 329,
"char_start": 274,
"line": " return ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION;\n",
"line_no": 10
}
],
"deleted": [
{
"char_end": 351,
"char_start": 274,
"line": " r = conv_encoding(ci->pattern_enc, ci->target_enc, pattern, pattern_end,\n",
"line_no": 10
},
{
"char_end": 392,
"char_start": 351,
"line": " &cpat, &cpat_end);\n",
"line_no": 11
},
{
"char_end": 418,
"char_start": 392,
"line": " if (r != 0) return r;\n",
"line_no": 12
}
]
},
"vul_type": "cwe-416"
} | 555 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"void usb_sg_cancel(struct usb_sg_request *io)\n{\n\tunsigned long flags;\n\tint i, retval;",
"\tspin_lock_irqsave(&io->lock, flags);",
"\tif (io->status) {",
"\t\tspin_unlock_irqrestore(&io->lock, flags);\n\t\treturn;\n\t}\n\t/* shut everything down */\n\tio->status = -ECONNRESET;",
"",
"\tspin_unlock_ir... | [
1,
1,
0,
1,
0,
1,
1,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 158,
"char_start": 140,
"chars": " || io->count == 0"
},
{
"char_end": 334,
"char_start": 273,
"chars": "\n\tio->count++;\t\t/* Keep the request alive until we're done */"
},
{
"char_end": 817,
"char_start": 677,
"chars": "\n\n\tspin_lock_irqsave(&io->lock, flags);\n\tio->count--;\n\tif (!io->count)\n\t\tcomplete(&io->complete);\n\tspin_unlock_irqrestore(&io->lock, flags);"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/056ad39ee9253873522f6469c3364964a322912b",
"file_name": "drivers/usb/core/message.c",
"func_name": "usb_sg_cancel",
"line_changes": {
"added": [
{
"char_end": 162,
"char_start": 125,
"line": "\tif (io->status || io->count == 0) {\n",
"line_no": 7
},
{
"char_end": 335,
"char_start": 274,
"line": "\tio->count++;\t\t/* Keep the request alive until we're done */\n",
"line_no": 13
},
{
"char_end": 679,
"char_start": 678,
"line": "\n",
"line_no": 27
},
{
"char_end": 717,
"char_start": 679,
"line": "\tspin_lock_irqsave(&io->lock, flags);\n",
"line_no": 28
},
{
"char_end": 731,
"char_start": 717,
"line": "\tio->count--;\n",
"line_no": 29
},
{
"char_end": 748,
"char_start": 731,
"line": "\tif (!io->count)\n",
"line_no": 30
},
{
"char_end": 775,
"char_start": 748,
"line": "\t\tcomplete(&io->complete);\n",
"line_no": 31
},
{
"char_end": 818,
"char_start": 775,
"line": "\tspin_unlock_irqrestore(&io->lock, flags);\n",
"line_no": 32
}
],
"deleted": [
{
"char_end": 144,
"char_start": 125,
"line": "\tif (io->status) {\n",
"line_no": 7
}
]
},
"vul_type": "cwe-416"
} | 556 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"void usb_sg_cancel(struct usb_sg_request *io)\n{\n\tunsigned long flags;\n\tint i, retval;",
"\tspin_lock_irqsave(&io->lock, flags);",
"\tif (io->status || io->count == 0) {",
"\t\tspin_unlock_irqrestore(&io->lock, flags);\n\t\treturn;\n\t}\n\t/* shut everything down */\n\tio->status = -ECONNRESET;",
"\tio... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 158,
"char_start": 140,
"chars": " || io->count == 0"
},
{
"char_end": 334,
"char_start": 273,
"chars": "\n\tio->count++;\t\t/* Keep the request alive until we're done */"
},
{
"char_end": 817,
"char_start": 677,
"chars": "\n\n\tspin_lock_irqsave(&io->lock, flags);\n\tio->count--;\n\tif (!io->count)\n\t\tcomplete(&io->complete);\n\tspin_unlock_irqrestore(&io->lock, flags);"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/056ad39ee9253873522f6469c3364964a322912b",
"file_name": "drivers/usb/core/message.c",
"func_name": "usb_sg_cancel",
"line_changes": {
"added": [
{
"char_end": 162,
"char_start": 125,
"line": "\tif (io->status || io->count == 0) {\n",
"line_no": 7
},
{
"char_end": 335,
"char_start": 274,
"line": "\tio->count++;\t\t/* Keep the request alive until we're done */\n",
"line_no": 13
},
{
"char_end": 679,
"char_start": 678,
"line": "\n",
"line_no": 27
},
{
"char_end": 717,
"char_start": 679,
"line": "\tspin_lock_irqsave(&io->lock, flags);\n",
"line_no": 28
},
{
"char_end": 731,
"char_start": 717,
"line": "\tio->count--;\n",
"line_no": 29
},
{
"char_end": 748,
"char_start": 731,
"line": "\tif (!io->count)\n",
"line_no": 30
},
{
"char_end": 775,
"char_start": 748,
"line": "\t\tcomplete(&io->complete);\n",
"line_no": 31
},
{
"char_end": 818,
"char_start": 775,
"line": "\tspin_unlock_irqrestore(&io->lock, flags);\n",
"line_no": 32
}
],
"deleted": [
{
"char_end": 144,
"char_start": 125,
"line": "\tif (io->status) {\n",
"line_no": 7
}
]
},
"vul_type": "cwe-416"
} | 556 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"void ip4_datagram_release_cb(struct sock *sk)\n{\n\tconst struct inet_sock *inet = inet_sk(sk);\n\tconst struct ip_options_rcu *inet_opt;\n\t__be32 daddr = inet->inet_daddr;",
"",
"\tstruct flowi4 fl4;\n\tstruct rtable *rt;\n",
"\tif (! __sk_dst_get(sk) || __sk_dst_check(sk, 0))",
"\t\treturn;",
"\n\trcu... | [
1,
0,
1,
0,
1,
0,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 199,
"char_start": 175,
"chars": "dst_entry *dst;\n\tstruct "
},
{
"char_end": 246,
"char_start": 233,
"chars": "rcu_read_lock"
},
{
"char_end": 257,
"char_start": 247,
"chars": ");\n\n\tdst ="
},
{
"char_end": 285,
"char_start": 274,
"chars": ";\n\tif (!dst"
},
{
"char_end": 291,
"char_start": 289,
"chars": "!d"
},
{
"char_end": 307,
"char_start": 292,
"chars": "t->obsolete || "
},
{
"char_end": 317,
"char_start": 310,
"chars": "->ops->"
},
{
"char_end": 324,
"char_start": 323,
"chars": "d"
},
{
"char_end": 326,
"char_start": 325,
"chars": "t"
},
{
"char_end": 333,
"char_start": 331,
"chars": " {"
},
{
"char_end": 347,
"char_start": 345,
"chars": "un"
},
{
"char_end": 367,
"char_start": 354,
"chars": "\n\t\treturn;\n\t}"
},
{
"char_end": 673,
"char_start": 672,
"chars": "\n"
},
{
"char_end": 677,
"char_start": 674,
"chars": "dst"
},
{
"char_end": 680,
"char_start": 678,
"chars": "= "
},
{
"char_end": 710,
"char_start": 691,
"chars": " ? &rt->dst : NULL;"
},
{
"char_end": 733,
"char_start": 732,
"chars": "\n"
}
],
"deleted": [
{
"char_end": 212,
"char_start": 209,
"chars": "if "
},
{
"char_end": 214,
"char_start": 213,
"chars": "!"
},
{
"char_end": 237,
"char_start": 235,
"chars": "__"
},
{
"char_end": 240,
"char_start": 238,
"chars": "k_"
},
{
"char_end": 244,
"char_start": 243,
"chars": "_"
},
{
"char_end": 252,
"char_start": 251,
"chars": "k"
},
{
"char_end": 269,
"char_start": 259,
"chars": "\treturn;\n\n"
},
{
"char_end": 594,
"char_start": 592,
"chars": "if"
},
{
"char_end": 596,
"char_start": 595,
"chars": "("
},
{
"char_end": 608,
"char_start": 607,
"chars": ")"
},
{
"char_end": 613,
"char_start": 610,
"chars": "\t__"
},
{
"char_end": 633,
"char_start": 628,
"chars": "&rt->"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/9709674e68646cee5a24e3000b3558d25412203a",
"file_name": "net/ipv4/datagram.c",
"func_name": "ip4_datagram_release_cb",
"line_changes": {
"added": [
{
"char_end": 191,
"char_start": 167,
"line": "\tstruct dst_entry *dst;\n",
"line_no": 6
},
{
"char_end": 251,
"char_start": 250,
"line": "\n",
"line_no": 11
},
{
"char_end": 276,
"char_start": 251,
"line": "\tdst = __sk_dst_get(sk);\n",
"line_no": 12
},
{
"char_end": 334,
"char_start": 276,
"line": "\tif (!dst || !dst->obsolete || dst->ops->check(dst, 0)) {\n",
"line_no": 13
},
{
"char_end": 355,
"char_start": 334,
"line": "\t\trcu_read_unlock();\n",
"line_no": 14
},
{
"char_end": 365,
"char_start": 355,
"line": "\t\treturn;\n",
"line_no": 15
},
{
"char_end": 368,
"char_start": 365,
"line": "\t}\n",
"line_no": 16
},
{
"char_end": 673,
"char_start": 672,
"line": "\n",
"line_no": 24
},
{
"char_end": 711,
"char_start": 673,
"line": "\tdst = !IS_ERR(rt) ? &rt->dst : NULL;\n",
"line_no": 25
},
{
"char_end": 733,
"char_start": 711,
"line": "\tsk_dst_set(sk, dst);\n",
"line_no": 26
},
{
"char_end": 734,
"char_start": 733,
"line": "\n",
"line_no": 27
}
],
"deleted": [
{
"char_end": 258,
"char_start": 208,
"line": "\tif (! __sk_dst_get(sk) || __sk_dst_check(sk, 0))\n",
"line_no": 9
},
{
"char_end": 268,
"char_start": 258,
"line": "\t\treturn;\n",
"line_no": 10
},
{
"char_end": 269,
"char_start": 268,
"line": "\n",
"line_no": 11
},
{
"char_end": 609,
"char_start": 591,
"line": "\tif (!IS_ERR(rt))\n",
"line_no": 20
},
{
"char_end": 639,
"char_start": 609,
"line": "\t\t__sk_dst_set(sk, &rt->dst);\n",
"line_no": 21
}
]
},
"vul_type": "cwe-416"
} | 557 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"void ip4_datagram_release_cb(struct sock *sk)\n{\n\tconst struct inet_sock *inet = inet_sk(sk);\n\tconst struct ip_options_rcu *inet_opt;\n\t__be32 daddr = inet->inet_daddr;",
"\tstruct dst_entry *dst;",
"\tstruct flowi4 fl4;\n\tstruct rtable *rt;\n",
"\trcu_read_lock();",
"\tdst = __sk_dst_get(sk);\n\tif ... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 199,
"char_start": 175,
"chars": "dst_entry *dst;\n\tstruct "
},
{
"char_end": 246,
"char_start": 233,
"chars": "rcu_read_lock"
},
{
"char_end": 257,
"char_start": 247,
"chars": ");\n\n\tdst ="
},
{
"char_end": 285,
"char_start": 274,
"chars": ";\n\tif (!dst"
},
{
"char_end": 291,
"char_start": 289,
"chars": "!d"
},
{
"char_end": 307,
"char_start": 292,
"chars": "t->obsolete || "
},
{
"char_end": 317,
"char_start": 310,
"chars": "->ops->"
},
{
"char_end": 324,
"char_start": 323,
"chars": "d"
},
{
"char_end": 326,
"char_start": 325,
"chars": "t"
},
{
"char_end": 333,
"char_start": 331,
"chars": " {"
},
{
"char_end": 347,
"char_start": 345,
"chars": "un"
},
{
"char_end": 367,
"char_start": 354,
"chars": "\n\t\treturn;\n\t}"
},
{
"char_end": 673,
"char_start": 672,
"chars": "\n"
},
{
"char_end": 677,
"char_start": 674,
"chars": "dst"
},
{
"char_end": 680,
"char_start": 678,
"chars": "= "
},
{
"char_end": 710,
"char_start": 691,
"chars": " ? &rt->dst : NULL;"
},
{
"char_end": 733,
"char_start": 732,
"chars": "\n"
}
],
"deleted": [
{
"char_end": 212,
"char_start": 209,
"chars": "if "
},
{
"char_end": 214,
"char_start": 213,
"chars": "!"
},
{
"char_end": 237,
"char_start": 235,
"chars": "__"
},
{
"char_end": 240,
"char_start": 238,
"chars": "k_"
},
{
"char_end": 244,
"char_start": 243,
"chars": "_"
},
{
"char_end": 252,
"char_start": 251,
"chars": "k"
},
{
"char_end": 269,
"char_start": 259,
"chars": "\treturn;\n\n"
},
{
"char_end": 594,
"char_start": 592,
"chars": "if"
},
{
"char_end": 596,
"char_start": 595,
"chars": "("
},
{
"char_end": 608,
"char_start": 607,
"chars": ")"
},
{
"char_end": 613,
"char_start": 610,
"chars": "\t__"
},
{
"char_end": 633,
"char_start": 628,
"chars": "&rt->"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/9709674e68646cee5a24e3000b3558d25412203a",
"file_name": "net/ipv4/datagram.c",
"func_name": "ip4_datagram_release_cb",
"line_changes": {
"added": [
{
"char_end": 191,
"char_start": 167,
"line": "\tstruct dst_entry *dst;\n",
"line_no": 6
},
{
"char_end": 251,
"char_start": 250,
"line": "\n",
"line_no": 11
},
{
"char_end": 276,
"char_start": 251,
"line": "\tdst = __sk_dst_get(sk);\n",
"line_no": 12
},
{
"char_end": 334,
"char_start": 276,
"line": "\tif (!dst || !dst->obsolete || dst->ops->check(dst, 0)) {\n",
"line_no": 13
},
{
"char_end": 355,
"char_start": 334,
"line": "\t\trcu_read_unlock();\n",
"line_no": 14
},
{
"char_end": 365,
"char_start": 355,
"line": "\t\treturn;\n",
"line_no": 15
},
{
"char_end": 368,
"char_start": 365,
"line": "\t}\n",
"line_no": 16
},
{
"char_end": 673,
"char_start": 672,
"line": "\n",
"line_no": 24
},
{
"char_end": 711,
"char_start": 673,
"line": "\tdst = !IS_ERR(rt) ? &rt->dst : NULL;\n",
"line_no": 25
},
{
"char_end": 733,
"char_start": 711,
"line": "\tsk_dst_set(sk, dst);\n",
"line_no": 26
},
{
"char_end": 734,
"char_start": 733,
"line": "\n",
"line_no": 27
}
],
"deleted": [
{
"char_end": 258,
"char_start": 208,
"line": "\tif (! __sk_dst_get(sk) || __sk_dst_check(sk, 0))\n",
"line_no": 9
},
{
"char_end": 268,
"char_start": 258,
"line": "\t\treturn;\n",
"line_no": 10
},
{
"char_end": 269,
"char_start": 268,
"line": "\n",
"line_no": 11
},
{
"char_end": 609,
"char_start": 591,
"line": "\tif (!IS_ERR(rt))\n",
"line_no": 20
},
{
"char_end": 639,
"char_start": 609,
"line": "\t\t__sk_dst_set(sk, &rt->dst);\n",
"line_no": 21
}
]
},
"vul_type": "cwe-416"
} | 557 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"mark_context_stack(mrb_state *mrb, struct mrb_context *c)\n{\n size_t i;\n size_t e;",
"",
"\n if (c->stack == NULL) return;\n e = c->stack - c->stbase;\n if (c->ci) e += c->ci->nregs;\n if (c->stbase + e > c->stend) e = c->stend - c->stbase;\n for (i=0; i<e; i++) {\n mrb_value v = c->stbase[i];",
... | [
1,
0,
1,
1,
0,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 101,
"char_start": 84,
"chars": " mrb_value nil;\n"
},
{
"char_end": 357,
"char_start": 346,
"chars": "mrb_gc_mark"
},
{
"char_end": 363,
"char_start": 358,
"chars": "mrb, "
},
{
"char_end": 382,
"char_start": 379,
"chars": ");\n"
},
{
"char_end": 384,
"char_start": 383,
"chars": " "
},
{
"char_end": 387,
"char_start": 386,
"chars": "}"
},
{
"char_end": 392,
"char_start": 390,
"chars": "}\n"
},
{
"char_end": 395,
"char_start": 394,
"chars": "e"
},
{
"char_end": 397,
"char_start": 396,
"chars": "="
},
{
"char_end": 406,
"char_start": 398,
"chars": "c->stend"
},
{
"char_end": 408,
"char_start": 407,
"chars": "-"
},
{
"char_end": 423,
"char_start": 418,
"chars": ";\n n"
},
{
"char_end": 425,
"char_start": 424,
"chars": "l"
},
{
"char_end": 450,
"char_start": 447,
"chars": "for"
},
{
"char_end": 453,
"char_start": 451,
"chars": "(;"
},
{
"char_end": 458,
"char_start": 454,
"chars": "i<e;"
},
{
"char_end": 463,
"char_start": 459,
"chars": "i++)"
},
{
"char_end": 475,
"char_start": 471,
"chars": "->st"
},
{
"char_end": 480,
"char_start": 478,
"chars": "e["
},
{
"char_end": 482,
"char_start": 481,
"chars": "]"
},
{
"char_end": 484,
"char_start": 483,
"chars": "="
},
{
"char_end": 489,
"char_start": 485,
"chars": "nil;"
}
],
"deleted": [
{
"char_end": 331,
"char_start": 329,
"chars": "if"
},
{
"char_end": 333,
"char_start": 332,
"chars": "("
},
{
"char_end": 353,
"char_start": 349,
"chars": "->tt"
},
{
"char_end": 356,
"char_start": 354,
"chars": "=="
},
{
"char_end": 369,
"char_start": 357,
"chars": "MRB_TT_FREE)"
},
{
"char_end": 371,
"char_start": 370,
"chars": "{"
},
{
"char_end": 390,
"char_start": 389,
"chars": "["
},
{
"char_end": 392,
"char_start": 391,
"chars": "]"
},
{
"char_end": 424,
"char_start": 414,
"chars": " }\n "
},
{
"char_end": 430,
"char_start": 427,
"chars": "lse"
},
{
"char_end": 436,
"char_start": 433,
"chars": " "
},
{
"char_end": 446,
"char_start": 440,
"chars": " mrb_g"
},
{
"char_end": 462,
"char_start": 447,
"chars": "_mark(mrb, mrb_"
},
{
"char_end": 477,
"char_start": 466,
"chars": "c_ptr(v));\n"
},
{
"char_end": 485,
"char_start": 478,
"chars": " }\n"
},
{
"char_end": 490,
"char_start": 486,
"chars": " }"
}
]
},
"commit_link": "github.com/mruby/mruby/commit/5c114c91d4ff31859fcd84cf8bf349b737b90d99",
"file_name": "src/gc.c",
"func_name": "mark_context_stack",
"line_changes": {
"added": [
{
"char_end": 101,
"char_start": 84,
"line": " mrb_value nil;\n",
"line_no": 5
},
{
"char_end": 382,
"char_start": 340,
"line": " mrb_gc_mark(mrb, mrb_basic_ptr(v));\n",
"line_no": 15
},
{
"char_end": 420,
"char_start": 392,
"line": " e = c->stend - c->stbase;\n",
"line_no": 18
},
{
"char_end": 445,
"char_start": 420,
"line": " nil = mrb_nil_value();\n",
"line_no": 19
},
{
"char_end": 466,
"char_start": 445,
"line": " for (; i<e; i++) {\n",
"line_no": 20
},
{
"char_end": 490,
"char_start": 466,
"line": " c->stbase[i] = nil;\n",
"line_no": 21
},
{
"char_end": 494,
"char_start": 490,
"line": " }\n",
"line_no": 22
}
],
"deleted": [
{
"char_end": 372,
"char_start": 323,
"line": " if (mrb_basic_ptr(v)->tt == MRB_TT_FREE) {\n",
"line_no": 14
},
{
"char_end": 412,
"char_start": 372,
"line": " c->stbase[i] = mrb_nil_value();\n",
"line_no": 15
},
{
"char_end": 420,
"char_start": 412,
"line": " }\n",
"line_no": 16
},
{
"char_end": 433,
"char_start": 420,
"line": " else {\n",
"line_no": 17
},
{
"char_end": 477,
"char_start": 433,
"line": " mrb_gc_mark(mrb, mrb_basic_ptr(v));\n",
"line_no": 18
},
{
"char_end": 485,
"char_start": 477,
"line": " }\n",
"line_no": 19
}
]
},
"vul_type": "cwe-416"
} | 558 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"mark_context_stack(mrb_state *mrb, struct mrb_context *c)\n{\n size_t i;\n size_t e;",
" mrb_value nil;",
"\n if (c->stack == NULL) return;\n e = c->stack - c->stbase;\n if (c->ci) e += c->ci->nregs;\n if (c->stbase + e > c->stend) e = c->stend - c->stbase;\n for (i=0; i<e; i++) {\n mrb_value v = c-... | [
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 101,
"char_start": 84,
"chars": " mrb_value nil;\n"
},
{
"char_end": 357,
"char_start": 346,
"chars": "mrb_gc_mark"
},
{
"char_end": 363,
"char_start": 358,
"chars": "mrb, "
},
{
"char_end": 382,
"char_start": 379,
"chars": ");\n"
},
{
"char_end": 384,
"char_start": 383,
"chars": " "
},
{
"char_end": 387,
"char_start": 386,
"chars": "}"
},
{
"char_end": 392,
"char_start": 390,
"chars": "}\n"
},
{
"char_end": 395,
"char_start": 394,
"chars": "e"
},
{
"char_end": 397,
"char_start": 396,
"chars": "="
},
{
"char_end": 406,
"char_start": 398,
"chars": "c->stend"
},
{
"char_end": 408,
"char_start": 407,
"chars": "-"
},
{
"char_end": 423,
"char_start": 418,
"chars": ";\n n"
},
{
"char_end": 425,
"char_start": 424,
"chars": "l"
},
{
"char_end": 450,
"char_start": 447,
"chars": "for"
},
{
"char_end": 453,
"char_start": 451,
"chars": "(;"
},
{
"char_end": 458,
"char_start": 454,
"chars": "i<e;"
},
{
"char_end": 463,
"char_start": 459,
"chars": "i++)"
},
{
"char_end": 475,
"char_start": 471,
"chars": "->st"
},
{
"char_end": 480,
"char_start": 478,
"chars": "e["
},
{
"char_end": 482,
"char_start": 481,
"chars": "]"
},
{
"char_end": 484,
"char_start": 483,
"chars": "="
},
{
"char_end": 489,
"char_start": 485,
"chars": "nil;"
}
],
"deleted": [
{
"char_end": 331,
"char_start": 329,
"chars": "if"
},
{
"char_end": 333,
"char_start": 332,
"chars": "("
},
{
"char_end": 353,
"char_start": 349,
"chars": "->tt"
},
{
"char_end": 356,
"char_start": 354,
"chars": "=="
},
{
"char_end": 369,
"char_start": 357,
"chars": "MRB_TT_FREE)"
},
{
"char_end": 371,
"char_start": 370,
"chars": "{"
},
{
"char_end": 390,
"char_start": 389,
"chars": "["
},
{
"char_end": 392,
"char_start": 391,
"chars": "]"
},
{
"char_end": 424,
"char_start": 414,
"chars": " }\n "
},
{
"char_end": 430,
"char_start": 427,
"chars": "lse"
},
{
"char_end": 436,
"char_start": 433,
"chars": " "
},
{
"char_end": 446,
"char_start": 440,
"chars": " mrb_g"
},
{
"char_end": 462,
"char_start": 447,
"chars": "_mark(mrb, mrb_"
},
{
"char_end": 477,
"char_start": 466,
"chars": "c_ptr(v));\n"
},
{
"char_end": 485,
"char_start": 478,
"chars": " }\n"
},
{
"char_end": 490,
"char_start": 486,
"chars": " }"
}
]
},
"commit_link": "github.com/mruby/mruby/commit/5c114c91d4ff31859fcd84cf8bf349b737b90d99",
"file_name": "src/gc.c",
"func_name": "mark_context_stack",
"line_changes": {
"added": [
{
"char_end": 101,
"char_start": 84,
"line": " mrb_value nil;\n",
"line_no": 5
},
{
"char_end": 382,
"char_start": 340,
"line": " mrb_gc_mark(mrb, mrb_basic_ptr(v));\n",
"line_no": 15
},
{
"char_end": 420,
"char_start": 392,
"line": " e = c->stend - c->stbase;\n",
"line_no": 18
},
{
"char_end": 445,
"char_start": 420,
"line": " nil = mrb_nil_value();\n",
"line_no": 19
},
{
"char_end": 466,
"char_start": 445,
"line": " for (; i<e; i++) {\n",
"line_no": 20
},
{
"char_end": 490,
"char_start": 466,
"line": " c->stbase[i] = nil;\n",
"line_no": 21
},
{
"char_end": 494,
"char_start": 490,
"line": " }\n",
"line_no": 22
}
],
"deleted": [
{
"char_end": 372,
"char_start": 323,
"line": " if (mrb_basic_ptr(v)->tt == MRB_TT_FREE) {\n",
"line_no": 14
},
{
"char_end": 412,
"char_start": 372,
"line": " c->stbase[i] = mrb_nil_value();\n",
"line_no": 15
},
{
"char_end": 420,
"char_start": 412,
"line": " }\n",
"line_no": 16
},
{
"char_end": 433,
"char_start": 420,
"line": " else {\n",
"line_no": 17
},
{
"char_end": 477,
"char_start": 433,
"line": " mrb_gc_mark(mrb, mrb_basic_ptr(v));\n",
"line_no": 18
},
{
"char_end": 485,
"char_start": 477,
"line": " }\n",
"line_no": 19
}
]
},
"vul_type": "cwe-416"
} | 558 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"int shadow_server_start(rdpShadowServer* server)\n{\n\tBOOL ipc;\n\tBOOL status;\n\tWSADATA wsaData;",
"\tif (!server)\n\t\treturn -1;",
"\tif (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0)\n\t\treturn -1;",
"#ifndef _WIN32\n\tsignal(SIGPIPE, SIG_IGN);\n#endif\n\tserver->screen = shadow_screen_new(server);",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
0,
1,
0,
1,
0,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1015,
"char_start": 1015,
"chars": ""
},
{
"char_end": 1077,
"char_start": 1054,
"chars": "\t\t\t\t{\n\t\t\t\t\tfree(list);\n"
},
{
"char_end": 1099,
"char_start": 1093,
"chars": "\t\t\t\t}\n"
},
{
"char_end": 1133,
"char_start": 1112,
"chars": "\t\t\t{\n\t\t\t\tfree(list);\n"
},
{
"char_end": 1152,
"char_start": 1147,
"chars": "\n\t\t\t}"
}
],
"deleted": [
{
"char_end": 999,
"char_start": 984,
"chars": "free(list);\n\t\t\t"
}
]
},
"commit_link": "github.com/FreeRDP/FreeRDP/commit/6d86e20e1e7caaab4f0c7f89e36d32914dbccc52",
"file_name": "server/shadow/shadow_server.c",
"func_name": "shadow_server_start",
"line_changes": {
"added": [
{
"char_end": 1060,
"char_start": 1054,
"line": "\t\t\t\t{\n",
"line_no": 49
},
{
"char_end": 1077,
"char_start": 1060,
"line": "\t\t\t\t\tfree(list);\n",
"line_no": 50
},
{
"char_end": 1099,
"char_start": 1093,
"line": "\t\t\t\t}\n",
"line_no": 52
},
{
"char_end": 1117,
"char_start": 1112,
"line": "\t\t\t{\n",
"line_no": 55
},
{
"char_end": 1133,
"char_start": 1117,
"line": "\t\t\t\tfree(list);\n",
"line_no": 56
},
{
"char_end": 1153,
"char_start": 1148,
"line": "\t\t\t}\n",
"line_no": 58
}
],
"deleted": [
{
"char_end": 996,
"char_start": 981,
"line": "\t\t\tfree(list);\n",
"line_no": 46
}
]
},
"vul_type": "cwe-416"
} | 559 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"int shadow_server_start(rdpShadowServer* server)\n{\n\tBOOL ipc;\n\tBOOL status;\n\tWSADATA wsaData;",
"\tif (!server)\n\t\treturn -1;",
"\tif (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0)\n\t\treturn -1;",
"#ifndef _WIN32\n\tsignal(SIGPIPE, SIG_IGN);\n#endif\n\tserver->screen = shadow_screen_new(server);",
... | [
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": 1015,
"char_start": 1015,
"chars": ""
},
{
"char_end": 1077,
"char_start": 1054,
"chars": "\t\t\t\t{\n\t\t\t\t\tfree(list);\n"
},
{
"char_end": 1099,
"char_start": 1093,
"chars": "\t\t\t\t}\n"
},
{
"char_end": 1133,
"char_start": 1112,
"chars": "\t\t\t{\n\t\t\t\tfree(list);\n"
},
{
"char_end": 1152,
"char_start": 1147,
"chars": "\n\t\t\t}"
}
],
"deleted": [
{
"char_end": 999,
"char_start": 984,
"chars": "free(list);\n\t\t\t"
}
]
},
"commit_link": "github.com/FreeRDP/FreeRDP/commit/6d86e20e1e7caaab4f0c7f89e36d32914dbccc52",
"file_name": "server/shadow/shadow_server.c",
"func_name": "shadow_server_start",
"line_changes": {
"added": [
{
"char_end": 1060,
"char_start": 1054,
"line": "\t\t\t\t{\n",
"line_no": 49
},
{
"char_end": 1077,
"char_start": 1060,
"line": "\t\t\t\t\tfree(list);\n",
"line_no": 50
},
{
"char_end": 1099,
"char_start": 1093,
"line": "\t\t\t\t}\n",
"line_no": 52
},
{
"char_end": 1117,
"char_start": 1112,
"line": "\t\t\t{\n",
"line_no": 55
},
{
"char_end": 1133,
"char_start": 1117,
"line": "\t\t\t\tfree(list);\n",
"line_no": 56
},
{
"char_end": 1153,
"char_start": 1148,
"line": "\t\t\t}\n",
"line_no": 58
}
],
"deleted": [
{
"char_end": 996,
"char_start": 981,
"line": "\t\t\tfree(list);\n",
"line_no": 46
}
]
},
"vul_type": "cwe-416"
} | 559 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"CURLcode Curl_close(struct Curl_easy *data)\n{\n struct Curl_multi *m;",
" if(!data)\n return CURLE_OK;",
" Curl_expire_clear(data); /* shut off timers */",
" m = data->multi;\n if(m)\n /* This handle is still part of a multi handle, take care of this first\n and detach this handle from ther... | [
1,
1,
1,
1,
0,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 377,
"char_start": 375,
"chars": " {"
},
{
"char_end": 562,
"char_start": 529,
"chars": "\n data->multi_easy = NULL;\n }"
}
],
"deleted": []
},
"commit_link": "github.com/curl/curl/commit/81d135d67155c5295b1033679c606165d4e28f3f",
"file_name": "lib/url.c",
"func_name": "Curl_close",
"line_changes": {
"added": [
{
"char_end": 378,
"char_start": 353,
"line": " if(data->multi_easy) {\n",
"line_no": 16
},
{
"char_end": 559,
"char_start": 530,
"line": " data->multi_easy = NULL;\n",
"line_no": 20
},
{
"char_end": 563,
"char_start": 559,
"line": " }\n",
"line_no": 21
}
],
"deleted": [
{
"char_end": 376,
"char_start": 353,
"line": " if(data->multi_easy)\n",
"line_no": 16
}
]
},
"vul_type": "cwe-416"
} | 560 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"CURLcode Curl_close(struct Curl_easy *data)\n{\n struct Curl_multi *m;",
" if(!data)\n return CURLE_OK;",
" Curl_expire_clear(data); /* shut off timers */",
" m = data->multi;\n if(m)\n /* This handle is still part of a multi handle, take care of this first\n and detach this handle from ther... | [
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": 377,
"char_start": 375,
"chars": " {"
},
{
"char_end": 562,
"char_start": 529,
"chars": "\n data->multi_easy = NULL;\n }"
}
],
"deleted": []
},
"commit_link": "github.com/curl/curl/commit/81d135d67155c5295b1033679c606165d4e28f3f",
"file_name": "lib/url.c",
"func_name": "Curl_close",
"line_changes": {
"added": [
{
"char_end": 378,
"char_start": 353,
"line": " if(data->multi_easy) {\n",
"line_no": 16
},
{
"char_end": 559,
"char_start": 530,
"line": " data->multi_easy = NULL;\n",
"line_no": 20
},
{
"char_end": 563,
"char_start": 559,
"line": " }\n",
"line_no": 21
}
],
"deleted": [
{
"char_end": 376,
"char_start": 353,
"line": " if(data->multi_easy)\n",
"line_no": 16
}
]
},
"vul_type": "cwe-416"
} | 560 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"ExprAppendMultiKeysymList(ExprDef *expr, ExprDef *append)\n{\n unsigned nSyms = darray_size(expr->keysym_list.syms);\n unsigned numEntries = darray_size(append->keysym_list.syms);",
" darray_append(expr->keysym_list.symsMapIndex, nSyms);\n darray_append(expr->keysym_list.symsNumEntries, numEntries);\... | [
1,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [],
"deleted": [
{
"char_end": 407,
"char_start": 406,
"chars": "&"
}
]
},
"commit_link": "github.com/xkbcommon/libxkbcommon/commit/c1e5ac16e77a21f87bdf3bc4dea61b037a17dddb",
"file_name": "src/xkbcomp/ast-build.c",
"func_name": "ExprAppendMultiKeysymList",
"line_changes": {
"added": [
{
"char_end": 415,
"char_start": 377,
"line": " FreeStmt((ParseCommon *) append);\n",
"line_no": 10
}
],
"deleted": [
{
"char_end": 416,
"char_start": 377,
"line": " FreeStmt((ParseCommon *) &append);\n",
"line_no": 10
}
]
},
"vul_type": "cwe-416"
} | 561 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"ExprAppendMultiKeysymList(ExprDef *expr, ExprDef *append)\n{\n unsigned nSyms = darray_size(expr->keysym_list.syms);\n unsigned numEntries = darray_size(append->keysym_list.syms);",
" darray_append(expr->keysym_list.symsMapIndex, nSyms);\n darray_append(expr->keysym_list.symsNumEntries, numEntries);\... | [
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [],
"deleted": [
{
"char_end": 407,
"char_start": 406,
"chars": "&"
}
]
},
"commit_link": "github.com/xkbcommon/libxkbcommon/commit/c1e5ac16e77a21f87bdf3bc4dea61b037a17dddb",
"file_name": "src/xkbcomp/ast-build.c",
"func_name": "ExprAppendMultiKeysymList",
"line_changes": {
"added": [
{
"char_end": 415,
"char_start": 377,
"line": " FreeStmt((ParseCommon *) append);\n",
"line_no": 10
}
],
"deleted": [
{
"char_end": 416,
"char_start": 377,
"line": " FreeStmt((ParseCommon *) &append);\n",
"line_no": 10
}
]
},
"vul_type": "cwe-416"
} | 561 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p,\n\tstruct user_namespace *user_ns)\n{\n\tmm->mmap = NULL;\n\tmm->mm_rb = RB_ROOT;\n\tmm->vmacache_seqnum = 0;\n\tatomic_set(&mm->mm_users, 1);\n\tatomic_set(&mm->mm_count, 1);\n\tinit_rwsem(&mm->mmap_sem);\n\tINIT_LIST_HEAD(&mm->mmlist);... | [
1,
0,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 631,
"char_start": 592,
"chars": "RCU_INIT_POINTER(mm->exe_file, NULL);\n\t"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/2b7e8665b4ff51c034c55df3cff76518d1a9ee3a",
"file_name": "kernel/fork.c",
"func_name": "mm_init",
"line_changes": {
"added": [
{
"char_end": 630,
"char_start": 591,
"line": "\tRCU_INIT_POINTER(mm->exe_file, NULL);\n",
"line_no": 22
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 562 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p,\n\tstruct user_namespace *user_ns)\n{\n\tmm->mmap = NULL;\n\tmm->mm_rb = RB_ROOT;\n\tmm->vmacache_seqnum = 0;\n\tatomic_set(&mm->mm_users, 1);\n\tatomic_set(&mm->mm_count, 1);\n\tinit_rwsem(&mm->mmap_sem);\n\tINIT_LIST_HEAD(&mm->mmlist);... | [
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 631,
"char_start": 592,
"chars": "RCU_INIT_POINTER(mm->exe_file, NULL);\n\t"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/2b7e8665b4ff51c034c55df3cff76518d1a9ee3a",
"file_name": "kernel/fork.c",
"func_name": "mm_init",
"line_changes": {
"added": [
{
"char_end": 630,
"char_start": 591,
"line": "\tRCU_INIT_POINTER(mm->exe_file, NULL);\n",
"line_no": 22
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 562 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"PHP_MINIT_FUNCTION(spl_array)\n{\n\tREGISTER_SPL_STD_CLASS_EX(ArrayObject, spl_array_object_new, spl_funcs_ArrayObject);\n\tREGISTER_SPL_IMPLEMENTS(ArrayObject, Aggregate);\n\tREGISTER_SPL_IMPLEMENTS(ArrayObject, ArrayAccess);\n\tREGISTER_SPL_IMPLEMENTS(ArrayObject, Serializable);\n\tREGISTER_SPL_IMPLEMENTS(ArrayO... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
0
] | SVEN | {
"char_changes": {
"added": [],
"deleted": []
},
"commit_link": "github.com/php/php-src/commit/3f627e580acfdaf0595ae3b115b8bec677f203ee?w=1",
"file_name": "ext/spl/spl_array.c",
"func_name": "PHP_MINIT_FUNCTION",
"line_changes": {
"added": [
{
"char_end": 1020,
"char_start": 968,
"line": "\tspl_handler_ArrayObject.get_gc = spl_array_get_gc;\n",
"line_no": 19
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 563 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"PHP_MINIT_FUNCTION(spl_array)\n{\n\tREGISTER_SPL_STD_CLASS_EX(ArrayObject, spl_array_object_new, spl_funcs_ArrayObject);\n\tREGISTER_SPL_IMPLEMENTS(ArrayObject, Aggregate);\n\tREGISTER_SPL_IMPLEMENTS(ArrayObject, ArrayAccess);\n\tREGISTER_SPL_IMPLEMENTS(ArrayObject, Serializable);\n\tREGISTER_SPL_IMPLEMENTS(ArrayO... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [],
"deleted": []
},
"commit_link": "github.com/php/php-src/commit/3f627e580acfdaf0595ae3b115b8bec677f203ee?w=1",
"file_name": "ext/spl/spl_array.c",
"func_name": "PHP_MINIT_FUNCTION",
"line_changes": {
"added": [
{
"char_end": 1020,
"char_start": 968,
"line": "\tspl_handler_ArrayObject.get_gc = spl_array_get_gc;\n",
"line_no": 19
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 563 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static long do_get_mempolicy(int *policy, nodemask_t *nmask,\n\t\t\t unsigned long addr, unsigned long flags)\n{\n\tint err;\n\tstruct mm_struct *mm = current->mm;\n\tstruct vm_area_struct *vma = NULL;\n\tstruct mempolicy *pol = current->mempolicy;",
"\tif (flags &\n\t\t~(unsigned long)(MPOL_F_NODE|MPOL_F_AD... | [
1,
1,
1,
1,
1,
1,
0,
1,
1
] | SVEN | {
"char_changes": {
"added": [],
"deleted": [
{
"char_end": 1744,
"char_start": 1679,
"chars": "if (vma) {\n\t\tup_read(¤t->mm->mmap_sem);\n\t\tvma = NULL;\n\t}\n\n\t"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/73223e4e2e3867ebf033a5a8eb2e5df0158ccc99",
"file_name": "mm/mempolicy.c",
"func_name": "do_get_mempolicy",
"line_changes": {
"added": [],
"deleted": [
{
"char_end": 1690,
"char_start": 1678,
"line": "\tif (vma) {\n",
"line_no": 68
},
{
"char_end": 1725,
"char_start": 1690,
"line": "\t\tup_read(¤t->mm->mmap_sem);\n",
"line_no": 69
},
{
"char_end": 1739,
"char_start": 1725,
"line": "\t\tvma = NULL;\n",
"line_no": 70
},
{
"char_end": 1742,
"char_start": 1739,
"line": "\t}\n",
"line_no": 71
},
{
"char_end": 1743,
"char_start": 1742,
"line": "\n",
"line_no": 72
}
]
},
"vul_type": "cwe-416"
} | 564 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static long do_get_mempolicy(int *policy, nodemask_t *nmask,\n\t\t\t unsigned long addr, unsigned long flags)\n{\n\tint err;\n\tstruct mm_struct *mm = current->mm;\n\tstruct vm_area_struct *vma = NULL;\n\tstruct mempolicy *pol = current->mempolicy;",
"\tif (flags &\n\t\t~(unsigned long)(MPOL_F_NODE|MPOL_F_AD... | [
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [],
"deleted": [
{
"char_end": 1744,
"char_start": 1679,
"chars": "if (vma) {\n\t\tup_read(¤t->mm->mmap_sem);\n\t\tvma = NULL;\n\t}\n\n\t"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/73223e4e2e3867ebf033a5a8eb2e5df0158ccc99",
"file_name": "mm/mempolicy.c",
"func_name": "do_get_mempolicy",
"line_changes": {
"added": [],
"deleted": [
{
"char_end": 1690,
"char_start": 1678,
"line": "\tif (vma) {\n",
"line_no": 68
},
{
"char_end": 1725,
"char_start": 1690,
"line": "\t\tup_read(¤t->mm->mmap_sem);\n",
"line_no": 69
},
{
"char_end": 1739,
"char_start": 1725,
"line": "\t\tvma = NULL;\n",
"line_no": 70
},
{
"char_end": 1742,
"char_start": 1739,
"line": "\t}\n",
"line_no": 71
},
{
"char_end": 1743,
"char_start": 1742,
"line": "\n",
"line_no": 72
}
]
},
"vul_type": "cwe-416"
} | 564 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"*/\nstatic int wddx_stack_destroy(wddx_stack *stack)\n{\n\tregister int i;",
"\tif (stack->elements) {\n\t\tfor (i = 0; i < stack->top; i++) {\n\t\t\tif (((st_entry *)stack->elements[i])->data\n\t\t\t\t\t&& ((st_entry *)stack->elements[i])->type != ST_FIELD)\t{\n\t\t\t\tzval_ptr_dtor(&((st_entry *)stack->element... | [
1,
0
] | SVEN | {
"char_changes": {
"added": [],
"deleted": []
},
"commit_link": "github.com/php/php-src/commit/b88393f08a558eec14964a55d3c680fe67407712?w=1",
"file_name": "ext/wddx/wddx.c",
"func_name": "wddx_stack_destroy",
"line_changes": {
"added": [
{
"char_end": 180,
"char_start": 134,
"line": "\t\t\tif (((st_entry *)stack->elements[i])->data\n",
"line_no": 8
},
{
"char_end": 242,
"char_start": 180,
"line": "\t\t\t\t\t&& ((st_entry *)stack->elements[i])->type != ST_FIELD)\t{\n",
"line_no": 9
}
],
"deleted": [
{
"char_end": 180,
"char_start": 134,
"line": "\t\t\tif (((st_entry *)stack->elements[i])->data)\t{\n",
"line_no": 8
}
]
},
"vul_type": "cwe-416"
} | 565 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"*/\nstatic int wddx_stack_destroy(wddx_stack *stack)\n{\n\tregister int i;",
"\tif (stack->elements) {\n\t\tfor (i = 0; i < stack->top; i++) {\n\t\t\tif (((st_entry *)stack->elements[i])->data\n\t\t\t\t\t&& ((st_entry *)stack->elements[i])->type != ST_FIELD)\t{\n\t\t\t\tzval_ptr_dtor(&((st_entry *)stack->element... | [
1,
1
] | SVEN | {
"char_changes": {
"added": [],
"deleted": []
},
"commit_link": "github.com/php/php-src/commit/b88393f08a558eec14964a55d3c680fe67407712?w=1",
"file_name": "ext/wddx/wddx.c",
"func_name": "wddx_stack_destroy",
"line_changes": {
"added": [
{
"char_end": 180,
"char_start": 134,
"line": "\t\t\tif (((st_entry *)stack->elements[i])->data\n",
"line_no": 8
},
{
"char_end": 242,
"char_start": 180,
"line": "\t\t\t\t\t&& ((st_entry *)stack->elements[i])->type != ST_FIELD)\t{\n",
"line_no": 9
}
],
"deleted": [
{
"char_end": 180,
"char_start": 134,
"line": "\t\t\tif (((st_entry *)stack->elements[i])->data)\t{\n",
"line_no": 8
}
]
},
"vul_type": "cwe-416"
} | 565 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static void regulator_ena_gpio_free(struct regulator_dev *rdev)\n{\n\tstruct regulator_enable_gpio *pin, *n;",
"\tif (!rdev->ena_pin)\n\t\treturn;",
"\t/* Free the GPIO only in case of no use */\n\tlist_for_each_entry_safe(pin, n, ®ulator_ena_gpio_list, list) {\n\t\tif (pin->gpiod == rdev->ena_pin->gpiod) {... | [
1,
1,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 467,
"char_start": 429,
"chars": "\trdev->ena_pin = NULL;\n\t\t\t\treturn;\n\t\t\t"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/60a2362f769cf549dc466134efe71c8bf9fbaaba",
"file_name": "drivers/regulator/core.c",
"func_name": "regulator_ena_gpio_free",
"line_changes": {
"added": [
{
"char_end": 452,
"char_start": 426,
"line": "\t\t\t\trdev->ena_pin = NULL;\n",
"line_no": 16
},
{
"char_end": 464,
"char_start": 452,
"line": "\t\t\t\treturn;\n",
"line_no": 17
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 566 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static void regulator_ena_gpio_free(struct regulator_dev *rdev)\n{\n\tstruct regulator_enable_gpio *pin, *n;",
"\tif (!rdev->ena_pin)\n\t\treturn;",
"\t/* Free the GPIO only in case of no use */\n\tlist_for_each_entry_safe(pin, n, ®ulator_ena_gpio_list, list) {\n\t\tif (pin->gpiod == rdev->ena_pin->gpiod) {... | [
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 467,
"char_start": 429,
"chars": "\trdev->ena_pin = NULL;\n\t\t\t\treturn;\n\t\t\t"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/60a2362f769cf549dc466134efe71c8bf9fbaaba",
"file_name": "drivers/regulator/core.c",
"func_name": "regulator_ena_gpio_free",
"line_changes": {
"added": [
{
"char_end": 452,
"char_start": 426,
"line": "\t\t\t\trdev->ena_pin = NULL;\n",
"line_no": 16
},
{
"char_end": 464,
"char_start": 452,
"line": "\t\t\t\treturn;\n",
"line_no": 17
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 566 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int usb_console_setup(struct console *co, char *options)\n{\n\tstruct usbcons_info *info = &usbcons_info;\n\tint baud = 9600;\n\tint bits = 8;\n\tint parity = 'n';\n\tint doflow = 0;\n\tint cflag = CREAD | HUPCL | CLOCAL;\n\tchar *s;\n\tstruct usb_serial *serial;\n\tstruct usb_serial_port *port;\n\tint retv... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 3131,
"char_start": 3111,
"chars": "info->port = NULL;\n\t"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/299d7572e46f98534033a9e65973f13ad1ce9047",
"file_name": "drivers/usb/serial/console.c",
"func_name": "usb_console_setup",
"line_changes": {
"added": [
{
"char_end": 3130,
"char_start": 3110,
"line": "\tinfo->port = NULL;\n",
"line_no": 132
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 567 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int usb_console_setup(struct console *co, char *options)\n{\n\tstruct usbcons_info *info = &usbcons_info;\n\tint baud = 9600;\n\tint bits = 8;\n\tint parity = 'n';\n\tint doflow = 0;\n\tint cflag = CREAD | HUPCL | CLOCAL;\n\tchar *s;\n\tstruct usb_serial *serial;\n\tstruct usb_serial_port *port;\n\tint retv... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 3131,
"char_start": 3111,
"chars": "info->port = NULL;\n\t"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/299d7572e46f98534033a9e65973f13ad1ce9047",
"file_name": "drivers/usb/serial/console.c",
"func_name": "usb_console_setup",
"line_changes": {
"added": [
{
"char_end": 3130,
"char_start": 3110,
"line": "\tinfo->port = NULL;\n",
"line_no": 132
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 567 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int ipxitf_ioctl(unsigned int cmd, void __user *arg)\n{\n\tint rc = -EINVAL;\n\tstruct ifreq ifr;\n\tint val;",
"\tswitch (cmd) {\n\tcase SIOCSIFADDR: {\n\t\tstruct sockaddr_ipx *sipx;\n\t\tstruct ipx_interface_definition f;",
"\t\trc = -EFAULT;\n\t\tif (copy_from_user(&ifr, arg, sizeof(ifr)))\n\t\t\tbr... | [
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
0,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1340,
"char_start": 1339,
"chars": "0"
},
{
"char_end": 1401,
"char_start": 1390,
"chars": "c = -EFAULT"
}
],
"deleted": [
{
"char_end": 1346,
"char_start": 1339,
"chars": "-EFAULT"
},
{
"char_end": 1396,
"char_start": 1395,
"chars": "b"
},
{
"char_end": 1400,
"char_start": 1397,
"chars": "eak"
},
{
"char_end": 1431,
"char_start": 1421,
"chars": ";\n\t\trc = 0"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/ee0d8d8482345ff97a75a7d747efc309f13b0d80",
"file_name": "net/ipx/af_ipx.c",
"func_name": "ipxitf_ioctl",
"line_changes": {
"added": [
{
"char_end": 1342,
"char_start": 1332,
"line": "\t\trc = 0;\n",
"line_no": 55
},
{
"char_end": 1403,
"char_start": 1386,
"line": "\t\t\trc = -EFAULT;\n",
"line_no": 57
}
],
"deleted": [
{
"char_end": 1348,
"char_start": 1332,
"line": "\t\trc = -EFAULT;\n",
"line_no": 55
},
{
"char_end": 1402,
"char_start": 1392,
"line": "\t\t\tbreak;\n",
"line_no": 57
},
{
"char_end": 1433,
"char_start": 1423,
"line": "\t\trc = 0;\n",
"line_no": 59
}
]
},
"vul_type": "cwe-416"
} | 568 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int ipxitf_ioctl(unsigned int cmd, void __user *arg)\n{\n\tint rc = -EINVAL;\n\tstruct ifreq ifr;\n\tint val;",
"\tswitch (cmd) {\n\tcase SIOCSIFADDR: {\n\t\tstruct sockaddr_ipx *sipx;\n\t\tstruct ipx_interface_definition f;",
"\t\trc = -EFAULT;\n\t\tif (copy_from_user(&ifr, arg, sizeof(ifr)))\n\t\t\tbr... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1340,
"char_start": 1339,
"chars": "0"
},
{
"char_end": 1401,
"char_start": 1390,
"chars": "c = -EFAULT"
}
],
"deleted": [
{
"char_end": 1346,
"char_start": 1339,
"chars": "-EFAULT"
},
{
"char_end": 1396,
"char_start": 1395,
"chars": "b"
},
{
"char_end": 1400,
"char_start": 1397,
"chars": "eak"
},
{
"char_end": 1431,
"char_start": 1421,
"chars": ";\n\t\trc = 0"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/ee0d8d8482345ff97a75a7d747efc309f13b0d80",
"file_name": "net/ipx/af_ipx.c",
"func_name": "ipxitf_ioctl",
"line_changes": {
"added": [
{
"char_end": 1342,
"char_start": 1332,
"line": "\t\trc = 0;\n",
"line_no": 55
},
{
"char_end": 1403,
"char_start": 1386,
"line": "\t\t\trc = -EFAULT;\n",
"line_no": 57
}
],
"deleted": [
{
"char_end": 1348,
"char_start": 1332,
"line": "\t\trc = -EFAULT;\n",
"line_no": 55
},
{
"char_end": 1402,
"char_start": 1392,
"line": "\t\t\tbreak;\n",
"line_no": 57
},
{
"char_end": 1433,
"char_start": 1423,
"line": "\t\trc = 0;\n",
"line_no": 59
}
]
},
"vul_type": "cwe-416"
} | 568 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static PHP_MINIT_FUNCTION(zip)\n{\n#ifdef PHP_ZIP_USE_OO\n\tzend_class_entry ce;",
"\tmemcpy(&zip_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));\n\tzip_object_handlers.clone_obj\t\t= NULL;\n\tzip_object_handlers.get_property_ptr_ptr = php_zip_get_property_ptr_ptr;",
"\tzip_obje... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0
] | SVEN | {
"char_changes": {
"added": [],
"deleted": []
},
"commit_link": "github.com/php/php-src/commit/f6aef68089221c5ea047d4a74224ee3deead99a6?w=1",
"file_name": "ext/zip/php_zip.c",
"func_name": "PHP_MINIT_FUNCTION",
"line_changes": {
"added": [
{
"char_end": 341,
"char_start": 286,
"line": "\tzip_object_handlers.get_gc = php_zip_get_gc;\n",
"line_no": 10
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 569 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static PHP_MINIT_FUNCTION(zip)\n{\n#ifdef PHP_ZIP_USE_OO\n\tzend_class_entry ce;",
"\tmemcpy(&zip_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));\n\tzip_object_handlers.clone_obj\t\t= NULL;\n\tzip_object_handlers.get_property_ptr_ptr = php_zip_get_property_ptr_ptr;",
"\tzip_obje... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [],
"deleted": []
},
"commit_link": "github.com/php/php-src/commit/f6aef68089221c5ea047d4a74224ee3deead99a6?w=1",
"file_name": "ext/zip/php_zip.c",
"func_name": "PHP_MINIT_FUNCTION",
"line_changes": {
"added": [
{
"char_end": 341,
"char_start": 286,
"line": "\tzip_object_handlers.get_gc = php_zip_get_gc;\n",
"line_no": 10
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 569 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int get_task_ioprio(struct task_struct *p)\n{\n\tint ret;",
"\tret = security_task_getioprio(p);\n\tif (ret)\n\t\tgoto out;\n\tret = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, IOPRIO_NORM);",
"",
"\tif (p->io_context)\n\t\tret = p->io_context->ioprio;",
"",
"out:\n\treturn ret;\n}"
] | [
1,
1,
0,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 194,
"char_start": 179,
"chars": "task_lock(p);\n\t"
},
{
"char_end": 259,
"char_start": 242,
"chars": ";\n\ttask_unlock(p)"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/8ba8682107ee2ca3347354e018865d8e1967c5f4",
"file_name": "block/ioprio.c",
"func_name": "get_task_ioprio",
"line_changes": {
"added": [
{
"char_end": 193,
"char_start": 178,
"line": "\ttask_lock(p);\n",
"line_no": 9
},
{
"char_end": 261,
"char_start": 244,
"line": "\ttask_unlock(p);\n",
"line_no": 12
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 570 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int get_task_ioprio(struct task_struct *p)\n{\n\tint ret;",
"\tret = security_task_getioprio(p);\n\tif (ret)\n\t\tgoto out;\n\tret = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, IOPRIO_NORM);",
"\ttask_lock(p);",
"\tif (p->io_context)\n\t\tret = p->io_context->ioprio;",
"\ttask_unlock(p);",
"out:\n\tretur... | [
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 194,
"char_start": 179,
"chars": "task_lock(p);\n\t"
},
{
"char_end": 259,
"char_start": 242,
"chars": ";\n\ttask_unlock(p)"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/8ba8682107ee2ca3347354e018865d8e1967c5f4",
"file_name": "block/ioprio.c",
"func_name": "get_task_ioprio",
"line_changes": {
"added": [
{
"char_end": 193,
"char_start": 178,
"line": "\ttask_lock(p);\n",
"line_no": 9
},
{
"char_end": 261,
"char_start": 244,
"line": "\ttask_unlock(p);\n",
"line_no": 12
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 570 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"MagickExport MagickBooleanType SetImageType(Image *image,const ImageType type)\n{\n const char\n *artifact;",
" ImageInfo\n *image_info;",
" MagickBooleanType\n status;",
" QuantizeInfo\n *quantize_info;",
" assert(image != (Image *) NULL);\n if (image->debug != MagickFalse)\n (void) L... | [
1,
1,
1,
1,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1144,
"char_start": 1133,
"chars": "status=Acqu"
},
{
"char_end": 1148,
"char_start": 1145,
"chars": "reI"
},
{
"char_end": 1153,
"char_start": 1152,
"chars": "C"
},
{
"char_end": 1167,
"char_start": 1157,
"chars": "map(image,"
},
{
"char_end": 1169,
"char_start": 1168,
"chars": ")"
}
],
"deleted": [
{
"char_end": 1141,
"char_start": 1138,
"chars": "->c"
},
{
"char_end": 1147,
"char_start": 1145,
"chars": "s="
}
]
},
"commit_link": "github.com/ImageMagick/ImageMagick/commit/d63a3c5729df59f183e9e110d5d8385d17caaad0",
"file_name": "magick/attribute.c",
"func_name": "SetImageType",
"line_changes": {
"added": [
{
"char_end": 1171,
"char_start": 1127,
"line": " status=AcquireImageColormap(image,2);\n",
"line_no": 39
}
],
"deleted": [
{
"char_end": 1150,
"char_start": 1127,
"line": " image->colors=2;\n",
"line_no": 39
}
]
},
"vul_type": "cwe-416"
} | 571 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"MagickExport MagickBooleanType SetImageType(Image *image,const ImageType type)\n{\n const char\n *artifact;",
" ImageInfo\n *image_info;",
" MagickBooleanType\n status;",
" QuantizeInfo\n *quantize_info;",
" assert(image != (Image *) NULL);\n if (image->debug != MagickFalse)\n (void) L... | [
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1144,
"char_start": 1133,
"chars": "status=Acqu"
},
{
"char_end": 1148,
"char_start": 1145,
"chars": "reI"
},
{
"char_end": 1153,
"char_start": 1152,
"chars": "C"
},
{
"char_end": 1167,
"char_start": 1157,
"chars": "map(image,"
},
{
"char_end": 1169,
"char_start": 1168,
"chars": ")"
}
],
"deleted": [
{
"char_end": 1141,
"char_start": 1138,
"chars": "->c"
},
{
"char_end": 1147,
"char_start": 1145,
"chars": "s="
}
]
},
"commit_link": "github.com/ImageMagick/ImageMagick/commit/d63a3c5729df59f183e9e110d5d8385d17caaad0",
"file_name": "magick/attribute.c",
"func_name": "SetImageType",
"line_changes": {
"added": [
{
"char_end": 1171,
"char_start": 1127,
"line": " status=AcquireImageColormap(image,2);\n",
"line_no": 39
}
],
"deleted": [
{
"char_end": 1150,
"char_start": 1127,
"line": " image->colors=2;\n",
"line_no": 39
}
]
},
"vul_type": "cwe-416"
} | 571 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"updateDevice(const struct header * headers, time_t t)\n{\n\tstruct device ** pp = &devlist;\n\tstruct device * p = *pp;\t/* = devlist; */\n\twhile(p)\n\t{\n\t\tif( p->headers[HEADER_NT].l == headers[HEADER_NT].l\n\t\t && (0==memcmp(p->headers[HEADER_NT].p, headers[HEADER_NT].p, headers[HEADER_NT].l))\n\t\t && p... | [
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 976,
"char_start": 925,
"chars": "*pp = p->next;\t/* remove \"p\" from the list */\n\t\t\t\t\t"
}
],
"deleted": []
},
"commit_link": "github.com/miniupnp/miniupnp/commit/cd506a67e174a45c6a202eff182a712955ed6d6f",
"file_name": "minissdpd/minissdpd.c",
"func_name": "updateDevice",
"line_changes": {
"added": [
{
"char_end": 971,
"char_start": 920,
"line": "\t\t\t\t\t*pp = p->next;\t/* remove \"p\" from the list */\n",
"line_no": 24
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 572 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"updateDevice(const struct header * headers, time_t t)\n{\n\tstruct device ** pp = &devlist;\n\tstruct device * p = *pp;\t/* = devlist; */\n\twhile(p)\n\t{\n\t\tif( p->headers[HEADER_NT].l == headers[HEADER_NT].l\n\t\t && (0==memcmp(p->headers[HEADER_NT].p, headers[HEADER_NT].p, headers[HEADER_NT].l))\n\t\t && p... | [
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 976,
"char_start": 925,
"chars": "*pp = p->next;\t/* remove \"p\" from the list */\n\t\t\t\t\t"
}
],
"deleted": []
},
"commit_link": "github.com/miniupnp/miniupnp/commit/cd506a67e174a45c6a202eff182a712955ed6d6f",
"file_name": "minissdpd/minissdpd.c",
"func_name": "updateDevice",
"line_changes": {
"added": [
{
"char_end": 971,
"char_start": 920,
"line": "\t\t\t\t\t*pp = p->next;\t/* remove \"p\" from the list */\n",
"line_no": 24
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 572 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int kvm_ioctl_create_device(struct kvm *kvm,\n\t\t\t\t struct kvm_create_device *cd)\n{\n\tstruct kvm_device_ops *ops = NULL;\n\tstruct kvm_device *dev;\n\tbool test = cd->flags & KVM_CREATE_DEVICE_TEST;\n\tint ret;",
"\tif (cd->type >= ARRAY_SIZE(kvm_device_ops_table))\n\t\treturn -ENODEV;",
"\tops =... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 922,
"char_start": 901,
"chars": ");\n\t\tops->destroy(dev"
}
],
"deleted": [
{
"char_end": 846,
"char_start": 825,
"chars": "ops->destroy(dev);\n\t\t"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/a0f1d21c1ccb1da66629627a74059dd7f5ac9c61",
"file_name": "virt/kvm/kvm_main.c",
"func_name": "kvm_ioctl_create_device",
"line_changes": {
"added": [
{
"char_end": 925,
"char_start": 904,
"line": "\t\tops->destroy(dev);\n",
"line_no": 44
}
],
"deleted": [
{
"char_end": 844,
"char_start": 823,
"line": "\t\tops->destroy(dev);\n",
"line_no": 41
}
]
},
"vul_type": "cwe-416"
} | 573 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int kvm_ioctl_create_device(struct kvm *kvm,\n\t\t\t\t struct kvm_create_device *cd)\n{\n\tstruct kvm_device_ops *ops = NULL;\n\tstruct kvm_device *dev;\n\tbool test = cd->flags & KVM_CREATE_DEVICE_TEST;\n\tint ret;",
"\tif (cd->type >= ARRAY_SIZE(kvm_device_ops_table))\n\t\treturn -ENODEV;",
"\tops =... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 922,
"char_start": 901,
"chars": ");\n\t\tops->destroy(dev"
}
],
"deleted": [
{
"char_end": 846,
"char_start": 825,
"chars": "ops->destroy(dev);\n\t\t"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/a0f1d21c1ccb1da66629627a74059dd7f5ac9c61",
"file_name": "virt/kvm/kvm_main.c",
"func_name": "kvm_ioctl_create_device",
"line_changes": {
"added": [
{
"char_end": 925,
"char_start": 904,
"line": "\t\tops->destroy(dev);\n",
"line_no": 44
}
],
"deleted": [
{
"char_end": 844,
"char_start": 823,
"line": "\t\tops->destroy(dev);\n",
"line_no": 41
}
]
},
"vul_type": "cwe-416"
} | 573 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"SMB2_read(const unsigned int xid, struct cifs_io_parms *io_parms,\n\t unsigned int *nbytes, char **buf, int *buf_type)\n{\n\tstruct smb_rqst rqst;\n\tint resp_buftype, rc = -EACCES;\n\tstruct smb2_read_plain_req *req = NULL;\n\tstruct smb2_read_rsp *rsp = NULL;\n\tstruct kvec iov[1];\n\tstruct kvec rsp_iov;\n\tun... | [
1,
1,
1,
1,
1,
1,
0,
1,
1,
0,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1528,
"char_start": 1497,
"chars": ");\n\n\tcifs_small_buf_release(req"
}
],
"deleted": [
{
"char_end": 834,
"char_start": 803,
"chars": "cifs_small_buf_release(req);\n\n\t"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/088aaf17aa79300cab14dbee2569c58cfafd7d6e",
"file_name": "fs/cifs/smb2pdu.c",
"func_name": "SMB2_read",
"line_changes": {
"added": [
{
"char_end": 1531,
"char_start": 1501,
"line": "\tcifs_small_buf_release(req);\n",
"line_no": 51
},
{
"char_end": 1532,
"char_start": 1531,
"line": "\n",
"line_no": 52
}
],
"deleted": [
{
"char_end": 832,
"char_start": 802,
"line": "\tcifs_small_buf_release(req);\n",
"line_no": 30
},
{
"char_end": 833,
"char_start": 832,
"line": "\n",
"line_no": 31
}
]
},
"vul_type": "cwe-416"
} | 574 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"SMB2_read(const unsigned int xid, struct cifs_io_parms *io_parms,\n\t unsigned int *nbytes, char **buf, int *buf_type)\n{\n\tstruct smb_rqst rqst;\n\tint resp_buftype, rc = -EACCES;\n\tstruct smb2_read_plain_req *req = NULL;\n\tstruct smb2_read_rsp *rsp = NULL;\n\tstruct kvec iov[1];\n\tstruct kvec rsp_iov;\n\tun... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1528,
"char_start": 1497,
"chars": ");\n\n\tcifs_small_buf_release(req"
}
],
"deleted": [
{
"char_end": 834,
"char_start": 803,
"chars": "cifs_small_buf_release(req);\n\n\t"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/088aaf17aa79300cab14dbee2569c58cfafd7d6e",
"file_name": "fs/cifs/smb2pdu.c",
"func_name": "SMB2_read",
"line_changes": {
"added": [
{
"char_end": 1531,
"char_start": 1501,
"line": "\tcifs_small_buf_release(req);\n",
"line_no": 51
},
{
"char_end": 1532,
"char_start": 1531,
"line": "\n",
"line_no": 52
}
],
"deleted": [
{
"char_end": 832,
"char_start": 802,
"line": "\tcifs_small_buf_release(req);\n",
"line_no": 30
},
{
"char_end": 833,
"char_start": 832,
"line": "\n",
"line_no": 31
}
]
},
"vul_type": "cwe-416"
} | 574 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"archive_read_format_rar_read_data(struct archive_read *a, const void **buff,\n size_t *size, int64_t *offset)\n{\n struct rar *rar = (struct rar *)(a->format->data);\n int ret;",
" if (rar->has_encrypted_entries == ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW) {\n\t rar->has_encr... | [
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1123,
"char_start": 1121,
"chars": " {"
},
{
"char_end": 1226,
"char_start": 1188,
"chars": "\n rar->start_new_table = 1;\n }"
}
],
"deleted": []
},
"commit_link": "github.com/libarchive/libarchive/commit/b8592ecba2f9e451e1f5cb7ab6dcee8b8e7b3f60",
"file_name": "libarchive/archive_read_support_format_rar.c",
"func_name": "archive_read_format_rar_read_data",
"line_changes": {
"added": [
{
"char_end": 1124,
"char_start": 1072,
"line": " if (ret != ARCHIVE_OK && ret != ARCHIVE_WARN) {\n",
"line_no": 38
},
{
"char_end": 1221,
"char_start": 1189,
"line": " rar->start_new_table = 1;\n",
"line_no": 40
},
{
"char_end": 1227,
"char_start": 1221,
"line": " }\n",
"line_no": 41
}
],
"deleted": [
{
"char_end": 1122,
"char_start": 1072,
"line": " if (ret != ARCHIVE_OK && ret != ARCHIVE_WARN)\n",
"line_no": 38
}
]
},
"vul_type": "cwe-416"
} | 575 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"archive_read_format_rar_read_data(struct archive_read *a, const void **buff,\n size_t *size, int64_t *offset)\n{\n struct rar *rar = (struct rar *)(a->format->data);\n int ret;",
" if (rar->has_encrypted_entries == ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW) {\n\t rar->has_encr... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1123,
"char_start": 1121,
"chars": " {"
},
{
"char_end": 1226,
"char_start": 1188,
"chars": "\n rar->start_new_table = 1;\n }"
}
],
"deleted": []
},
"commit_link": "github.com/libarchive/libarchive/commit/b8592ecba2f9e451e1f5cb7ab6dcee8b8e7b3f60",
"file_name": "libarchive/archive_read_support_format_rar.c",
"func_name": "archive_read_format_rar_read_data",
"line_changes": {
"added": [
{
"char_end": 1124,
"char_start": 1072,
"line": " if (ret != ARCHIVE_OK && ret != ARCHIVE_WARN) {\n",
"line_no": 38
},
{
"char_end": 1221,
"char_start": 1189,
"line": " rar->start_new_table = 1;\n",
"line_no": 40
},
{
"char_end": 1227,
"char_start": 1221,
"line": " }\n",
"line_no": 41
}
],
"deleted": [
{
"char_end": 1122,
"char_start": 1072,
"line": " if (ret != ARCHIVE_OK && ret != ARCHIVE_WARN)\n",
"line_no": 38
}
]
},
"vul_type": "cwe-416"
} | 575 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"R_API void r_anal_bb_free(RAnalBlock *bb) {\n\tif (!bb) {\n\t\treturn;\n\t}\n\tr_anal_cond_free (bb->cond);\n\tR_FREE (bb->fingerprint);\n\tr_anal_diff_free (bb->diff);\n\tbb->diff = NULL;\n\tR_FREE (bb->op_bytes);\n\tr_anal_switch_op_free (bb->switch_op);\n\tbb->switch_op = NULL;\n\tbb->fingerprint = NULL;\n\tbb-... | [
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 755,
"char_start": 687,
"chars": "if (bb->next) {\n\t\t// avoid double free\n\t\tbb->next->prev = NULL;\n\t}\n\t"
},
{
"char_end": 782,
"char_start": 767,
"chars": " // double free"
}
],
"deleted": []
},
"commit_link": "github.com/radare/radare2/commit/90b71c017a7fa9732fe45fd21b245ee051b1f548",
"file_name": "libr/anal/bb.c",
"func_name": "r_anal_bb_free",
"line_changes": {
"added": [
{
"char_end": 703,
"char_start": 686,
"line": "\tif (bb->next) {\n",
"line_no": 34
},
{
"char_end": 751,
"char_start": 726,
"line": "\t\tbb->next->prev = NULL;\n",
"line_no": 36
},
{
"char_end": 754,
"char_start": 751,
"line": "\t}\n",
"line_no": 37
},
{
"char_end": 783,
"char_start": 754,
"line": "\tR_FREE (bb); // double free\n",
"line_no": 38
}
],
"deleted": [
{
"char_end": 700,
"char_start": 686,
"line": "\tR_FREE (bb);\n",
"line_no": 34
}
]
},
"vul_type": "cwe-416"
} | 576 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"R_API void r_anal_bb_free(RAnalBlock *bb) {\n\tif (!bb) {\n\t\treturn;\n\t}\n\tr_anal_cond_free (bb->cond);\n\tR_FREE (bb->fingerprint);\n\tr_anal_diff_free (bb->diff);\n\tbb->diff = NULL;\n\tR_FREE (bb->op_bytes);\n\tr_anal_switch_op_free (bb->switch_op);\n\tbb->switch_op = NULL;\n\tbb->fingerprint = NULL;\n\tbb-... | [
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 755,
"char_start": 687,
"chars": "if (bb->next) {\n\t\t// avoid double free\n\t\tbb->next->prev = NULL;\n\t}\n\t"
},
{
"char_end": 782,
"char_start": 767,
"chars": " // double free"
}
],
"deleted": []
},
"commit_link": "github.com/radare/radare2/commit/90b71c017a7fa9732fe45fd21b245ee051b1f548",
"file_name": "libr/anal/bb.c",
"func_name": "r_anal_bb_free",
"line_changes": {
"added": [
{
"char_end": 703,
"char_start": 686,
"line": "\tif (bb->next) {\n",
"line_no": 34
},
{
"char_end": 751,
"char_start": 726,
"line": "\t\tbb->next->prev = NULL;\n",
"line_no": 36
},
{
"char_end": 754,
"char_start": 751,
"line": "\t}\n",
"line_no": 37
},
{
"char_end": 783,
"char_start": 754,
"line": "\tR_FREE (bb); // double free\n",
"line_no": 38
}
],
"deleted": [
{
"char_end": 700,
"char_start": 686,
"line": "\tR_FREE (bb);\n",
"line_no": 34
}
]
},
"vul_type": "cwe-416"
} | 576 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int hci_uart_set_proto(struct hci_uart *hu, int id)\n{\n\tconst struct hci_uart_proto *p;\n\tint err;",
"\tp = hci_uart_get_proto(id);\n\tif (!p)\n\t\treturn -EPROTONOSUPPORT;",
"\thu->proto = p;",
"\tset_bit(HCI_UART_PROTO_READY, &hu->flags);",
"\n\terr = hci_uart_register_dev(hu);\n\tif (err) {",
... | [
1,
1,
1,
0,
1,
0,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 237,
"char_start": 236,
"chars": "r"
},
{
"char_end": 245,
"char_start": 238,
"chars": "turn er"
},
{
"char_end": 256,
"char_start": 246,
"chars": ";\n\t}\n\n\tset"
}
],
"deleted": [
{
"char_end": 231,
"char_start": 187,
"chars": "\tset_bit(HCI_UART_PROTO_READY, &hu->flags);\n"
},
{
"char_end": 282,
"char_start": 280,
"chars": "cl"
},
{
"char_end": 284,
"char_start": 283,
"chars": "a"
},
{
"char_end": 342,
"char_start": 324,
"chars": "\n\t\treturn err;\n\t}\n"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/56897b217a1d0a91c9920cb418d6b3fe922f590a",
"file_name": "drivers/bluetooth/hci_ldisc.c",
"func_name": "hci_uart_set_proto",
"line_changes": {
"added": [
{
"char_end": 296,
"char_start": 252,
"line": "\tset_bit(HCI_UART_PROTO_READY, &hu->flags);\n",
"line_no": 17
}
],
"deleted": [
{
"char_end": 231,
"char_start": 187,
"line": "\tset_bit(HCI_UART_PROTO_READY, &hu->flags);\n",
"line_no": 11
},
{
"char_end": 325,
"char_start": 278,
"line": "\t\tclear_bit(HCI_UART_PROTO_READY, &hu->flags);\n",
"line_no": 15
}
]
},
"vul_type": "cwe-416"
} | 577 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int hci_uart_set_proto(struct hci_uart *hu, int id)\n{\n\tconst struct hci_uart_proto *p;\n\tint err;",
"\tp = hci_uart_get_proto(id);\n\tif (!p)\n\t\treturn -EPROTONOSUPPORT;",
"\thu->proto = p;",
"",
"\n\terr = hci_uart_register_dev(hu);\n\tif (err) {",
"",
"\t\treturn err;\n\t}\n",
"\tset_b... | [
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 237,
"char_start": 236,
"chars": "r"
},
{
"char_end": 245,
"char_start": 238,
"chars": "turn er"
},
{
"char_end": 256,
"char_start": 246,
"chars": ";\n\t}\n\n\tset"
}
],
"deleted": [
{
"char_end": 231,
"char_start": 187,
"chars": "\tset_bit(HCI_UART_PROTO_READY, &hu->flags);\n"
},
{
"char_end": 282,
"char_start": 280,
"chars": "cl"
},
{
"char_end": 284,
"char_start": 283,
"chars": "a"
},
{
"char_end": 342,
"char_start": 324,
"chars": "\n\t\treturn err;\n\t}\n"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/56897b217a1d0a91c9920cb418d6b3fe922f590a",
"file_name": "drivers/bluetooth/hci_ldisc.c",
"func_name": "hci_uart_set_proto",
"line_changes": {
"added": [
{
"char_end": 296,
"char_start": 252,
"line": "\tset_bit(HCI_UART_PROTO_READY, &hu->flags);\n",
"line_no": 17
}
],
"deleted": [
{
"char_end": 231,
"char_start": 187,
"line": "\tset_bit(HCI_UART_PROTO_READY, &hu->flags);\n",
"line_no": 11
},
{
"char_end": 325,
"char_start": 278,
"line": "\t\tclear_bit(HCI_UART_PROTO_READY, &hu->flags);\n",
"line_no": 15
}
]
},
"vul_type": "cwe-416"
} | 577 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int rm_read_multi(AVFormatContext *s, AVIOContext *pb,\n AVStream *st, char *mime)\n{\n int number_of_streams = avio_rb16(pb);\n int number_of_mdpr;\n int i, ret;\n unsigned size2;\n for (i = 0; i<number_of_streams; i++)\n avio_rb16(pb);\n number_of_mdpr = av... | [
1,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1246,
"char_start": 1242,
"chars": "NULL"
}
],
"deleted": [
{
"char_end": 1246,
"char_start": 1242,
"chars": "mime"
}
]
},
"commit_link": "github.com/FFmpeg/FFmpeg/commit/a7e032a277452366771951e29fd0bf2bd5c029f0",
"file_name": "libavformat/rmdec.c",
"func_name": "rm_read_multi",
"line_changes": {
"added": [
{
"char_end": 1249,
"char_start": 1195,
"line": " size2, NULL);\n",
"line_no": 35
}
],
"deleted": [
{
"char_end": 1249,
"char_start": 1195,
"line": " size2, mime);\n",
"line_no": 35
}
]
},
"vul_type": "cwe-416"
} | 578 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int rm_read_multi(AVFormatContext *s, AVIOContext *pb,\n AVStream *st, char *mime)\n{\n int number_of_streams = avio_rb16(pb);\n int number_of_mdpr;\n int i, ret;\n unsigned size2;\n for (i = 0; i<number_of_streams; i++)\n avio_rb16(pb);\n number_of_mdpr = av... | [
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1246,
"char_start": 1242,
"chars": "NULL"
}
],
"deleted": [
{
"char_end": 1246,
"char_start": 1242,
"chars": "mime"
}
]
},
"commit_link": "github.com/FFmpeg/FFmpeg/commit/a7e032a277452366771951e29fd0bf2bd5c029f0",
"file_name": "libavformat/rmdec.c",
"func_name": "rm_read_multi",
"line_changes": {
"added": [
{
"char_end": 1249,
"char_start": 1195,
"line": " size2, NULL);\n",
"line_no": 35
}
],
"deleted": [
{
"char_end": 1249,
"char_start": 1195,
"line": " size2, mime);\n",
"line_no": 35
}
]
},
"vul_type": "cwe-416"
} | 578 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"Error HeifContext::interpret_heif_file()\n{\n m_all_images.clear();\n m_top_level_images.clear();\n m_primary_image.reset();",
"\n // --- reference all non-hidden images",
" std::vector<heif_item_id> image_IDs = m_heif_file->get_item_IDs();",
" bool primary_is_grid = false;\n for (heif_item_id id : im... | [
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,
0,
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": 4777,
"char_start": 4520,
"chars": "master_iter == m_all_images.end()) {\n return Error(heif_error_Invalid_input,\n heif_suberror_Nonexisting_item_referenced,\n \"Non-existing alpha image referenced\");\n }\n if ("
}
],
"deleted": []
},
"commit_link": "github.com/strukturag/libheif/commit/995a4283d8ed2d0d2c1ceb1a577b993df2f0e014",
"file_name": "libheif/heif_context.cc",
"func_name": "HeifContext::interpret_heif_file",
"line_changes": {
"added": [
{
"char_end": 4557,
"char_start": 4504,
"line": " if (master_iter == m_all_images.end()) {\n",
"line_no": 134
},
{
"char_end": 4610,
"char_start": 4557,
"line": " return Error(heif_error_Invalid_input,\n",
"line_no": 135
},
{
"char_end": 4680,
"char_start": 4610,
"line": " heif_suberror_Nonexisting_item_referenced,\n",
"line_no": 136
},
{
"char_end": 4747,
"char_start": 4680,
"line": " \"Non-existing alpha image referenced\");\n",
"line_no": 137
},
{
"char_end": 4761,
"char_start": 4747,
"line": " }\n",
"line_no": 138
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 579 | cwe-416 | cc |
Determine whether the {function_name} code is vulnerable or not. | [
"Error HeifContext::interpret_heif_file()\n{\n m_all_images.clear();\n m_top_level_images.clear();\n m_primary_image.reset();",
"\n // --- reference all non-hidden images",
" std::vector<heif_item_id> image_IDs = m_heif_file->get_item_IDs();",
" bool primary_is_grid = false;\n for (heif_item_id id : im... | [
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": 4777,
"char_start": 4520,
"chars": "master_iter == m_all_images.end()) {\n return Error(heif_error_Invalid_input,\n heif_suberror_Nonexisting_item_referenced,\n \"Non-existing alpha image referenced\");\n }\n if ("
}
],
"deleted": []
},
"commit_link": "github.com/strukturag/libheif/commit/995a4283d8ed2d0d2c1ceb1a577b993df2f0e014",
"file_name": "libheif/heif_context.cc",
"func_name": "HeifContext::interpret_heif_file",
"line_changes": {
"added": [
{
"char_end": 4557,
"char_start": 4504,
"line": " if (master_iter == m_all_images.end()) {\n",
"line_no": 134
},
{
"char_end": 4610,
"char_start": 4557,
"line": " return Error(heif_error_Invalid_input,\n",
"line_no": 135
},
{
"char_end": 4680,
"char_start": 4610,
"line": " heif_suberror_Nonexisting_item_referenced,\n",
"line_no": 136
},
{
"char_end": 4747,
"char_start": 4680,
"line": " \"Non-existing alpha image referenced\");\n",
"line_no": 137
},
{
"char_end": 4761,
"char_start": 4747,
"line": " }\n",
"line_no": 138
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 579 | cwe-416 | cc |
Determine whether the {function_name} code is vulnerable or not. | [
"PlayerGeneric::~PlayerGeneric()\n{",
"\tif (mixer)\n\t\tdelete mixer;",
"\n\tif (player)\n\t{",
"\t\tif (mixer->isActive() && !mixer->isDeviceRemoved(player))",
"\t\t\tmixer->removeDevice(player);\n\t\tdelete player;\n\t}",
"",
"\n\tdelete[] audioDriverName;\n\t\n\tdelete listener;\n}"
] | [
1,
0,
1,
0,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 66,
"char_start": 57,
"chars": "mixer && "
},
{
"char_end": 201,
"char_start": 171,
"chars": "\n\t\n\tif (mixer)\n\t\tdelete mixer;"
}
],
"deleted": [
{
"char_end": 62,
"char_start": 34,
"chars": "\tif (mixer)\n\t\tdelete mixer;\n"
}
]
},
"commit_link": "github.com/milkytracker/MilkyTracker/commit/7afd55c42ad80d01a339197a2d8b5461d214edaf",
"file_name": "src/milkyplay/PlayerGeneric.cpp",
"func_name": "PlayerGeneric::~PlayerGeneric",
"line_changes": {
"added": [
{
"char_end": 120,
"char_start": 51,
"line": "\t\tif (mixer && mixer->isActive() && !mixer->isDeviceRemoved(player))\n",
"line_no": 6
},
{
"char_end": 174,
"char_start": 172,
"line": "\t\n",
"line_no": 10
},
{
"char_end": 186,
"char_start": 174,
"line": "\tif (mixer)\n",
"line_no": 11
},
{
"char_end": 202,
"char_start": 186,
"line": "\t\tdelete mixer;\n",
"line_no": 12
}
],
"deleted": [
{
"char_end": 46,
"char_start": 34,
"line": "\tif (mixer)\n",
"line_no": 3
},
{
"char_end": 62,
"char_start": 46,
"line": "\t\tdelete mixer;\n",
"line_no": 4
},
{
"char_end": 139,
"char_start": 79,
"line": "\t\tif (mixer->isActive() && !mixer->isDeviceRemoved(player))\n",
"line_no": 8
}
]
},
"vul_type": "cwe-416"
} | 580 | cwe-416 | cpp |
Determine whether the {function_name} code is vulnerable or not. | [
"PlayerGeneric::~PlayerGeneric()\n{",
"",
"\n\tif (player)\n\t{",
"\t\tif (mixer && mixer->isActive() && !mixer->isDeviceRemoved(player))",
"\t\t\tmixer->removeDevice(player);\n\t\tdelete player;\n\t}",
"\t\n\tif (mixer)\n\t\tdelete mixer;",
"\n\tdelete[] audioDriverName;\n\t\n\tdelete listener;\n}"
] | [
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 66,
"char_start": 57,
"chars": "mixer && "
},
{
"char_end": 201,
"char_start": 171,
"chars": "\n\t\n\tif (mixer)\n\t\tdelete mixer;"
}
],
"deleted": [
{
"char_end": 62,
"char_start": 34,
"chars": "\tif (mixer)\n\t\tdelete mixer;\n"
}
]
},
"commit_link": "github.com/milkytracker/MilkyTracker/commit/7afd55c42ad80d01a339197a2d8b5461d214edaf",
"file_name": "src/milkyplay/PlayerGeneric.cpp",
"func_name": "PlayerGeneric::~PlayerGeneric",
"line_changes": {
"added": [
{
"char_end": 120,
"char_start": 51,
"line": "\t\tif (mixer && mixer->isActive() && !mixer->isDeviceRemoved(player))\n",
"line_no": 6
},
{
"char_end": 174,
"char_start": 172,
"line": "\t\n",
"line_no": 10
},
{
"char_end": 186,
"char_start": 174,
"line": "\tif (mixer)\n",
"line_no": 11
},
{
"char_end": 202,
"char_start": 186,
"line": "\t\tdelete mixer;\n",
"line_no": 12
}
],
"deleted": [
{
"char_end": 46,
"char_start": 34,
"line": "\tif (mixer)\n",
"line_no": 3
},
{
"char_end": 62,
"char_start": 46,
"line": "\t\tdelete mixer;\n",
"line_no": 4
},
{
"char_end": 139,
"char_start": 79,
"line": "\t\tif (mixer->isActive() && !mixer->isDeviceRemoved(player))\n",
"line_no": 8
}
]
},
"vul_type": "cwe-416"
} | 580 | cwe-416 | cpp |
Determine whether the {function_name} code is vulnerable or not. | [
"vips_foreign_load_gif_scan_image( VipsForeignLoadGif *gif ) \n{\n\tVipsObjectClass *class = VIPS_OBJECT_GET_CLASS( gif );\n\tGifFileType *file = gif->file;",
"\tColorMapObject *map = file->Image.ColorMap ?\n\t\tfile->Image.ColorMap : file->SColorMap;",
"",
"",
"\tGifByteType *extension;",
"\tif( DGifGetI... | [
1,
0,
1,
0,
1,
1,
1,
1,
0,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 152,
"char_start": 151,
"chars": "\n"
},
{
"char_end": 893,
"char_start": 823,
"chars": "\n\tmap = file->Image.ColorMap ? file->Image.ColorMap : file->SColorMap;"
}
],
"deleted": [
{
"char_end": 237,
"char_start": 171,
"chars": " = file->Image.ColorMap ?\n\t\tfile->Image.ColorMap : file->SColorMap"
},
{
"char_end": 239,
"char_start": 238,
"chars": "\n"
}
]
},
"commit_link": "github.com/libvips/libvips/commit/ce684dd008532ea0bf9d4a1d89bacb35f4a83f4d",
"file_name": "libvips/foreign/gifload.c",
"func_name": "vips_foreign_load_gif_scan_image",
"line_changes": {
"added": [
{
"char_end": 174,
"char_start": 152,
"line": "\tColorMapObject *map;\n",
"line_no": 6
},
{
"char_end": 894,
"char_start": 824,
"line": "\tmap = file->Image.ColorMap ? file->Image.ColorMap : file->SColorMap;\n",
"line_no": 31
}
],
"deleted": [
{
"char_end": 197,
"char_start": 151,
"line": "\tColorMapObject *map = file->Image.ColorMap ?\n",
"line_no": 5
},
{
"char_end": 239,
"char_start": 197,
"line": "\t\tfile->Image.ColorMap : file->SColorMap;\n",
"line_no": 6
}
]
},
"vul_type": "cwe-416"
} | 581 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"vips_foreign_load_gif_scan_image( VipsForeignLoadGif *gif ) \n{\n\tVipsObjectClass *class = VIPS_OBJECT_GET_CLASS( gif );\n\tGifFileType *file = gif->file;",
"",
"",
"\tColorMapObject *map;",
"\tGifByteType *extension;",
"\tif( DGifGetImageDesc( gif->file ) == GIF_ERROR ) {\n\t\tvips_foreign_load_gif_err... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 152,
"char_start": 151,
"chars": "\n"
},
{
"char_end": 893,
"char_start": 823,
"chars": "\n\tmap = file->Image.ColorMap ? file->Image.ColorMap : file->SColorMap;"
}
],
"deleted": [
{
"char_end": 237,
"char_start": 171,
"chars": " = file->Image.ColorMap ?\n\t\tfile->Image.ColorMap : file->SColorMap"
},
{
"char_end": 239,
"char_start": 238,
"chars": "\n"
}
]
},
"commit_link": "github.com/libvips/libvips/commit/ce684dd008532ea0bf9d4a1d89bacb35f4a83f4d",
"file_name": "libvips/foreign/gifload.c",
"func_name": "vips_foreign_load_gif_scan_image",
"line_changes": {
"added": [
{
"char_end": 174,
"char_start": 152,
"line": "\tColorMapObject *map;\n",
"line_no": 6
},
{
"char_end": 894,
"char_start": 824,
"line": "\tmap = file->Image.ColorMap ? file->Image.ColorMap : file->SColorMap;\n",
"line_no": 31
}
],
"deleted": [
{
"char_end": 197,
"char_start": 151,
"line": "\tColorMapObject *map = file->Image.ColorMap ?\n",
"line_no": 5
},
{
"char_end": 239,
"char_start": 197,
"line": "\t\tfile->Image.ColorMap : file->SColorMap;\n",
"line_no": 6
}
]
},
"vul_type": "cwe-416"
} | 581 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception)\n{\n Image *image, *image2=NULL,\n *rotated_image;\n register Quantum *q;",
" unsigned int status;\n MATHeader MATLAB_HDR;\n size_t size;\n size_t CellType;\n QuantumInfo *quantum_info;\n ImageInfo *clone_info;\n int i;\n... | [
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,
0,
1,
1,
1,
0,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 17218,
"char_start": 17154,
"chars": ";\n if (tmp == image2)\n image2=(Image *) NULL"
}
],
"deleted": [
{
"char_end": 16916,
"char_start": 16853,
"chars": "if (clone_info)\n clone_info=DestroyImageInfo(clone_info);\n "
}
]
},
"commit_link": "github.com/ImageMagick/ImageMagick/commit/04178de2247e353fc095846784b9a10fefdbf890",
"file_name": "coders/mat.c",
"func_name": "ReadMATImage",
"line_changes": {
"added": [
{
"char_end": 17185,
"char_start": 17156,
"line": " if (tmp == image2)\n",
"line_no": 506
},
{
"char_end": 17220,
"char_start": 17185,
"line": " image2=(Image *) NULL;\n",
"line_no": 507
}
],
"deleted": [
{
"char_end": 16869,
"char_start": 16851,
"line": " if (clone_info)\n",
"line_no": 489
},
{
"char_end": 16914,
"char_start": 16869,
"line": " clone_info=DestroyImageInfo(clone_info);\n",
"line_no": 490
}
]
},
"vul_type": "cwe-416"
} | 582 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception)\n{\n Image *image, *image2=NULL,\n *rotated_image;\n register Quantum *q;",
" unsigned int status;\n MATHeader MATLAB_HDR;\n size_t size;\n size_t CellType;\n QuantumInfo *quantum_info;\n ImageInfo *clone_info;\n int i;\n... | [
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": 17218,
"char_start": 17154,
"chars": ";\n if (tmp == image2)\n image2=(Image *) NULL"
}
],
"deleted": [
{
"char_end": 16916,
"char_start": 16853,
"chars": "if (clone_info)\n clone_info=DestroyImageInfo(clone_info);\n "
}
]
},
"commit_link": "github.com/ImageMagick/ImageMagick/commit/04178de2247e353fc095846784b9a10fefdbf890",
"file_name": "coders/mat.c",
"func_name": "ReadMATImage",
"line_changes": {
"added": [
{
"char_end": 17185,
"char_start": 17156,
"line": " if (tmp == image2)\n",
"line_no": 506
},
{
"char_end": 17220,
"char_start": 17185,
"line": " image2=(Image *) NULL;\n",
"line_no": 507
}
],
"deleted": [
{
"char_end": 16869,
"char_start": 16851,
"line": " if (clone_info)\n",
"line_no": 489
},
{
"char_end": 16914,
"char_start": 16869,
"line": " clone_info=DestroyImageInfo(clone_info);\n",
"line_no": 490
}
]
},
"vul_type": "cwe-416"
} | 582 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static OPJ_BOOL opj_j2k_write_mco( opj_j2k_t *p_j2k,\n struct opj_stream_private *p_stream,\n struct opj_event_mgr * p_manager\n )\n{\n OPJ_BYTE * l_current_data = 00;\n ... | [
1,
1,
1,
0,
1,
1,
0,
1,
1,
1,
1,
0,
1,
0,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 637,
"char_start": 636,
"chars": "\t"
},
{
"char_end": 1657,
"char_start": 1577,
"chars": " l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data;\n\n"
}
],
"deleted": [
{
"char_end": 715,
"char_start": 636,
"chars": " l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data;\n"
},
{
"char_end": 2077,
"char_start": 2073,
"chars": " "
},
{
"char_end": 2261,
"char_start": 2260,
"chars": "\n"
}
]
},
"commit_link": "github.com/uclouvain/openjpeg/commit/940100c28ae28931722290794889cf84a92c5f6f",
"file_name": "src/lib/openjp2/j2k.c",
"func_name": "opj_j2k_write_mco",
"line_changes": {
"added": [
{
"char_end": 638,
"char_start": 636,
"line": "\t\n",
"line_no": 18
},
{
"char_end": 1656,
"char_start": 1577,
"line": " l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data;\n",
"line_no": 33
},
{
"char_end": 1657,
"char_start": 1656,
"line": "\n",
"line_no": 34
},
{
"char_end": 2113,
"char_start": 2063,
"line": " for (i=0;i<l_tcp->m_nb_mcc_records;++i) {\n",
"line_no": 46
}
],
"deleted": [
{
"char_end": 715,
"char_start": 636,
"line": " l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data;\n",
"line_no": 18
},
{
"char_end": 716,
"char_start": 715,
"line": "\n",
"line_no": 19
},
{
"char_end": 2115,
"char_start": 2061,
"line": " for (i=0;i<l_tcp->m_nb_mcc_records;++i) {\n",
"line_no": 45
},
{
"char_end": 2262,
"char_start": 2261,
"line": "\n",
"line_no": 48
}
]
},
"vul_type": "cwe-416"
} | 583 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static OPJ_BOOL opj_j2k_write_mco( opj_j2k_t *p_j2k,\n struct opj_stream_private *p_stream,\n struct opj_event_mgr * p_manager\n )\n{\n OPJ_BYTE * l_current_data = 00;\n ... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 637,
"char_start": 636,
"chars": "\t"
},
{
"char_end": 1657,
"char_start": 1577,
"chars": " l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data;\n\n"
}
],
"deleted": [
{
"char_end": 715,
"char_start": 636,
"chars": " l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data;\n"
},
{
"char_end": 2077,
"char_start": 2073,
"chars": " "
},
{
"char_end": 2261,
"char_start": 2260,
"chars": "\n"
}
]
},
"commit_link": "github.com/uclouvain/openjpeg/commit/940100c28ae28931722290794889cf84a92c5f6f",
"file_name": "src/lib/openjp2/j2k.c",
"func_name": "opj_j2k_write_mco",
"line_changes": {
"added": [
{
"char_end": 638,
"char_start": 636,
"line": "\t\n",
"line_no": 18
},
{
"char_end": 1656,
"char_start": 1577,
"line": " l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data;\n",
"line_no": 33
},
{
"char_end": 1657,
"char_start": 1656,
"line": "\n",
"line_no": 34
},
{
"char_end": 2113,
"char_start": 2063,
"line": " for (i=0;i<l_tcp->m_nb_mcc_records;++i) {\n",
"line_no": 46
}
],
"deleted": [
{
"char_end": 715,
"char_start": 636,
"line": " l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data;\n",
"line_no": 18
},
{
"char_end": 716,
"char_start": 715,
"line": "\n",
"line_no": 19
},
{
"char_end": 2115,
"char_start": 2061,
"line": " for (i=0;i<l_tcp->m_nb_mcc_records;++i) {\n",
"line_no": 45
},
{
"char_end": 2262,
"char_start": 2261,
"line": "\n",
"line_no": 48
}
]
},
"vul_type": "cwe-416"
} | 583 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"tcpmss_mangle_packet(struct sk_buff *skb,\n\t\t const struct xt_action_param *par,\n\t\t unsigned int family,\n\t\t unsigned int tcphoff,\n\t\t unsigned int minlen)\n{\n\tconst struct xt_tcpmss_info *info = par->targinfo;\n\tstruct tcphdr *tcph;\n\tint len, tcp_hdrlen;\n\tunsigned int i;\n\t__be16 ... | [
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 701,
"char_start": 663,
"chars": " || tcp_hdrlen < sizeof(struct tcphdr)"
},
{
"char_end": 2010,
"char_start": 1920,
"chars": ")\n\t\treturn 0;\n\n\t/* tcph->doff has 4 bits, do not wrap it to 0 */\n\tif (tcp_hdrlen >= 15 * 4"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/2638fd0f92d4397884fd991d8f4925cb3f081901",
"file_name": "net/netfilter/xt_TCPMSS.c",
"func_name": "tcpmss_mangle_packet",
"line_changes": {
"added": [
{
"char_end": 703,
"char_start": 642,
"line": "\tif (len < tcp_hdrlen || tcp_hdrlen < sizeof(struct tcphdr))\n",
"line_no": 29
},
{
"char_end": 1985,
"char_start": 1935,
"line": "\t/* tcph->doff has 4 bits, do not wrap it to 0 */\n",
"line_no": 77
},
{
"char_end": 2012,
"char_start": 1985,
"line": "\tif (tcp_hdrlen >= 15 * 4)\n",
"line_no": 78
},
{
"char_end": 2024,
"char_start": 2012,
"line": "\t\treturn 0;\n",
"line_no": 79
},
{
"char_end": 2025,
"char_start": 2024,
"line": "\n",
"line_no": 80
}
],
"deleted": [
{
"char_end": 665,
"char_start": 642,
"line": "\tif (len < tcp_hdrlen)\n",
"line_no": 29
}
]
},
"vul_type": "cwe-416"
} | 584 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"tcpmss_mangle_packet(struct sk_buff *skb,\n\t\t const struct xt_action_param *par,\n\t\t unsigned int family,\n\t\t unsigned int tcphoff,\n\t\t unsigned int minlen)\n{\n\tconst struct xt_tcpmss_info *info = par->targinfo;\n\tstruct tcphdr *tcph;\n\tint len, tcp_hdrlen;\n\tunsigned int i;\n\t__be16 ... | [
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": 701,
"char_start": 663,
"chars": " || tcp_hdrlen < sizeof(struct tcphdr)"
},
{
"char_end": 2010,
"char_start": 1920,
"chars": ")\n\t\treturn 0;\n\n\t/* tcph->doff has 4 bits, do not wrap it to 0 */\n\tif (tcp_hdrlen >= 15 * 4"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/2638fd0f92d4397884fd991d8f4925cb3f081901",
"file_name": "net/netfilter/xt_TCPMSS.c",
"func_name": "tcpmss_mangle_packet",
"line_changes": {
"added": [
{
"char_end": 703,
"char_start": 642,
"line": "\tif (len < tcp_hdrlen || tcp_hdrlen < sizeof(struct tcphdr))\n",
"line_no": 29
},
{
"char_end": 1985,
"char_start": 1935,
"line": "\t/* tcph->doff has 4 bits, do not wrap it to 0 */\n",
"line_no": 77
},
{
"char_end": 2012,
"char_start": 1985,
"line": "\tif (tcp_hdrlen >= 15 * 4)\n",
"line_no": 78
},
{
"char_end": 2024,
"char_start": 2012,
"line": "\t\treturn 0;\n",
"line_no": 79
},
{
"char_end": 2025,
"char_start": 2024,
"line": "\n",
"line_no": 80
}
],
"deleted": [
{
"char_end": 665,
"char_start": 642,
"line": "\tif (len < tcp_hdrlen)\n",
"line_no": 29
}
]
},
"vul_type": "cwe-416"
} | 584 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"void luaD_shrinkstack (lua_State *L) {\n int inuse = stackinuse(L);",
" int goodsize = inuse + (inuse / 8) + 2*EXTRA_STACK;",
" if (goodsize > LUAI_MAXSTACK)\n goodsize = LUAI_MAXSTACK; /* respect stack limit */\n /* if thread is currently not handling a stack overflow and its\n good size is smalle... | [
1,
0,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 94,
"char_start": 93,
"chars": "B"
},
{
"char_end": 98,
"char_start": 95,
"chars": "SIC"
},
{
"char_end": 109,
"char_start": 104,
"chars": "_SIZE"
}
],
"deleted": [
{
"char_end": 113,
"char_start": 93,
"chars": "(inuse / 8) + 2*EXTR"
},
{
"char_end": 395,
"char_start": 389,
"chars": "\n "
}
]
},
"commit_link": "github.com/lua/lua/commit/6298903e35217ab69c279056f925fb72900ce0b7",
"file_name": "ldo.c",
"func_name": "luaD_shrinkstack",
"line_changes": {
"added": [
{
"char_end": 111,
"char_start": 68,
"line": " int goodsize = inuse + BASIC_STACK_SIZE;\n",
"line_no": 3
},
{
"char_end": 404,
"char_start": 331,
"line": " if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) && goodsize < L->stacksize)\n",
"line_no": 8
}
],
"deleted": [
{
"char_end": 122,
"char_start": 68,
"line": " int goodsize = inuse + (inuse / 8) + 2*EXTRA_STACK;\n",
"line_no": 3
},
{
"char_end": 390,
"char_start": 342,
"line": " if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) &&\n",
"line_no": 8
},
{
"char_end": 421,
"char_start": 390,
"line": " goodsize < L->stacksize)\n",
"line_no": 9
}
]
},
"vul_type": "cwe-416"
} | 585 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"void luaD_shrinkstack (lua_State *L) {\n int inuse = stackinuse(L);",
" int goodsize = inuse + BASIC_STACK_SIZE;",
" if (goodsize > LUAI_MAXSTACK)\n goodsize = LUAI_MAXSTACK; /* respect stack limit */\n /* if thread is currently not handling a stack overflow and its\n good size is smaller than curr... | [
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 94,
"char_start": 93,
"chars": "B"
},
{
"char_end": 98,
"char_start": 95,
"chars": "SIC"
},
{
"char_end": 109,
"char_start": 104,
"chars": "_SIZE"
}
],
"deleted": [
{
"char_end": 113,
"char_start": 93,
"chars": "(inuse / 8) + 2*EXTR"
},
{
"char_end": 395,
"char_start": 389,
"chars": "\n "
}
]
},
"commit_link": "github.com/lua/lua/commit/6298903e35217ab69c279056f925fb72900ce0b7",
"file_name": "ldo.c",
"func_name": "luaD_shrinkstack",
"line_changes": {
"added": [
{
"char_end": 111,
"char_start": 68,
"line": " int goodsize = inuse + BASIC_STACK_SIZE;\n",
"line_no": 3
},
{
"char_end": 404,
"char_start": 331,
"line": " if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) && goodsize < L->stacksize)\n",
"line_no": 8
}
],
"deleted": [
{
"char_end": 122,
"char_start": 68,
"line": " int goodsize = inuse + (inuse / 8) + 2*EXTRA_STACK;\n",
"line_no": 3
},
{
"char_end": 390,
"char_start": 342,
"line": " if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) &&\n",
"line_no": 8
},
{
"char_end": 421,
"char_start": 390,
"line": " goodsize < L->stacksize)\n",
"line_no": 9
}
]
},
"vul_type": "cwe-416"
} | 585 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)\n{\n /* mrb_assert(mrb_proc_cfunc_p(proc)) */\n mrb_irep *irep = proc->body.irep;\n mrb_value *pool = irep->pool;\n mrb_sym *syms = irep->syms;\n mrb_code i;\n int ai = mrb_gc_arena_save(mrb);\n struct mrb_jmpbuf *prev_jmp = mrb->jmp;\n struct m... | [
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,
0,
1,
0,
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": 6088,
"char_start": 6060,
"chars": " && b < MRB_ENV_STACK_LEN(e)"
},
{
"char_end": 6121,
"char_start": 6111,
"chars": "->stack[b]"
},
{
"char_end": 6174,
"char_start": 6162,
"chars": "mrb_nil_valu"
},
{
"char_end": 6177,
"char_start": 6175,
"chars": "()"
}
],
"deleted": [
{
"char_end": 6060,
"char_start": 6059,
"chars": "!"
},
{
"char_end": 6085,
"char_start": 6083,
"chars": "mr"
},
{
"char_end": 6098,
"char_start": 6086,
"chars": "_nil_value()"
},
{
"char_end": 6148,
"char_start": 6139,
"chars": "e->stack["
},
{
"char_end": 6150,
"char_start": 6149,
"chars": "]"
}
]
},
"commit_link": "github.com/mruby/mruby/commit/1905091634a6a2925c911484434448e568330626",
"file_name": "src/vm.c",
"func_name": "mrb_vm_exec",
"line_changes": {
"added": [
{
"char_end": 6092,
"char_start": 6049,
"line": " if (e && b < MRB_ENV_STACK_LEN(e)) {\n",
"line_no": 244
},
{
"char_end": 6123,
"char_start": 6092,
"line": " *regs_a = e->stack[b];\n",
"line_no": 245
},
{
"char_end": 6179,
"char_start": 6144,
"line": " *regs_a = mrb_nil_value();\n",
"line_no": 248
}
],
"deleted": [
{
"char_end": 6065,
"char_start": 6049,
"line": " if (!e) {\n",
"line_no": 244
},
{
"char_end": 6100,
"char_start": 6065,
"line": " *regs_a = mrb_nil_value();\n",
"line_no": 245
},
{
"char_end": 6152,
"char_start": 6121,
"line": " *regs_a = e->stack[b];\n",
"line_no": 248
}
]
},
"vul_type": "cwe-416"
} | 586 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)\n{\n /* mrb_assert(mrb_proc_cfunc_p(proc)) */\n mrb_irep *irep = proc->body.irep;\n mrb_value *pool = irep->pool;\n mrb_sym *syms = irep->syms;\n mrb_code i;\n int ai = mrb_gc_arena_save(mrb);\n struct mrb_jmpbuf *prev_jmp = mrb->jmp;\n struct m... | [
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": 6088,
"char_start": 6060,
"chars": " && b < MRB_ENV_STACK_LEN(e)"
},
{
"char_end": 6121,
"char_start": 6111,
"chars": "->stack[b]"
},
{
"char_end": 6174,
"char_start": 6162,
"chars": "mrb_nil_valu"
},
{
"char_end": 6177,
"char_start": 6175,
"chars": "()"
}
],
"deleted": [
{
"char_end": 6060,
"char_start": 6059,
"chars": "!"
},
{
"char_end": 6085,
"char_start": 6083,
"chars": "mr"
},
{
"char_end": 6098,
"char_start": 6086,
"chars": "_nil_value()"
},
{
"char_end": 6148,
"char_start": 6139,
"chars": "e->stack["
},
{
"char_end": 6150,
"char_start": 6149,
"chars": "]"
}
]
},
"commit_link": "github.com/mruby/mruby/commit/1905091634a6a2925c911484434448e568330626",
"file_name": "src/vm.c",
"func_name": "mrb_vm_exec",
"line_changes": {
"added": [
{
"char_end": 6092,
"char_start": 6049,
"line": " if (e && b < MRB_ENV_STACK_LEN(e)) {\n",
"line_no": 244
},
{
"char_end": 6123,
"char_start": 6092,
"line": " *regs_a = e->stack[b];\n",
"line_no": 245
},
{
"char_end": 6179,
"char_start": 6144,
"line": " *regs_a = mrb_nil_value();\n",
"line_no": 248
}
],
"deleted": [
{
"char_end": 6065,
"char_start": 6049,
"line": " if (!e) {\n",
"line_no": 244
},
{
"char_end": 6100,
"char_start": 6065,
"line": " *regs_a = mrb_nil_value();\n",
"line_no": 245
},
{
"char_end": 6152,
"char_start": 6121,
"line": " *regs_a = e->stack[b];\n",
"line_no": 248
}
]
},
"vul_type": "cwe-416"
} | 586 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static void *__ns_get_path(struct path *path, struct ns_common *ns)\n{\n\tstruct vfsmount *mnt = nsfs_mnt;\n\tstruct qstr qname = { .name = \"\", };\n\tstruct dentry *dentry;\n\tstruct inode *inode;\n\tunsigned long d;",
"\trcu_read_lock();\n\td = atomic_long_read(&ns->stashed);\n\tif (!d)\n\t\tgoto slow;\n\tden... | [
1,
1,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1035,
"char_start": 997,
"chars": "lags |= DCACHE_RCUACCESS;\n\tdentry->d_f"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/073c516ff73557a8f7315066856c04b50383ac34",
"file_name": "fs/nsfs.c",
"func_name": "__ns_get_path",
"line_changes": {
"added": [
{
"char_end": 1023,
"char_start": 985,
"line": "\tdentry->d_flags |= DCACHE_RCUACCESS;\n",
"line_no": 42
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 587 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static void *__ns_get_path(struct path *path, struct ns_common *ns)\n{\n\tstruct vfsmount *mnt = nsfs_mnt;\n\tstruct qstr qname = { .name = \"\", };\n\tstruct dentry *dentry;\n\tstruct inode *inode;\n\tunsigned long d;",
"\trcu_read_lock();\n\td = atomic_long_read(&ns->stashed);\n\tif (!d)\n\t\tgoto slow;\n\tden... | [
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1035,
"char_start": 997,
"chars": "lags |= DCACHE_RCUACCESS;\n\tdentry->d_f"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/073c516ff73557a8f7315066856c04b50383ac34",
"file_name": "fs/nsfs.c",
"func_name": "__ns_get_path",
"line_changes": {
"added": [
{
"char_end": 1023,
"char_start": 985,
"line": "\tdentry->d_flags |= DCACHE_RCUACCESS;\n",
"line_no": 42
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 587 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"PHP_FUNCTION(unserialize)\n{\n\tchar *buf = NULL;\n\tsize_t buf_len;\n\tconst unsigned char *p;\n\tphp_unserialize_data_t var_hash;\n\tzval *options = NULL, *classes = NULL;",
"",
"\tHashTable *class_hash = NULL;",
"\tif (zend_parse_parameters(ZEND_NUM_ARGS(), \"s|a\", &buf, &buf_len, &options) == FAILURE) {... | [
1,
0,
1,
1,
1,
1,
1,
0,
1,
0,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 179,
"char_start": 164,
"chars": "zval *retval;\n\t"
},
{
"char_end": 1190,
"char_start": 1156,
"chars": "retval = var_tmp_var(&var_hash);\n\t"
},
{
"char_end": 1576,
"char_start": 1575,
"chars": "\n"
},
{
"char_end": 1587,
"char_start": 1577,
"chars": "ZVAL_COPY("
}
],
"deleted": [
{
"char_end": 1176,
"char_start": 1172,
"chars": "urn_"
},
{
"char_end": 1181,
"char_start": 1179,
"chars": "ue"
},
{
"char_end": 1387,
"char_start": 1356,
"chars": "\t\tzval_ptr_dtor(return_value);\n"
},
{
"char_end": 1598,
"char_start": 1564,
"chars": "/* We should keep an reference to "
},
{
"char_end": 1709,
"char_start": 1610,
"chars": " to prevent it from being dtor\n\t in case nesting calls to unserialize */\n\tvar_push_dtor(&var_hash"
},
{
"char_end": 1718,
"char_start": 1714,
"chars": "urn_"
},
{
"char_end": 1723,
"char_start": 1721,
"chars": "ue"
}
]
},
"commit_link": "github.com/php/php-src/commit/b2af4e8868726a040234de113436c6e4f6372d17",
"file_name": "ext/standard/var.c",
"func_name": "PHP_FUNCTION",
"line_changes": {
"added": [
{
"char_end": 178,
"char_start": 163,
"line": "\tzval *retval;\n",
"line_no": 8
},
{
"char_end": 1189,
"char_start": 1155,
"line": "\tretval = var_tmp_var(&var_hash);\n",
"line_no": 40
},
{
"char_end": 1269,
"char_start": 1189,
"line": "\tif (!php_var_unserialize_ex(retval, &p, p + buf_len, &var_hash, class_hash)) {\n",
"line_no": 41
},
{
"char_end": 1576,
"char_start": 1575,
"line": "\n",
"line_no": 53
},
{
"char_end": 1610,
"char_start": 1576,
"line": "\tZVAL_COPY(return_value, retval);\n",
"line_no": 54
}
],
"deleted": [
{
"char_end": 1226,
"char_start": 1140,
"line": "\tif (!php_var_unserialize_ex(return_value, &p, p + buf_len, &var_hash, class_hash)) {\n",
"line_no": 39
},
{
"char_end": 1387,
"char_start": 1356,
"line": "\t\tzval_ptr_dtor(return_value);\n",
"line_no": 45
},
{
"char_end": 1641,
"char_start": 1563,
"line": "\t/* We should keep an reference to return_value to prevent it from being dtor\n",
"line_no": 52
},
{
"char_end": 1685,
"char_start": 1641,
"line": "\t in case nesting calls to unserialize */\n",
"line_no": 53
},
{
"char_end": 1726,
"char_start": 1685,
"line": "\tvar_push_dtor(&var_hash, return_value);\n",
"line_no": 54
}
]
},
"vul_type": "cwe-416"
} | 588 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"PHP_FUNCTION(unserialize)\n{\n\tchar *buf = NULL;\n\tsize_t buf_len;\n\tconst unsigned char *p;\n\tphp_unserialize_data_t var_hash;\n\tzval *options = NULL, *classes = NULL;",
"\tzval *retval;",
"\tHashTable *class_hash = NULL;",
"\tif (zend_parse_parameters(ZEND_NUM_ARGS(), \"s|a\", &buf, &buf_len, &options... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 179,
"char_start": 164,
"chars": "zval *retval;\n\t"
},
{
"char_end": 1190,
"char_start": 1156,
"chars": "retval = var_tmp_var(&var_hash);\n\t"
},
{
"char_end": 1576,
"char_start": 1575,
"chars": "\n"
},
{
"char_end": 1587,
"char_start": 1577,
"chars": "ZVAL_COPY("
}
],
"deleted": [
{
"char_end": 1176,
"char_start": 1172,
"chars": "urn_"
},
{
"char_end": 1181,
"char_start": 1179,
"chars": "ue"
},
{
"char_end": 1387,
"char_start": 1356,
"chars": "\t\tzval_ptr_dtor(return_value);\n"
},
{
"char_end": 1598,
"char_start": 1564,
"chars": "/* We should keep an reference to "
},
{
"char_end": 1709,
"char_start": 1610,
"chars": " to prevent it from being dtor\n\t in case nesting calls to unserialize */\n\tvar_push_dtor(&var_hash"
},
{
"char_end": 1718,
"char_start": 1714,
"chars": "urn_"
},
{
"char_end": 1723,
"char_start": 1721,
"chars": "ue"
}
]
},
"commit_link": "github.com/php/php-src/commit/b2af4e8868726a040234de113436c6e4f6372d17",
"file_name": "ext/standard/var.c",
"func_name": "PHP_FUNCTION",
"line_changes": {
"added": [
{
"char_end": 178,
"char_start": 163,
"line": "\tzval *retval;\n",
"line_no": 8
},
{
"char_end": 1189,
"char_start": 1155,
"line": "\tretval = var_tmp_var(&var_hash);\n",
"line_no": 40
},
{
"char_end": 1269,
"char_start": 1189,
"line": "\tif (!php_var_unserialize_ex(retval, &p, p + buf_len, &var_hash, class_hash)) {\n",
"line_no": 41
},
{
"char_end": 1576,
"char_start": 1575,
"line": "\n",
"line_no": 53
},
{
"char_end": 1610,
"char_start": 1576,
"line": "\tZVAL_COPY(return_value, retval);\n",
"line_no": 54
}
],
"deleted": [
{
"char_end": 1226,
"char_start": 1140,
"line": "\tif (!php_var_unserialize_ex(return_value, &p, p + buf_len, &var_hash, class_hash)) {\n",
"line_no": 39
},
{
"char_end": 1387,
"char_start": 1356,
"line": "\t\tzval_ptr_dtor(return_value);\n",
"line_no": 45
},
{
"char_end": 1641,
"char_start": 1563,
"line": "\t/* We should keep an reference to return_value to prevent it from being dtor\n",
"line_no": 52
},
{
"char_end": 1685,
"char_start": 1641,
"line": "\t in case nesting calls to unserialize */\n",
"line_no": 53
},
{
"char_end": 1726,
"char_start": 1685,
"line": "\tvar_push_dtor(&var_hash, return_value);\n",
"line_no": 54
}
]
},
"vul_type": "cwe-416"
} | 588 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static MagickBooleanType TraceBezier(MVGInfo *mvg_info,\n const size_t number_coordinates)\n{\n double\n alpha,\n *coefficients,\n weight;",
" PointInfo\n end,\n point,\n *points;",
" PrimitiveInfo\n *primitive_info;",
" register PrimitiveInfo\n *p;",
" register ssize_t\n i... | [
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1407,
"char_start": 1344,
"chars": "primitive_info=(*mvg_info->primitive_info)+mvg_info->offset;\n "
},
{
"char_end": 2465,
"char_start": 2402,
"chars": "\n primitive_info=(*mvg_info->primitive_info)+mvg_info->offset;"
}
],
"deleted": [
{
"char_end": 1407,
"char_start": 1344,
"chars": "quantum=MagickMin(quantum/number_coordinates,BezierQuantum);\n "
}
]
},
"commit_link": "github.com/ImageMagick/ImageMagick/commit/ecf7c6b288e11e7e7f75387c5e9e93e423b98397",
"file_name": "MagickCore/draw.c",
"func_name": "TraceBezier",
"line_changes": {
"added": [
{
"char_end": 1468,
"char_start": 1405,
"line": " quantum=MagickMin(quantum/number_coordinates,BezierQuantum);\n",
"line_no": 58
},
{
"char_end": 2466,
"char_start": 2403,
"line": " primitive_info=(*mvg_info->primitive_info)+mvg_info->offset;\n",
"line_no": 80
}
],
"deleted": [
{
"char_end": 1405,
"char_start": 1342,
"line": " quantum=MagickMin(quantum/number_coordinates,BezierQuantum);\n",
"line_no": 57
}
]
},
"vul_type": "cwe-416"
} | 589 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static MagickBooleanType TraceBezier(MVGInfo *mvg_info,\n const size_t number_coordinates)\n{\n double\n alpha,\n *coefficients,\n weight;",
" PointInfo\n end,\n point,\n *points;",
" PrimitiveInfo\n *primitive_info;",
" register PrimitiveInfo\n *p;",
" register ssize_t\n i... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1407,
"char_start": 1344,
"chars": "primitive_info=(*mvg_info->primitive_info)+mvg_info->offset;\n "
},
{
"char_end": 2465,
"char_start": 2402,
"chars": "\n primitive_info=(*mvg_info->primitive_info)+mvg_info->offset;"
}
],
"deleted": [
{
"char_end": 1407,
"char_start": 1344,
"chars": "quantum=MagickMin(quantum/number_coordinates,BezierQuantum);\n "
}
]
},
"commit_link": "github.com/ImageMagick/ImageMagick/commit/ecf7c6b288e11e7e7f75387c5e9e93e423b98397",
"file_name": "MagickCore/draw.c",
"func_name": "TraceBezier",
"line_changes": {
"added": [
{
"char_end": 1468,
"char_start": 1405,
"line": " quantum=MagickMin(quantum/number_coordinates,BezierQuantum);\n",
"line_no": 58
},
{
"char_end": 2466,
"char_start": 2403,
"line": " primitive_info=(*mvg_info->primitive_info)+mvg_info->offset;\n",
"line_no": 80
}
],
"deleted": [
{
"char_end": 1405,
"char_start": 1342,
"line": " quantum=MagickMin(quantum/number_coordinates,BezierQuantum);\n",
"line_no": 57
}
]
},
"vul_type": "cwe-416"
} | 589 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int parse_playlist(HLSContext *c, const char *url,\n struct playlist *pls, AVIOContext *in)\n{\n int ret = 0, is_segment = 0, is_variant = 0;\n int64_t duration = 0;\n enum KeyType key_type = KEY_NONE;\n uint8_t iv[16] = \"\";\n int has_iv = 0;\n char key[MAX_URL_S... | [
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
0,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 6759,
"char_start": 6549,
"chars": "\n if (duration < 0.001 * AV_TIME_BASE) {\n duration = 0.001 * AV_TIME_BASE;\n }\n seg->duration = duration;\n seg->key_type = key_type;"
}
],
"deleted": [
{
"char_end": 5597,
"char_start": 5513,
"chars": "seg->duration = duration;\n seg->key_type = key_type;\n "
}
]
},
"commit_link": "github.com/FFmpeg/FFmpeg/commit/6959358683c7533f586c07a766acc5fe9544d8b2",
"file_name": "libavformat/hls.c",
"func_name": "parse_playlist",
"line_changes": {
"added": [
{
"char_end": 6605,
"char_start": 6550,
"line": " if (duration < 0.001 * AV_TIME_BASE) {\n",
"line_no": 176
},
{
"char_end": 6658,
"char_start": 6605,
"line": " duration = 0.001 * AV_TIME_BASE;\n",
"line_no": 177
},
{
"char_end": 6676,
"char_start": 6658,
"line": " }\n",
"line_no": 178
},
{
"char_end": 6718,
"char_start": 6676,
"line": " seg->duration = duration;\n",
"line_no": 179
},
{
"char_end": 6760,
"char_start": 6718,
"line": " seg->key_type = key_type;\n",
"line_no": 180
}
],
"deleted": [
{
"char_end": 5539,
"char_start": 5497,
"line": " seg->duration = duration;\n",
"line_no": 147
},
{
"char_end": 5581,
"char_start": 5539,
"line": " seg->key_type = key_type;\n",
"line_no": 148
}
]
},
"vul_type": "cwe-416"
} | 590 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int parse_playlist(HLSContext *c, const char *url,\n struct playlist *pls, AVIOContext *in)\n{\n int ret = 0, is_segment = 0, is_variant = 0;\n int64_t duration = 0;\n enum KeyType key_type = KEY_NONE;\n uint8_t iv[16] = \"\";\n int has_iv = 0;\n char key[MAX_URL_S... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 6759,
"char_start": 6549,
"chars": "\n if (duration < 0.001 * AV_TIME_BASE) {\n duration = 0.001 * AV_TIME_BASE;\n }\n seg->duration = duration;\n seg->key_type = key_type;"
}
],
"deleted": [
{
"char_end": 5597,
"char_start": 5513,
"chars": "seg->duration = duration;\n seg->key_type = key_type;\n "
}
]
},
"commit_link": "github.com/FFmpeg/FFmpeg/commit/6959358683c7533f586c07a766acc5fe9544d8b2",
"file_name": "libavformat/hls.c",
"func_name": "parse_playlist",
"line_changes": {
"added": [
{
"char_end": 6605,
"char_start": 6550,
"line": " if (duration < 0.001 * AV_TIME_BASE) {\n",
"line_no": 176
},
{
"char_end": 6658,
"char_start": 6605,
"line": " duration = 0.001 * AV_TIME_BASE;\n",
"line_no": 177
},
{
"char_end": 6676,
"char_start": 6658,
"line": " }\n",
"line_no": 178
},
{
"char_end": 6718,
"char_start": 6676,
"line": " seg->duration = duration;\n",
"line_no": 179
},
{
"char_end": 6760,
"char_start": 6718,
"line": " seg->key_type = key_type;\n",
"line_no": 180
}
],
"deleted": [
{
"char_end": 5539,
"char_start": 5497,
"line": " seg->duration = duration;\n",
"line_no": 147
},
{
"char_end": 5581,
"char_start": 5539,
"line": " seg->key_type = key_type;\n",
"line_no": 148
}
]
},
"vul_type": "cwe-416"
} | 590 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"struct net *get_net_ns_by_id(struct net *net, int id)\n{\n\tstruct net *peer;",
"\tif (id < 0)\n\t\treturn NULL;",
"\trcu_read_lock();\n\tspin_lock_bh(&net->nsid_lock);\n\tpeer = idr_find(&net->netns_ids, id);\n\tif (peer)",
"\t\tget_net(peer);",
"\tspin_unlock_bh(&net->nsid_lock);\n\trcu_read_unlock();",
... | [
1,
1,
1,
0,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 220,
"char_start": 207,
"chars": "peer = maybe_"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/21b5944350052d2583e82dd59b19a9ba94a007f0",
"file_name": "net/core/net_namespace.c",
"func_name": "get_net_ns_by_id",
"line_changes": {
"added": [
{
"char_end": 235,
"char_start": 205,
"line": "\t\tpeer = maybe_get_net(peer);\n",
"line_no": 12
}
],
"deleted": [
{
"char_end": 222,
"char_start": 205,
"line": "\t\tget_net(peer);\n",
"line_no": 12
}
]
},
"vul_type": "cwe-416"
} | 591 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"struct net *get_net_ns_by_id(struct net *net, int id)\n{\n\tstruct net *peer;",
"\tif (id < 0)\n\t\treturn NULL;",
"\trcu_read_lock();\n\tspin_lock_bh(&net->nsid_lock);\n\tpeer = idr_find(&net->netns_ids, id);\n\tif (peer)",
"\t\tpeer = maybe_get_net(peer);",
"\tspin_unlock_bh(&net->nsid_lock);\n\trcu_read... | [
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 220,
"char_start": 207,
"chars": "peer = maybe_"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/21b5944350052d2583e82dd59b19a9ba94a007f0",
"file_name": "net/core/net_namespace.c",
"func_name": "get_net_ns_by_id",
"line_changes": {
"added": [
{
"char_end": 235,
"char_start": 205,
"line": "\t\tpeer = maybe_get_net(peer);\n",
"line_no": 12
}
],
"deleted": [
{
"char_end": 222,
"char_start": 205,
"line": "\t\tget_net(peer);\n",
"line_no": 12
}
]
},
"vul_type": "cwe-416"
} | 591 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int usb_audio_probe(struct usb_interface *intf,\n\t\t\t const struct usb_device_id *usb_id)\n{\n\tstruct usb_device *dev = interface_to_usbdev(intf);\n\tconst struct snd_usb_audio_quirk *quirk =\n\t\t(const struct snd_usb_audio_quirk *)usb_id->driver_info;\n\tstruct snd_usb_audio *chip;\n\tint i, err;\n\t... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 3224,
"char_start": 3087,
"chars": "/* chip->active is inside the chip->card object,\n\t\t * decrement before memory is possibly returned.\n\t\t */\n\t\tatomic_dec(&chip->active);\n\t\t"
}
],
"deleted": [
{
"char_end": 3089,
"char_start": 3087,
"chars": "if"
},
{
"char_end": 3092,
"char_start": 3090,
"chars": "(!"
},
{
"char_end": 3102,
"char_start": 3098,
"chars": "num_"
},
{
"char_end": 3109,
"char_start": 3107,
"chars": "fa"
},
{
"char_end": 3113,
"char_start": 3110,
"chars": "es)"
},
{
"char_end": 3119,
"char_start": 3116,
"chars": "\tsn"
},
{
"char_end": 3121,
"char_start": 3120,
"chars": "_"
},
{
"char_end": 3123,
"char_start": 3122,
"chars": "a"
},
{
"char_end": 3126,
"char_start": 3124,
"chars": "d_"
},
{
"char_end": 3133,
"char_start": 3130,
"chars": "(ch"
},
{
"char_end": 3139,
"char_start": 3135,
"chars": "->ca"
},
{
"char_end": 3143,
"char_start": 3141,
"chars": ");"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/5f8cf712582617d523120df67d392059eaf2fc4b",
"file_name": "sound/usb/card.c",
"func_name": "usb_audio_probe",
"line_changes": {
"added": [
{
"char_end": 3136,
"char_start": 3085,
"line": "\t\t/* chip->active is inside the chip->card object,\n",
"line_no": 118
},
{
"char_end": 3187,
"char_start": 3136,
"line": "\t\t * decrement before memory is possibly returned.\n",
"line_no": 119
},
{
"char_end": 3193,
"char_start": 3187,
"line": "\t\t */\n",
"line_no": 120
},
{
"char_end": 3222,
"char_start": 3193,
"line": "\t\tatomic_dec(&chip->active);\n",
"line_no": 121
}
],
"deleted": [
{
"char_end": 3173,
"char_start": 3144,
"line": "\t\tatomic_dec(&chip->active);\n",
"line_no": 120
}
]
},
"vul_type": "cwe-416"
} | 592 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int usb_audio_probe(struct usb_interface *intf,\n\t\t\t const struct usb_device_id *usb_id)\n{\n\tstruct usb_device *dev = interface_to_usbdev(intf);\n\tconst struct snd_usb_audio_quirk *quirk =\n\t\t(const struct snd_usb_audio_quirk *)usb_id->driver_info;\n\tstruct snd_usb_audio *chip;\n\tint i, err;\n\t... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 3224,
"char_start": 3087,
"chars": "/* chip->active is inside the chip->card object,\n\t\t * decrement before memory is possibly returned.\n\t\t */\n\t\tatomic_dec(&chip->active);\n\t\t"
}
],
"deleted": [
{
"char_end": 3089,
"char_start": 3087,
"chars": "if"
},
{
"char_end": 3092,
"char_start": 3090,
"chars": "(!"
},
{
"char_end": 3102,
"char_start": 3098,
"chars": "num_"
},
{
"char_end": 3109,
"char_start": 3107,
"chars": "fa"
},
{
"char_end": 3113,
"char_start": 3110,
"chars": "es)"
},
{
"char_end": 3119,
"char_start": 3116,
"chars": "\tsn"
},
{
"char_end": 3121,
"char_start": 3120,
"chars": "_"
},
{
"char_end": 3123,
"char_start": 3122,
"chars": "a"
},
{
"char_end": 3126,
"char_start": 3124,
"chars": "d_"
},
{
"char_end": 3133,
"char_start": 3130,
"chars": "(ch"
},
{
"char_end": 3139,
"char_start": 3135,
"chars": "->ca"
},
{
"char_end": 3143,
"char_start": 3141,
"chars": ");"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/5f8cf712582617d523120df67d392059eaf2fc4b",
"file_name": "sound/usb/card.c",
"func_name": "usb_audio_probe",
"line_changes": {
"added": [
{
"char_end": 3136,
"char_start": 3085,
"line": "\t\t/* chip->active is inside the chip->card object,\n",
"line_no": 118
},
{
"char_end": 3187,
"char_start": 3136,
"line": "\t\t * decrement before memory is possibly returned.\n",
"line_no": 119
},
{
"char_end": 3193,
"char_start": 3187,
"line": "\t\t */\n",
"line_no": 120
},
{
"char_end": 3222,
"char_start": 3193,
"line": "\t\tatomic_dec(&chip->active);\n",
"line_no": 121
}
],
"deleted": [
{
"char_end": 3173,
"char_start": 3144,
"line": "\t\tatomic_dec(&chip->active);\n",
"line_no": 120
}
]
},
"vul_type": "cwe-416"
} | 592 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"GF_Err audio_sample_entry_Read(GF_Box *s, GF_BitStream *bs)\n{\n\tGF_MPEGAudioSampleEntryBox *ptr;\n\tchar *data;\n\tu8 a, b, c, d;\n\tu32 i, size, v, nb_alnum;\n\tGF_Err e;\n\tu64 pos, start;",
"\tptr = (GF_MPEGAudioSampleEntryBox *)s;",
"\tstart = gf_bs_get_position(bs);\n\tgf_bs_seek(bs, start + 8);\n\tv = ... | [
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1767,
"char_start": 1737,
"chars": "extern Bool use_dump_mode;\n\t\t\t"
},
{
"char_end": 1881,
"char_start": 1861,
"chars": "if (!use_dump_mode) "
}
],
"deleted": []
},
"commit_link": "github.com/gpac/gpac/commit/6063b1a011c3f80cee25daade18154e15e4c058c",
"file_name": "src/isomedia/box_code_base.c",
"func_name": "audio_sample_entry_Read",
"line_changes": {
"added": [
{
"char_end": 1764,
"char_start": 1734,
"line": "\t\t\textern Bool use_dump_mode;\n",
"line_no": 56
},
{
"char_end": 1918,
"char_start": 1857,
"line": "\t\t\t\tif (!use_dump_mode) gf_isom_box_del((GF_Box *)ptr->esd);\n",
"line_no": 59
}
],
"deleted": [
{
"char_end": 1868,
"char_start": 1827,
"line": "\t\t\t\tgf_isom_box_del((GF_Box *)ptr->esd);\n",
"line_no": 58
}
]
},
"vul_type": "cwe-416"
} | 593 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"GF_Err audio_sample_entry_Read(GF_Box *s, GF_BitStream *bs)\n{\n\tGF_MPEGAudioSampleEntryBox *ptr;\n\tchar *data;\n\tu8 a, b, c, d;\n\tu32 i, size, v, nb_alnum;\n\tGF_Err e;\n\tu64 pos, start;",
"\tptr = (GF_MPEGAudioSampleEntryBox *)s;",
"\tstart = gf_bs_get_position(bs);\n\tgf_bs_seek(bs, start + 8);\n\tv = ... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 1767,
"char_start": 1737,
"chars": "extern Bool use_dump_mode;\n\t\t\t"
},
{
"char_end": 1881,
"char_start": 1861,
"chars": "if (!use_dump_mode) "
}
],
"deleted": []
},
"commit_link": "github.com/gpac/gpac/commit/6063b1a011c3f80cee25daade18154e15e4c058c",
"file_name": "src/isomedia/box_code_base.c",
"func_name": "audio_sample_entry_Read",
"line_changes": {
"added": [
{
"char_end": 1764,
"char_start": 1734,
"line": "\t\t\textern Bool use_dump_mode;\n",
"line_no": 56
},
{
"char_end": 1918,
"char_start": 1857,
"line": "\t\t\t\tif (!use_dump_mode) gf_isom_box_del((GF_Box *)ptr->esd);\n",
"line_no": 59
}
],
"deleted": [
{
"char_end": 1868,
"char_start": 1827,
"line": "\t\t\t\tgf_isom_box_del((GF_Box *)ptr->esd);\n",
"line_no": 58
}
]
},
"vul_type": "cwe-416"
} | 593 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static void ffs_user_copy_worker(struct work_struct *work)\n{\n\tstruct ffs_io_data *io_data = container_of(work, struct ffs_io_data,\n\t\t\t\t\t\t work);\n\tint ret = io_data->req->status ? io_data->req->status :\n\t\t\t\t\t io_data->req->actual;",
"",
"\n\tif (io_data->read && ret > 0) {\n\t\tuse_mm(io_dat... | [
1,
0,
1,
1,
0,
1,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 299,
"char_start": 232,
"chars": "\tbool kiocb_has_eventfd = io_data->kiocb->ki_flags & IOCB_EVENTFD;\n"
},
{
"char_end": 597,
"char_start": 596,
"chars": "h"
},
{
"char_end": 607,
"char_start": 600,
"chars": "eventfd"
}
],
"deleted": [
{
"char_end": 526,
"char_start": 521,
"chars": "\n\t "
},
{
"char_end": 538,
"char_start": 528,
"chars": "(io_data->"
},
{
"char_end": 547,
"char_start": 543,
"chars": "->ki"
},
{
"char_end": 550,
"char_start": 548,
"chars": "fl"
},
{
"char_end": 552,
"char_start": 551,
"chars": "g"
},
{
"char_end": 560,
"char_start": 553,
"chars": " & IOCB"
},
{
"char_end": 569,
"char_start": 561,
"chars": "EVENTFD)"
},
{
"char_end": 702,
"char_start": 669,
"chars": "\n\tio_data->kiocb->private = NULL;"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/38740a5b87d53ceb89eb2c970150f6e94e00373a",
"file_name": "drivers/usb/gadget/function/f_fs.c",
"func_name": "ffs_user_copy_worker",
"line_changes": {
"added": [
{
"char_end": 299,
"char_start": 232,
"line": "\tbool kiocb_has_eventfd = io_data->kiocb->ki_flags & IOCB_EVENTFD;\n",
"line_no": 7
},
{
"char_end": 609,
"char_start": 555,
"line": "\tif (io_data->ffs->ffs_eventfd && !kiocb_has_eventfd)\n",
"line_no": 19
}
],
"deleted": [
{
"char_end": 522,
"char_start": 488,
"line": "\tif (io_data->ffs->ffs_eventfd &&\n",
"line_no": 18
},
{
"char_end": 571,
"char_start": 522,
"line": "\t !(io_data->kiocb->ki_flags & IOCB_EVENTFD))\n",
"line_no": 19
},
{
"char_end": 703,
"char_start": 670,
"line": "\tio_data->kiocb->private = NULL;\n",
"line_no": 24
}
]
},
"vul_type": "cwe-416"
} | 594 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static void ffs_user_copy_worker(struct work_struct *work)\n{\n\tstruct ffs_io_data *io_data = container_of(work, struct ffs_io_data,\n\t\t\t\t\t\t work);\n\tint ret = io_data->req->status ? io_data->req->status :\n\t\t\t\t\t io_data->req->actual;",
"\tbool kiocb_has_eventfd = io_data->kiocb->ki_flags & IOCB_E... | [
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 299,
"char_start": 232,
"chars": "\tbool kiocb_has_eventfd = io_data->kiocb->ki_flags & IOCB_EVENTFD;\n"
},
{
"char_end": 597,
"char_start": 596,
"chars": "h"
},
{
"char_end": 607,
"char_start": 600,
"chars": "eventfd"
}
],
"deleted": [
{
"char_end": 526,
"char_start": 521,
"chars": "\n\t "
},
{
"char_end": 538,
"char_start": 528,
"chars": "(io_data->"
},
{
"char_end": 547,
"char_start": 543,
"chars": "->ki"
},
{
"char_end": 550,
"char_start": 548,
"chars": "fl"
},
{
"char_end": 552,
"char_start": 551,
"chars": "g"
},
{
"char_end": 560,
"char_start": 553,
"chars": " & IOCB"
},
{
"char_end": 569,
"char_start": 561,
"chars": "EVENTFD)"
},
{
"char_end": 702,
"char_start": 669,
"chars": "\n\tio_data->kiocb->private = NULL;"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/38740a5b87d53ceb89eb2c970150f6e94e00373a",
"file_name": "drivers/usb/gadget/function/f_fs.c",
"func_name": "ffs_user_copy_worker",
"line_changes": {
"added": [
{
"char_end": 299,
"char_start": 232,
"line": "\tbool kiocb_has_eventfd = io_data->kiocb->ki_flags & IOCB_EVENTFD;\n",
"line_no": 7
},
{
"char_end": 609,
"char_start": 555,
"line": "\tif (io_data->ffs->ffs_eventfd && !kiocb_has_eventfd)\n",
"line_no": 19
}
],
"deleted": [
{
"char_end": 522,
"char_start": 488,
"line": "\tif (io_data->ffs->ffs_eventfd &&\n",
"line_no": 18
},
{
"char_end": 571,
"char_start": 522,
"line": "\t !(io_data->kiocb->ki_flags & IOCB_EVENTFD))\n",
"line_no": 19
},
{
"char_end": 703,
"char_start": 670,
"line": "\tio_data->kiocb->private = NULL;\n",
"line_no": 24
}
]
},
"vul_type": "cwe-416"
} | 594 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static void ndpi_reset_packet_line_info(struct ndpi_packet_struct *packet) {\n packet->parsed_lines = 0, packet->empty_line_position_set = 0, packet->host_line.ptr = NULL,\n packet->host_line.len = 0, packet->referer_line.ptr = NULL, packet->referer_line.len = 0,\n packet->content_line.ptr = NULL, packet->c... | [
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 860,
"char_start": 769,
"chars": "content_disposition_line.ptr = NULL,\n packet->content_disposition_line.len = 0, packet->"
}
],
"deleted": []
},
"commit_link": "github.com/ntop/nDPI/commit/6a9f5e4f7c3fd5ddab3e6727b071904d76773952",
"file_name": "src/lib/ndpi_main.c",
"func_name": "ndpi_reset_packet_line_info",
"line_changes": {
"added": [
{
"char_end": 806,
"char_start": 688,
"line": " packet->http_contentlen.ptr = NULL, packet->http_contentlen.len = 0, packet->content_disposition_line.ptr = NULL,\n",
"line_no": 8
},
{
"char_end": 884,
"char_start": 806,
"line": " packet->content_disposition_line.len = 0, packet->http_cookie.ptr = NULL,\n",
"line_no": 9
}
],
"deleted": [
{
"char_end": 793,
"char_start": 688,
"line": " packet->http_contentlen.ptr = NULL, packet->http_contentlen.len = 0, packet->http_cookie.ptr = NULL,\n",
"line_no": 8
}
]
},
"vul_type": "cwe-416"
} | 595 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static void ndpi_reset_packet_line_info(struct ndpi_packet_struct *packet) {\n packet->parsed_lines = 0, packet->empty_line_position_set = 0, packet->host_line.ptr = NULL,\n packet->host_line.len = 0, packet->referer_line.ptr = NULL, packet->referer_line.len = 0,\n packet->content_line.ptr = NULL, packet->c... | [
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 860,
"char_start": 769,
"chars": "content_disposition_line.ptr = NULL,\n packet->content_disposition_line.len = 0, packet->"
}
],
"deleted": []
},
"commit_link": "github.com/ntop/nDPI/commit/6a9f5e4f7c3fd5ddab3e6727b071904d76773952",
"file_name": "src/lib/ndpi_main.c",
"func_name": "ndpi_reset_packet_line_info",
"line_changes": {
"added": [
{
"char_end": 806,
"char_start": 688,
"line": " packet->http_contentlen.ptr = NULL, packet->http_contentlen.len = 0, packet->content_disposition_line.ptr = NULL,\n",
"line_no": 8
},
{
"char_end": 884,
"char_start": 806,
"line": " packet->content_disposition_line.len = 0, packet->http_cookie.ptr = NULL,\n",
"line_no": 9
}
],
"deleted": [
{
"char_end": 793,
"char_start": 688,
"line": " packet->http_contentlen.ptr = NULL, packet->http_contentlen.len = 0, packet->http_cookie.ptr = NULL,\n",
"line_no": 8
}
]
},
"vul_type": "cwe-416"
} | 595 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int snd_seq_device_dev_free(struct snd_device *device)\n{\n\tstruct snd_seq_device *dev = device->device_data;\n",
"",
"\tput_device(&dev->dev);\n\treturn 0;\n}"
] | [
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 145,
"char_start": 117,
"chars": "cancel_autoload_drivers();\n\t"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/fc27fe7e8deef2f37cba3f2be2d52b6ca5eb9d57",
"file_name": "sound/core/seq_device.c",
"func_name": "snd_seq_device_dev_free",
"line_changes": {
"added": [
{
"char_end": 144,
"char_start": 116,
"line": "\tcancel_autoload_drivers();\n",
"line_no": 5
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 596 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"static int snd_seq_device_dev_free(struct snd_device *device)\n{\n\tstruct snd_seq_device *dev = device->device_data;\n",
"\tcancel_autoload_drivers();",
"\tput_device(&dev->dev);\n\treturn 0;\n}"
] | [
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 145,
"char_start": 117,
"chars": "cancel_autoload_drivers();\n\t"
}
],
"deleted": []
},
"commit_link": "github.com/torvalds/linux/commit/fc27fe7e8deef2f37cba3f2be2d52b6ca5eb9d57",
"file_name": "sound/core/seq_device.c",
"func_name": "snd_seq_device_dev_free",
"line_changes": {
"added": [
{
"char_end": 144,
"char_start": 116,
"line": "\tcancel_autoload_drivers();\n",
"line_no": 5
}
],
"deleted": []
},
"vul_type": "cwe-416"
} | 596 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"int __mdiobus_register(struct mii_bus *bus, struct module *owner)\n{\n\tstruct mdio_device *mdiodev;\n\tint i, err;\n\tstruct gpio_desc *gpiod;",
"\tif (NULL == bus || NULL == bus->name ||\n\t NULL == bus->read || NULL == bus->write)\n\t\treturn -EINVAL;",
"\tBUG_ON(bus->state != MDIOBUS_ALLOCATED &&\n\t ... | [
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [],
"deleted": [
{
"char_end": 616,
"char_start": 591,
"chars": "put_device(&bus->dev);\n\t\t"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/6ff7b060535e87c2ae14dd8548512abfdda528fb",
"file_name": "drivers/net/phy/mdio_bus.c",
"func_name": "__mdiobus_register",
"line_changes": {
"added": [],
"deleted": [
{
"char_end": 614,
"char_start": 589,
"line": "\t\tput_device(&bus->dev);\n",
"line_no": 23
}
]
},
"vul_type": "cwe-416"
} | 597 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"int __mdiobus_register(struct mii_bus *bus, struct module *owner)\n{\n\tstruct mdio_device *mdiodev;\n\tint i, err;\n\tstruct gpio_desc *gpiod;",
"\tif (NULL == bus || NULL == bus->name ||\n\t NULL == bus->read || NULL == bus->write)\n\t\treturn -EINVAL;",
"\tBUG_ON(bus->state != MDIOBUS_ALLOCATED &&\n\t ... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [],
"deleted": [
{
"char_end": 616,
"char_start": 591,
"chars": "put_device(&bus->dev);\n\t\t"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/6ff7b060535e87c2ae14dd8548512abfdda528fb",
"file_name": "drivers/net/phy/mdio_bus.c",
"func_name": "__mdiobus_register",
"line_changes": {
"added": [],
"deleted": [
{
"char_end": 614,
"char_start": 589,
"line": "\t\tput_device(&bus->dev);\n",
"line_no": 23
}
]
},
"vul_type": "cwe-416"
} | 597 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"mrb_io_initialize_copy(mrb_state *mrb, mrb_value copy)\n{\n mrb_value orig;\n mrb_value buf;\n struct mrb_io *fptr_copy;\n struct mrb_io *fptr_orig;\n mrb_bool failed = TRUE;",
" mrb_get_args(mrb, \"o\", &orig);",
"",
" fptr_copy = (struct mrb_io *)DATA_PTR(copy);\n if (fptr_copy != NULL) {\n fptr... | [
1,
1,
0,
1,
0,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 258,
"char_start": 215,
"chars": "orig = io_get_open_fptr(mrb, orig);\n fptr_"
}
],
"deleted": [
{
"char_end": 448,
"char_start": 405,
"chars": ");\n fptr_orig = io_get_open_fptr(mrb, orig"
}
]
},
"commit_link": "github.com/mruby/mruby/commit/b51b21fc63c9805862322551387d9036f2b63433",
"file_name": "mrbgems/mruby-io/src/io.c",
"func_name": "mrb_io_initialize_copy",
"line_changes": {
"added": [
{
"char_end": 251,
"char_start": 208,
"line": " fptr_orig = io_get_open_fptr(mrb, orig);\n",
"line_no": 10
}
],
"deleted": [
{
"char_end": 451,
"char_start": 408,
"line": " fptr_orig = io_get_open_fptr(mrb, orig);\n",
"line_no": 16
}
]
},
"vul_type": "cwe-416"
} | 598 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"mrb_io_initialize_copy(mrb_state *mrb, mrb_value copy)\n{\n mrb_value orig;\n mrb_value buf;\n struct mrb_io *fptr_copy;\n struct mrb_io *fptr_orig;\n mrb_bool failed = TRUE;",
" mrb_get_args(mrb, \"o\", &orig);",
" fptr_orig = io_get_open_fptr(mrb, orig);",
" fptr_copy = (struct mrb_io *)DATA_PTR(co... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 258,
"char_start": 215,
"chars": "orig = io_get_open_fptr(mrb, orig);\n fptr_"
}
],
"deleted": [
{
"char_end": 448,
"char_start": 405,
"chars": ");\n fptr_orig = io_get_open_fptr(mrb, orig"
}
]
},
"commit_link": "github.com/mruby/mruby/commit/b51b21fc63c9805862322551387d9036f2b63433",
"file_name": "mrbgems/mruby-io/src/io.c",
"func_name": "mrb_io_initialize_copy",
"line_changes": {
"added": [
{
"char_end": 251,
"char_start": 208,
"line": " fptr_orig = io_get_open_fptr(mrb, orig);\n",
"line_no": 10
}
],
"deleted": [
{
"char_end": 451,
"char_start": 408,
"line": " fptr_orig = io_get_open_fptr(mrb, orig);\n",
"line_no": 16
}
]
},
"vul_type": "cwe-416"
} | 598 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"SMB2_write(const unsigned int xid, struct cifs_io_parms *io_parms,\n\t unsigned int *nbytes, struct kvec *iov, int n_vec)\n{\n\tstruct smb_rqst rqst;\n\tint rc = 0;\n\tstruct smb2_write_req *req = NULL;\n\tstruct smb2_write_rsp *rsp = NULL;\n\tint resp_buftype;\n\tstruct kvec rsp_iov;\n\tint flags = 0;\n\tunsign... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
0,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 2049,
"char_start": 2019,
"chars": "\n\tcifs_small_buf_release(req);"
}
],
"deleted": [
{
"char_end": 1506,
"char_start": 1476,
"chars": "cifs_small_buf_release(req);\n\t"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/6a3eb3360667170988f8a6477f6686242061488a",
"file_name": "fs/cifs/smb2pdu.c",
"func_name": "SMB2_write",
"line_changes": {
"added": [
{
"char_end": 2050,
"char_start": 2020,
"line": "\tcifs_small_buf_release(req);\n",
"line_no": 73
}
],
"deleted": [
{
"char_end": 1505,
"char_start": 1475,
"line": "\tcifs_small_buf_release(req);\n",
"line_no": 56
}
]
},
"vul_type": "cwe-416"
} | 599 | cwe-416 | c |
Determine whether the {function_name} code is vulnerable or not. | [
"SMB2_write(const unsigned int xid, struct cifs_io_parms *io_parms,\n\t unsigned int *nbytes, struct kvec *iov, int n_vec)\n{\n\tstruct smb_rqst rqst;\n\tint rc = 0;\n\tstruct smb2_write_req *req = NULL;\n\tstruct smb2_write_rsp *rsp = NULL;\n\tint resp_buftype;\n\tstruct kvec rsp_iov;\n\tint flags = 0;\n\tunsign... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | SVEN | {
"char_changes": {
"added": [
{
"char_end": 2049,
"char_start": 2019,
"chars": "\n\tcifs_small_buf_release(req);"
}
],
"deleted": [
{
"char_end": 1506,
"char_start": 1476,
"chars": "cifs_small_buf_release(req);\n\t"
}
]
},
"commit_link": "github.com/torvalds/linux/commit/6a3eb3360667170988f8a6477f6686242061488a",
"file_name": "fs/cifs/smb2pdu.c",
"func_name": "SMB2_write",
"line_changes": {
"added": [
{
"char_end": 2050,
"char_start": 2020,
"line": "\tcifs_small_buf_release(req);\n",
"line_no": 73
}
],
"deleted": [
{
"char_end": 1505,
"char_start": 1475,
"line": "\tcifs_small_buf_release(req);\n",
"line_no": 56
}
]
},
"vul_type": "cwe-416"
} | 599 | cwe-416 | c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.