Datasets:

is_vulnerable
bool
2 classes
func
stringlengths
28
484k
cwe
listlengths
1
2
project
stringclasses
592 values
commit_id
stringlengths
7
44
hash
stringlengths
34
39
big_vul_idx
int64
4.09k
189k
idx
int64
0
522k
cwe_description
stringclasses
81 values
false
static int cbor2json (OSCTXT* pCborCtxt, OSCTXT* pJsonCtxt) { int ret = 0; OSOCTET tag, ub; /* Read byte from stream */ ret = rtxReadBytes (pCborCtxt, &ub, 1); if (0 != ret) return LOG_RTERR (pCborCtxt, ret); tag = ub >> 5; /* Switch on tag value */ switch (tag) { case OSRTCBOR_...
[ "CWE-908" ]
oocborrt
539851c66778f68a244633985f6f8d0df94ea3b3
35220910097174699607611223552005017135
null
217,328
The product uses or accesses a resource that has not been initialized.
true
static int cbor2json (OSCTXT* pCborCtxt, OSCTXT* pJsonCtxt) { int ret = 0; OSOCTET tag, ub; /* Read byte from stream */ ret = rtxReadBytes (pCborCtxt, &ub, 1); if (0 != ret) return LOG_RTERR (pCborCtxt, ret); tag = ub >> 5; /* Switch on tag value */ switch (tag) { case OSRTCBOR_...
[ "CWE-908" ]
oocborrt
539851c66778f68a244633985f6f8d0df94ea3b3
110318887320859724419832151719883220577
null
520,982
The product uses or accesses a resource that has not been initialized.
false
void sqlcipher_exportFunc(sqlite3_context *context, int argc, sqlite3_value **argv) { sqlite3 *db = sqlite3_context_db_handle(context); const char* targetDb, *sourceDb; int targetDb_idx = 0; u64 saved_flags = db->flags; /* Saved value of the db->flags */ u32 saved_mDbFlags = db->mDbFlags; /* Sa...
[ "CWE-476" ]
sqlcipher
cb71f53e8cea4802509f182fa5bead0ac6ab0e7f
182753212579065576377348270852219405361
null
217,461
The product dereferences a pointer that it expects to be valid but is NULL.
true
void sqlcipher_exportFunc(sqlite3_context *context, int argc, sqlite3_value **argv) { sqlite3 *db = sqlite3_context_db_handle(context); const char* targetDb, *sourceDb; int targetDb_idx = 0; u64 saved_flags = db->flags; /* Saved value of the db->flags */ u32 saved_mDbFlags = db->mDbFlags; /* Sa...
[ "CWE-476" ]
sqlcipher
cb71f53e8cea4802509f182fa5bead0ac6ab0e7f
22620265715441669292024280266706204313
null
521,506
The product dereferences a pointer that it expects to be valid but is NULL.
false
NAN_METHOD(TxnWrap::putString) { return putCommon(info, [](Nan::NAN_METHOD_ARGS_TYPE info, MDB_val &data) -> void { CustomExternalStringResource::writeTo(Local<String>::Cast(info[2]), &data); }, [](MDB_val &data) -> void { delete[] (uint16_t*)data.mv_data; }); }
[ "Other" ]
node-lmdb
97760104c0fd311206b88aecd91fa1f59fe2b85a
221002083052338728705182306535454875181
null
217,548
Unknown
true
NAN_METHOD(TxnWrap::putString) { if (!info[2]->IsString()) return Nan::ThrowError("Value must be a string."); return putCommon(info, [](Nan::NAN_METHOD_ARGS_TYPE info, MDB_val &data) -> void { CustomExternalStringResource::writeTo(Local<String>::Cast(info[2]), &data); }, [](MDB_val &data) ->...
[ "Other" ]
node-lmdb
97760104c0fd311206b88aecd91fa1f59fe2b85a
90464922304161758037637442655888907352
null
522,372
Unknown
false
struct error_obj run_pam_auth(const char *username, char *password) { // PAM frees pam_response for us. struct pam_response *reply = malloc(sizeof(struct pam_response)); if (reply == NULL) { struct error_obj ret_val; ret_val.status = 2; ret_val.func_name = "malloc"; ret_val.e...
[ "CWE-613" ]
maddy
7ee6a39c6a1939b376545f030a5efd6f90913583
154307988119966680414051367665795702535
null
217,552
According to WASC, Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.
true
struct error_obj run_pam_auth(const char *username, char *password) { // PAM frees pam_response for us. struct pam_response *reply = malloc(sizeof(struct pam_response)); if (reply == NULL) { struct error_obj ret_val; ret_val.status = 2; ret_val.func_name = "malloc"; ret_val.e...
[ "CWE-613" ]
maddy
7ee6a39c6a1939b376545f030a5efd6f90913583
283443869067414917158176917086877093267
null
522,443
According to WASC, Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.