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 append_ia5(STACK_OF(OPENSSL_STRING) **sk, const ASN1_IA5STRING *email) { char *emtmp; /* First some sanity checks */ if (email->type != V_ASN1_IA5STRING) return 1; if (!email->data || !email->length) return 1; if (*sk == NULL) *sk = sk_OPENSSL_STRING_new(sk_strcmp)...
[ "CWE-125" ]
openssl
bb4d2ed4091408404e18b3326e3df67848ef63d0
321343327022759643565155827533139399226
null
216,863
The product reads data past the end, or before the beginning, of the intended buffer.
true
static int append_ia5(STACK_OF(OPENSSL_STRING) **sk, const ASN1_IA5STRING *email) { char *emtmp; /* First some sanity checks */ if (email->type != V_ASN1_IA5STRING) return 1; if (email->data == NULL || email->length == 0) return 1; if (memchr(email->data, 0, email->length) != NULL) ...
[ "CWE-125" ]
openssl
bb4d2ed4091408404e18b3326e3df67848ef63d0
117045098058902664694870452548633051139
null
507,808
The product reads data past the end, or before the beginning, of the intended buffer.
false
static int test_x509_time(int idx) { ASN1_TIME *t = NULL; int result, rv = 0; if (x509_format_tests[idx].set_string) { /* set-string mode */ t = ASN1_TIME_new(); if (t == NULL) { TEST_info("test_x509_time(%d) failed: internal error\n", idx); return 0; ...
[ "CWE-125" ]
openssl
4de66925203ca99189c842136ec4a623137ea447
102739470986812082289994655090096998170
null
216,864
The product reads data past the end, or before the beginning, of the intended buffer.
true
static int test_x509_time(int idx) { ASN1_TIME *t = NULL; int result, rv = 0; if (x509_format_tests[idx].set_string) { /* set-string mode */ t = ASN1_TIME_new(); if (t == NULL) { TEST_info("test_x509_time(%d) failed: internal error\n", idx); return 0; ...
[ "CWE-125" ]
openssl
4de66925203ca99189c842136ec4a623137ea447
269526645404222813085908213605672533344
null
507,832
The product reads data past the end, or before the beginning, of the intended buffer.
false
static int i2r_pci(X509V3_EXT_METHOD *method, PROXY_CERT_INFO_EXTENSION *pci, BIO *out, int indent) { BIO_printf(out, "%*sPath Length Constraint: ", indent, ""); if (pci->pcPathLengthConstraint) i2a_ASN1_INTEGER(out, pci->pcPathLengthConstraint); else BIO_printf(out, "infi...
[ "CWE-125" ]
openssl
23446958685a593d4d9434475734b99138902ed2
193903187053857977831915317322195799248
null
216,871
The product reads data past the end, or before the beginning, of the intended buffer.
true
static int i2r_pci(X509V3_EXT_METHOD *method, PROXY_CERT_INFO_EXTENSION *pci, BIO *out, int indent) { BIO_printf(out, "%*sPath Length Constraint: ", indent, ""); if (pci->pcPathLengthConstraint) i2a_ASN1_INTEGER(out, pci->pcPathLengthConstraint); else BIO_printf(out, "infi...
[ "CWE-125" ]
openssl
23446958685a593d4d9434475734b99138902ed2
14294012759443707391225772112986913284
null
507,853
The product reads data past the end, or before the beginning, of the intended buffer.
false
int X509_aux_print(BIO *out, X509 *x, int indent) { char oidstr[80], first; STACK_OF(ASN1_OBJECT) *trust, *reject; const unsigned char *alias, *keyid; int keyidlen; int i; if (X509_trusted(x) == 0) return 1; trust = X509_get0_trust_objects(x); reject = X509_get0_reject_objects(x)...
[ "CWE-125" ]
openssl
d9d838ddc0ed083fb4c26dd067e71aad7c65ad16
71466144283826941056026342843779202498
null
216,874
The product reads data past the end, or before the beginning, of the intended buffer.
true
int X509_aux_print(BIO *out, X509 *x, int indent) { char oidstr[80], first; STACK_OF(ASN1_OBJECT) *trust, *reject; const unsigned char *alias, *keyid; int keyidlen; int i; if (X509_trusted(x) == 0) return 1; trust = X509_get0_trust_objects(x); reject = X509_get0_reject_objects(x)...
[ "CWE-125" ]
openssl
d9d838ddc0ed083fb4c26dd067e71aad7c65ad16
232819056839493474715255171609801213940
null
507,868
The product reads data past the end, or before the beginning, of the intended buffer.
false
mail_compose_send (compose_env_t *env, int save_to) { int done = 0; int rc; char *savefile = NULL; int int_cnt; char *escape; /* Prepare environment */ rc = mu_temp_stream_create (&env->compstr, 0); if (rc) { mu_error (_("Cannot open temporary file: %s"), mu_strerror (rc)); return 1; ...
[ "Other" ]
mailutils
4befcfd015256c568121653038accbd84820198f
62731143632522437479168797364620482941
null
216,875
Unknown
true
mail_compose_send (compose_env_t *env, int save_to) { int done = 0; int rc; char *savefile = NULL; int int_cnt; char *escape; /* Prepare environment */ rc = mu_temp_stream_create (&env->compstr, 0); if (rc) { mu_error (_("Cannot open temporary file: %s"), mu_strerror (rc)); return 1; ...
[ "Other" ]
mailutils
4befcfd015256c568121653038accbd84820198f
62453656725413034811737368183894074987
null
507,901
Unknown
false
static int test_modexp_mont5(void) { BIGNUM *a = NULL, *p = NULL, *m = NULL, *d = NULL, *e = NULL; BIGNUM *b = NULL, *n = NULL, *c = NULL; BN_MONT_CTX *mont = NULL; int st = 0; if (!TEST_ptr(a = BN_new()) || !TEST_ptr(p = BN_new()) || !TEST_ptr(m = BN_new()) || !...
[ "Other" ]
openssl
336923c0c8d705cb8af5216b29a205662db0d590
4876456956283537593066107812150907521
null
216,898
Unknown
true
static int test_modexp_mont5(void) { BIGNUM *a = NULL, *p = NULL, *m = NULL, *d = NULL, *e = NULL; BIGNUM *b = NULL, *n = NULL, *c = NULL; BN_MONT_CTX *mont = NULL; int st = 0; if (!TEST_ptr(a = BN_new()) || !TEST_ptr(p = BN_new()) || !TEST_ptr(m = BN_new()) || !...
[ "Other" ]
openssl
336923c0c8d705cb8af5216b29a205662db0d590
216978871934977834239732634945106079643
null
508,262
Unknown
false
BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) /* * Returns 'ret' such that ret^2 == a (mod p), using the Tonelli/Shanks * algorithm (cf. Henri Cohen, "A Course in Algebraic Computational Number * Theory", algorithm 1.5.1). 'p' must be prime! */ { BIGNUM *ret = in; int err = ...
[ "CWE-835" ]
openssl
3118eb64934499d93db3230748a452351d1d9a65
148437002801579510497763848630732748192
null
216,907
The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.
true
BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) /* * Returns 'ret' such that ret^2 == a (mod p), using the Tonelli/Shanks * algorithm (cf. Henri Cohen, "A Course in Algebraic Computational Number * Theory", algorithm 1.5.1). 'p' must be prime, otherwise an error or * an incorrect "res...
[ "CWE-835" ]
openssl
3118eb64934499d93db3230748a452351d1d9a65
52215105009261879265880944539805400781
null
509,581
The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.
false
bool Item_singlerow_subselect::fix_length_and_dec() { if ((max_columns= engine->cols()) == 1) { if (engine->fix_length_and_dec(row= &value)) return TRUE; } else { if (!(row= (Item_cache**) current_thd->alloc(sizeof(Item_cache*) * max_columns)) || ...
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
21922196527056853976744837751349924622
null
216,944
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syn...
true
bool Item_singlerow_subselect::fix_length_and_dec() { if ((max_columns= engine->cols()) == 1) { if (engine->fix_length_and_dec(row= &value)) return TRUE; } else { if (!(row= (Item_cache**) current_thd->alloc(sizeof(Item_cache*) * max_columns)) || ...
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
190851839197055886744718866625460288710
null
511,887
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syn...
false
void handler::print_error(int error, myf errflag) { bool fatal_error= 0; DBUG_ENTER("handler::print_error"); DBUG_PRINT("enter",("error: %d",error)); if (ha_thd()->transaction_rollback_request) { /* Ensure this becomes a true error */ errflag&= ~(ME_WARNING | ME_NOTE); } int textno= -1; // impos...
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
27955513585095688463594392008685491694
null
216,966
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory...
true
void handler::print_error(int error, myf errflag) { bool fatal_error= 0; DBUG_ENTER("handler::print_error"); DBUG_PRINT("enter",("error: %d",error)); if (ha_thd()->transaction_rollback_request) { /* Ensure this becomes a true error */ errflag&= ~(ME_WARNING | ME_NOTE); } int textno= -1; // impos...
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
140441064521693307272292977060418762191
null
514,535
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory...
false
int setup_order(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, List<Item> &fields, List<Item> &all_fields, ORDER *order, bool from_window_spec) { SELECT_LEX *select = thd->lex->current_select; enum_parsing_place context_analysis_place= thd->lex->...
[ "Other" ]
server
8c34eab9688b4face54f15f89f5d62bdfd93b8a7
190127256241060835924867467882735201548
null
216,968
Unknown
true
int setup_order(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, List<Item> &fields, List<Item> &all_fields, ORDER *order, bool from_window_spec) { SELECT_LEX *select = thd->lex->current_select; enum_parsing_place context_analysis_place= thd->lex->...
[ "Other" ]
server
8c34eab9688b4face54f15f89f5d62bdfd93b8a7
244721822334748271457145214962421744794
null
514,672
Unknown
false
static int ocsp_verify_signer(X509 *signer, int response, X509_STORE *st, unsigned long flags, STACK_OF(X509) *untrusted, STACK_OF(X509) **chain) { X509_STORE_CTX *ctx = X509_STORE_CTX_new(); X509_VERIFY_PARAM *vp; int ret = -1; if (ctx == NUL...
[ "CWE-703", "CWE-295" ]
openssl
2eda98790c5c2741d76d23cc1e74b0dc4f4b391a
200342252064310179394267138211073628019
null
216,969
The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.
true
static int ocsp_verify_signer(X509 *signer, int response, X509_STORE *st, unsigned long flags, STACK_OF(X509) *untrusted, STACK_OF(X509) **chain) { X509_STORE_CTX *ctx = X509_STORE_CTX_new(); X509_VERIFY_PARAM *vp; int ret = -1; if (ctx == NUL...
[ "CWE-703", "CWE-295" ]
openssl
2eda98790c5c2741d76d23cc1e74b0dc4f4b391a
28317595167402911771391626898929555376
null
514,677
The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.
false
static int rc4_hmac_md5_set_ctx_params(void *vctx, const OSSL_PARAM params[]) { PROV_RC4_HMAC_MD5_CTX *ctx = (PROV_RC4_HMAC_MD5_CTX *)vctx; const OSSL_PARAM *p; size_t sz; if (params == NULL) return 1; p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_KEYLEN); if (p != NULL) { ...
[ "CWE-327" ]
openssl
7d56a74a96828985db7354a55227a511615f732b
16951762437284350147779281790599194453
null
216,970
The product uses a broken or risky cryptographic algorithm or protocol.
true
static int rc4_hmac_md5_set_ctx_params(void *vctx, const OSSL_PARAM params[]) { PROV_RC4_HMAC_MD5_CTX *ctx = (PROV_RC4_HMAC_MD5_CTX *)vctx; const OSSL_PARAM *p; size_t sz; if (params == NULL) return 1; p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_KEYLEN); if (p != NULL) { ...
[ "CWE-327" ]
openssl
7d56a74a96828985db7354a55227a511615f732b
283560090724124707989138779675677596303
null
514,692
The product uses a broken or risky cryptographic algorithm or protocol.
false
void OPENSSL_LH_flush(OPENSSL_LHASH *lh) { unsigned int i; OPENSSL_LH_NODE *n, *nn; if (lh == NULL) return; for (i = 0; i < lh->num_nodes; i++) { n = lh->b[i]; while (n != NULL) { nn = n->next; OPENSSL_free(n); n = nn; } lh->b...
[ "CWE-404" ]
openssl
64c85430f95200b6b51fe9475bd5203f7c19daf1
50283539431069190810887924675112822330
null
216,971
The product does not release or incorrectly releases a resource before it is made available for re-use.
true
void OPENSSL_LH_flush(OPENSSL_LHASH *lh) { unsigned int i; OPENSSL_LH_NODE *n, *nn; if (lh == NULL) return; for (i = 0; i < lh->num_nodes; i++) { n = lh->b[i]; while (n != NULL) { nn = n->next; OPENSSL_free(n); n = nn; } lh->b...
[ "CWE-404" ]
openssl
64c85430f95200b6b51fe9475bd5203f7c19daf1
206024785861340519639867630827357381256
null
514,705
The product does not release or incorrectly releases a resource before it is made available for re-use.
false
xbstream_open(ds_ctxt_t *ctxt, const char *path, MY_STAT *mystat) { ds_file_t *file; ds_stream_file_t *stream_file; ds_stream_ctxt_t *stream_ctxt; ds_ctxt_t *dest_ctxt; xb_wstream_t *xbstream; xb_wstream_file_t *xbstream_file; xb_ad(ctxt->pipe_ctxt != NULL); dest_ctxt = ctxt->pipe_ctxt; stream_ctxt = (ds...
[ "CWE-703", "CWE-667" ]
server
b1351c15946349f9daa7e5297fb2ac6f3139e4a8
273728018800782991120983464422979234458
null
216,972
The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.
true
xbstream_open(ds_ctxt_t *ctxt, const char *path, MY_STAT *mystat) { ds_file_t *file; ds_stream_file_t *stream_file; ds_stream_ctxt_t *stream_ctxt; ds_ctxt_t *dest_ctxt; xb_wstream_t *xbstream; xb_wstream_file_t *xbstream_file; xb_ad(ctxt->pipe_ctxt != NULL); dest_ctxt = ctxt->pipe_ctxt; stream_ctxt = (ds...
[ "CWE-703", "CWE-667" ]
server
b1351c15946349f9daa7e5297fb2ac6f3139e4a8
260563805285007776866278064633096201015
null
514,715
The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.
false
create_worker_threads(uint n) { comp_thread_ctxt_t *threads; uint i; threads = (comp_thread_ctxt_t *) my_malloc(sizeof(comp_thread_ctxt_t) * n, MYF(MY_FAE)); for (i = 0; i < n; i++) { comp_thread_ctxt_t *thd = threads + i; thd->num = i + 1; thd->started = FALSE; thd->cancelled = FALSE; thd->data_a...
[ "CWE-703", "CWE-667" ]
server
7c30bc38a588b22b01f11130cfe99e7f36accf94
150837438758482887133192131467470431119
null
216,974
The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.
true
create_worker_threads(uint n) { comp_thread_ctxt_t *threads; uint i; threads = (comp_thread_ctxt_t *) my_malloc(sizeof(comp_thread_ctxt_t) * n, MYF(MY_FAE)); for (i = 0; i < n; i++) { comp_thread_ctxt_t *thd = threads + i; thd->num = i + 1; thd->started = FALSE; thd->cancelled = FALSE; thd->data_a...
[ "CWE-703", "CWE-667" ]
server
7c30bc38a588b22b01f11130cfe99e7f36accf94
127703658807414499626090126701033730578
null
514,724
The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.
false
int ossl_rsaz_mod_exp_avx512_x2(BN_ULONG *res1, const BN_ULONG *base1, const BN_ULONG *exp1, const BN_ULONG *m1, const BN_ULONG *rr1, BN_ULONG k0_1, ...
[ "CWE-787" ]
openssl
4d8a88c134df634ba610ff8db1eb8478ac5fd345
281279212493812904349374813850732549132
null
216,975
The product writes data past the end, or before the beginning, of the intended buffer.
true
int ossl_rsaz_mod_exp_avx512_x2(BN_ULONG *res1, const BN_ULONG *base1, const BN_ULONG *exp1, const BN_ULONG *m1, const BN_ULONG *rr1, BN_ULONG k0_1, ...
[ "CWE-787" ]
openssl
4d8a88c134df634ba610ff8db1eb8478ac5fd345
106513977699013915976265864186197430562
null
514,727
The product writes data past the end, or before the beginning, of the intended buffer.
false
static int post_msg(struct pptp_conn_t *conn, void *buf, int size) { int n; if (conn->out_size) { log_error("pptp: buffer is not empty\n"); return -1; } again: n=write(conn->hnd.fd, buf, size); if (n < 0) { if (errno == EINTR) goto again; else if (errno == EAGAIN) n = 0; else { if (errno != EPI...
[ "CWE-787" ]
accel-ppp
a0b8bfc4e74ff31b15ccfa6c626e3bbc591ba98f
330227030877580280456793267806417303182
null
216,996
The product writes data past the end, or before the beginning, of the intended buffer.
true
static int post_msg(struct pptp_conn_t *conn, void *buf, int size) { int n; if (conn->out_size) { log_error("pptp: buffer is not empty\n"); return -1; } again: n=write(conn->hnd.fd, buf, size); if (n < 0) { if (errno == EINTR) goto again; else if (errno == EAGAIN) n = 0; else { if (errno != EPI...
[ "CWE-787" ]
accel-ppp
a0b8bfc4e74ff31b15ccfa6c626e3bbc591ba98f
312498416476134277109699024758593247542
null
515,534
The product writes data past the end, or before the beginning, of the intended buffer.
false
int ossl_rsaz_mod_exp_avx512_x2(BN_ULONG *res1, const BN_ULONG *base1, const BN_ULONG *exp1, const BN_ULONG *m1, const BN_ULONG *rr1, BN_ULONG k0_1, ...
[ "CWE-787" ]
openssl
a1f7034bbd8f0730d360211f5ba0feeaef0b7b2c
54910092100460222083027232944043080083
null
216,997
The product writes data past the end, or before the beginning, of the intended buffer.
true
int ossl_rsaz_mod_exp_avx512_x2(BN_ULONG *res1, const BN_ULONG *base1, const BN_ULONG *exp1, const BN_ULONG *m1, const BN_ULONG *rr1, BN_ULONG k0_1, ...
[ "CWE-787" ]
openssl
a1f7034bbd8f0730d360211f5ba0feeaef0b7b2c
234933701546691900771097348060847113887
null
515,562
The product writes data past the end, or before the beginning, of the intended buffer.
false
int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *ctx) { BN_CTX *new_ctx = NULL; const EC_POINT *generator = NULL; EC_POINT *tmp = NULL; size_t totalnum; size_t blocksize = ...
[ "CWE-310" ]
openssl
aab7c770353b1dc4ba045938c8fb446dd1c4531e
213211014372624519953925884438053493570
null
217,005
This weakness pertains to the use of cryptographic functions that are weak, misconfigured, or outdated, which undermines the intended protection of encrypted data and communications.
true
int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *ctx) { if ((scalar != NULL) && (num == 0)) { /* In this case we want to compute scalar * GeneratorPoint: * this codepath i...
[ "CWE-310" ]
openssl
aab7c770353b1dc4ba045938c8fb446dd1c4531e
21075151985458594913955048681357291669
null
515,645
This weakness pertains to the use of cryptographic functions that are weak, misconfigured, or outdated, which undermines the intended protection of encrypted data and communications.
false
int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) { int ret=0; int top,al,bl; BIGNUM *rr; #if defined(BN_MUL_COMBA) || defined(BN_RECURSION) int i; #endif #ifdef BN_RECURSION BIGNUM *t=NULL; int j=0,k; #endif #ifdef BN_COUNT fprintf(stderr,"BN_mul %d * %d\n",a->top,b->top); #endif bn_check...
[ "CWE-20" ]
openssl
7e4cae1d2f555cbe9226b377aff4b56c9f7ddd4d
283618452684822618273379481326746444910
null
217,006
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
true
int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) { int ret=0; int top,al,bl; BIGNUM *rr; #if defined(BN_MUL_COMBA) || defined(BN_RECURSION) int i; #endif #ifdef BN_RECURSION BIGNUM *t=NULL; int j=0,k; #endif #ifdef BN_COUNT fprintf(stderr,"BN_mul %d * %d\n",a->top,b->top); #endif bn_check...
[ "CWE-20" ]
openssl
7e4cae1d2f555cbe9226b377aff4b56c9f7ddd4d
253099877427386680587350648200393845027
null
515,676
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
false
BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) /* * Returns 'ret' such that ret^2 == a (mod p), using the Tonelli/Shanks * algorithm (cf. Henri Cohen, "A Course in Algebraic Computational Number * Theory", algorithm 1.5.1). 'p' must be prime! */ { BIGNUM *ret = in; int err = ...
[ "Other" ]
openssl
9eafb53614bf65797db25f467946e735e1b43dc9
292506106842733760171896209269368748784
null
217,010
Unknown
true
BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) /* * Returns 'ret' such that ret^2 == a (mod p), using the Tonelli/Shanks * algorithm (cf. Henri Cohen, "A Course in Algebraic Computational Number * Theory", algorithm 1.5.1). 'p' must be prime, otherwise an error or * an incorrect "res...
[ "Other" ]
openssl
9eafb53614bf65797db25f467946e735e1b43dc9
336344315856147528775351986111268776517
null
515,799
Unknown
false
static void loongarch_cpu_reset(DeviceState *dev) { CPUState *cs = CPU(dev); LoongArchCPU *cpu = LOONGARCH_CPU(cs); LoongArchCPUClass *lacc = LOONGARCH_CPU_GET_CLASS(cpu); CPULoongArchState *env = &cpu->env; lacc->parent_reset(dev); env->fcsr0_mask = FCSR0_M1 | FCSR0_M2 | FCSR0_M3; env->fc...
[ "Other" ]
qemu
3517fb726741c109cae7995f9ea46f0cab6187d6
182659130472244166990759470535201909060
null
217,011
Unknown
true
static void loongarch_cpu_reset(DeviceState *dev) { CPUState *cs = CPU(dev); LoongArchCPU *cpu = LOONGARCH_CPU(cs); LoongArchCPUClass *lacc = LOONGARCH_CPU_GET_CLASS(cpu); CPULoongArchState *env = &cpu->env; lacc->parent_reset(dev); env->fcsr0_mask = FCSR0_M1 | FCSR0_M2 | FCSR0_M3; env->fc...
[ "Other" ]
qemu
3517fb726741c109cae7995f9ea46f0cab6187d6
93608174149963211075020929463024327469
null
515,809
Unknown
false
void KPasswordDlg::keyPressed( QKeyEvent *e ) { static bool waitForAuthentication = false; if (!waitForAuthentication) { switch ( e->key() ) { case Key_Backspace: { int len = password.length(); if ( len ) { password.truncate( len - 1 ); if( stars ) showStars(); } } break; ...
[ "Other" ]
kde1-kdebase
04906bd5de2f220bf100b605dad37b4a1d9a91a6
231140816764579635988151219825409932790
null
217,012
Unknown
true
void KPasswordDlg::keyPressed( QKeyEvent *e ) { static bool waitForAuthentication = false; if (!waitForAuthentication) { switch ( e->key() ) { case Key_Backspace: { int len = password.length(); if ( len ) { password.truncate( len - 1 ); if( stars ) showStars(); } } break; ...
[ "Other" ]
kde1-kdebase
04906bd5de2f220bf100b605dad37b4a1d9a91a6
139755303808933201288753883632397773108
null
515,830
Unknown
false
decode_entities(pTHX_ SV* sv, HV* entity2char, bool expand_prefix) { STRLEN len; char *s = SvPV_force(sv, len); char *t = s; char *end = s + len; char *ent_start; char *repl; STRLEN repl_len; #ifdef UNICODE_HTML_PARSER char buf[UTF8_MAXLEN]; int repl_utf8; int high_surrogate = 0...
[ "CWE-20" ]
html-parser
b9aae1e43eb2c8e989510187cff0ba3e996f9a4c
187610747963810386710262077245859297264
null
217,013
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
true
decode_entities(pTHX_ SV* sv, HV* entity2char, bool expand_prefix) { STRLEN len; char *s = SvPV_force(sv, len); char *t = s; char *end = s + len; char *ent_start; char *repl; STRLEN repl_len; #ifdef UNICODE_HTML_PARSER char buf[UTF8_MAXLEN]; int repl_utf8; int high_surrogate = 0...
[ "CWE-20" ]
html-parser
b9aae1e43eb2c8e989510187cff0ba3e996f9a4c
325993721631403310311279301956401253830
null
515,837
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
false
void* leak_malloc(size_t bytes) { // allocate enough space infront of the allocation to store the pointer for // the alloc structure. This will making free'ing the structer really fast! // 1. allocate enough memory and include our header // 2. set the base pointer to be right after our header void...
[ "CWE-189" ]
platform_bionic
7f5aa4f35e23fd37425b3a5041737cdf58f87385
21646901654774472232158839988526384309
null
217,024
This weakness involves numeric computation errors, such as integer overflows, underflows, or precision losses, which can lead to miscalculations and exploitable behaviors in software.
true
void* leak_malloc(size_t bytes) { // allocate enough space infront of the allocation to store the pointer for // the alloc structure. This will making free'ing the structer really fast! // 1. allocate enough memory and include our header // 2. set the base pointer to be right after our header size...
[ "CWE-189" ]
platform_bionic
7f5aa4f35e23fd37425b3a5041737cdf58f87385
177799214670583993144906362325625415112
null
515,997
This weakness involves numeric computation errors, such as integer overflows, underflows, or precision losses, which can lead to miscalculations and exploitable behaviors in software.
false
void* chk_malloc(size_t bytes) { char* buffer = (char*)dlmalloc(bytes + CHK_OVERHEAD_SIZE); if (buffer) { memset(buffer, CHK_SENTINEL_VALUE, bytes + CHK_OVERHEAD_SIZE); size_t offset = dlmalloc_usable_size(buffer) - sizeof(size_t); *(size_t *)(buffer + offset) = bytes; buffer += ...
[ "CWE-189" ]
platform_bionic
7f5aa4f35e23fd37425b3a5041737cdf58f87385
97489279078351973676080474075826498926
null
217,025
This weakness involves numeric computation errors, such as integer overflows, underflows, or precision losses, which can lead to miscalculations and exploitable behaviors in software.
true
void* chk_malloc(size_t bytes) { size_t size = bytes + CHK_OVERHEAD_SIZE; if (size < bytes) { // Overflow. return NULL; } uint8_t* buffer = (uint8_t*) dlmalloc(size); if (buffer) { memset(buffer, CHK_SENTINEL_VALUE, bytes + CHK_OVERHEAD_SIZE); size_t offset = dlmalloc_usable_...
[ "CWE-189" ]
platform_bionic
7f5aa4f35e23fd37425b3a5041737cdf58f87385
209950346779666462341836950596949881148
null
515,993
This weakness involves numeric computation errors, such as integer overflows, underflows, or precision losses, which can lead to miscalculations and exploitable behaviors in software.
false
void* leak_memalign(size_t alignment, size_t bytes) { // we can just use malloc if (alignment <= MALLOC_ALIGNMENT) return leak_malloc(bytes); // need to make sure it's a power of two if (alignment & (alignment-1)) alignment = 1L << (31 - __builtin_clz(alignment)); // here, aligment...
[ "CWE-189" ]
platform_bionic
7f5aa4f35e23fd37425b3a5041737cdf58f87385
145019312092407107448963839947912983213
null
217,026
This weakness involves numeric computation errors, such as integer overflows, underflows, or precision losses, which can lead to miscalculations and exploitable behaviors in software.
true
void* leak_memalign(size_t alignment, size_t bytes) { // we can just use malloc if (alignment <= MALLOC_ALIGNMENT) return leak_malloc(bytes); // need to make sure it's a power of two if (alignment & (alignment-1)) alignment = 1L << (31 - __builtin_clz(alignment)); // here, aligment...
[ "CWE-189" ]
platform_bionic
7f5aa4f35e23fd37425b3a5041737cdf58f87385
49730111448751383395644458206834359833
null
516,002
This weakness involves numeric computation errors, such as integer overflows, underflows, or precision losses, which can lead to miscalculations and exploitable behaviors in software.
false
NEDMALLOCNOALIASATTR NEDMALLOCPTRATTR void * nedpcalloc(nedpool *p, size_t no, size_t size) THROWSPEC { unsigned flags=NEDMALLOC_FORCERESERVE(p, 0, no*size); return nedpmalloc2(p, size*no, 0, M2_ZERO_MEMORY|flags); }
[ "CWE-189" ]
nedmalloc
2965eca30c408c13473c4146a9d47d547d288db1
232267107074196371293811087678195081036
null
217,027
This weakness involves numeric computation errors, such as integer overflows, underflows, or precision losses, which can lead to miscalculations and exploitable behaviors in software.
true
NEDMALLOCNOALIASATTR NEDMALLOCPTRATTR void * nedpmalloc(nedpool *p, size_t size) THROWSPEC { unsigned flags=NEDMALLOC_FORCERESERVE(p, 0, size); return nedpmalloc2(p, size, 0, flags); }
[ "CWE-189" ]
nedmalloc
2965eca30c408c13473c4146a9d47d547d288db1
333845658973022119224638740907503700050
null
516,019
This weakness involves numeric computation errors, such as integer overflows, underflows, or precision losses, which can lead to miscalculations and exploitable behaviors in software.
false
int squidclamav_check_preview_handler(char *preview_data, int preview_data_len, ci_request_t * req) { ci_headers_list_t *req_header; struct http_info httpinf; av_req_data_t *data = ci_service_data(req); char *clientip; struct hostent *clientname; unsigned long ip; char *username; ...
[ "CWE-119" ]
squidclamav
80f74451f628264d1d9a1f1c0bbcebc932ba5e00
252770519274379219458962290471119035999
null
217,028
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
true
int squidclamav_check_preview_handler(char *preview_data, int preview_data_len, ci_request_t * req) { ci_headers_list_t *req_header; struct http_info httpinf; av_req_data_t *data = ci_service_data(req); char *clientip; struct hostent *clientname; unsigned long ip; char *username; ...
[ "CWE-119" ]
squidclamav
80f74451f628264d1d9a1f1c0bbcebc932ba5e00
238549687224860210602361097849872992362
null
516,090
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
false
KCleanup::expandVariables( const KFileInfo * item, const QString & unexpanded ) const { QString expanded = unexpanded; expanded.replace( QRegExp( "%p" ), "'" + QString::fromLocal8Bit( item->url() ) + "'" ); expanded.replace( QRegExp( "%n" ), "'" + QString::fromLocal8Bit( item->name()...
[ "Other" ]
k4dirstat
1ad2e96d73fa06cd9be0f3749b337c03575016aa
148916772223876114951487218225674088617
null
217,075
Unknown
true
KCleanup::expandVariables( const KFileInfo * item, const QString & unexpanded ) const { QString expanded = unexpanded; QString url = QString::fromLocal8Bit( item->url() ).replace("'", "'\\''"); expanded.replace( QRegExp( "%p" ), "'" + url + "'" ); QString name = QString::fromLocal8Bit( item->name(...
[ "Other" ]
k4dirstat
1ad2e96d73fa06cd9be0f3749b337c03575016aa
97451115947545184360038968307132081814
null
516,494
Unknown
false
parse_user_name(char *user_input, char **ret_username) { register char *ptr; register int index = 0; char username[PAM_MAX_RESP_SIZE]; /* Set the default value for *ret_username */ *ret_username = NULL; /* * Set the initial value for username - this is a buffer holds * the user name. */ bzero((void *)use...
[ "CWE-120" ]
illumos-gate
1d276e0b382cf066dae93640746d8b4c54d15452
260781068507969669133249027929282589385
null
217,130
The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow.
true
parse_user_name(char *user_input, char **ret_username) { register char *ptr; register int index = 0; char username[PAM_MAX_RESP_SIZE]; /* Set the default value for *ret_username */ *ret_username = NULL; /* * Set the initial value for username - this is a buffer holds * the user name. */ bzero((void *)use...
[ "CWE-120" ]
illumos-gate
1d276e0b382cf066dae93640746d8b4c54d15452
24919518180499948984963995718864185618
null
516,902
The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow.
false
main_get_appheader (xd3_stream *stream, main_file *ifile, main_file *output, main_file *sfile) { uint8_t *apphead; usize_t appheadsz; int ret; /* The user may disable the application header. Once the appheader * is set, this disables setting it again. */ if (! option_use_appheader) { return; } r...
[ "CWE-119" ]
xdelta-devel
ef93ff74203e030073b898c05e8b4860b5d09ef2
275373469317700633182439595373805514051
null
217,132
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
true
main_get_appheader (xd3_stream *stream, main_file *ifile, main_file *output, main_file *sfile) { uint8_t *apphead; usize_t appheadsz; int ret; /* The user may disable the application header. Once the appheader * is set, this disables setting it again. */ if (! option_use_appheader) { return; } r...
[ "CWE-119" ]
xdelta-devel
ef93ff74203e030073b898c05e8b4860b5d09ef2
191465324098688620085127977280830394703
null
517,037
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
false
static void add_password(AUTH_HDR *request, unsigned char type, CONST char *password, char *secret) { MD5_CTX md5_secret, my_md5; unsigned char misc[AUTH_VECTOR_LEN]; int i; int length = strlen(password); unsigned char hashed[256 + AUTH_PASS_LEN]; /* can't be longer than this */ unsigned char *vector; attribute_...
[ "CWE-787" ]
pam_radius
01173ec2426627dbb1e0d96c06c3ffa0b14d36d0
179035526349789262231741690226373006053
null
217,161
The product writes data past the end, or before the beginning, of the intended buffer.
true
static void add_password(AUTH_HDR *request, unsigned char type, CONST char *password, char *secret) { MD5_CTX md5_secret, my_md5; unsigned char misc[AUTH_VECTOR_LEN]; int i; int length = strlen(password); unsigned char hashed[256 + AUTH_PASS_LEN]; /* can't be longer than this */ unsigned char *vector; attribute_...
[ "CWE-787" ]
pam_radius
01173ec2426627dbb1e0d96c06c3ffa0b14d36d0
167941960835446777329148180192080310949
null
517,189
The product writes data past the end, or before the beginning, of the intended buffer.
false
did_set_string_option ( int opt_idx, /* index in options[] table */ char_u **varp, /* pointer to the option variable */ int new_value_alloced, /* new value was allocated */ char_u *oldval, /* previous value of the option ...
[ "CWE-20" ]
neovim
4fad66fbe637818b6b3d6bc5d21923ba72795040
226168399990299728799038083393659192216
null
217,162
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
true
did_set_string_option ( int opt_idx, /* index in options[] table */ char_u **varp, /* pointer to the option variable */ int new_value_alloced, /* new value was allocated */ char_u *oldval, /* previous value of the option ...
[ "CWE-20" ]
neovim
4fad66fbe637818b6b3d6bc5d21923ba72795040
40220503311682989092971097258466584865
null
517,286
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
false
static char x2c(char *hex) { register char digit; digit = ((hex[0] >= 'A') ? ((hex[0] & 0xdf) - 'A')+10 : (hex[0] - '0')); digit *= 16; digit += (hex[1] >= 'A' ? ((hex[1] & 0xdf) - 'A')+10 : (hex[1] - '0')); return(digit); }
[ "CWE-125" ]
monit
f12d0cdb42d4e74dffe1525d4062c815c48ac57a
138454520593983181536402012314429970625
null
217,177
The product reads data past the end, or before the beginning, of the intended buffer.
true
static char _x2c(char *hex) { register char digit; digit = ((hex[0] >= 'A') ? ((hex[0] & 0xdf) - 'A')+10 : (hex[0] - '0')); digit *= 16; digit += (hex[1] >= 'A' ? ((hex[1] & 0xdf) - 'A')+10 : (hex[1] - '0')); return(digit); }
[ "CWE-125" ]
monit
f12d0cdb42d4e74dffe1525d4062c815c48ac57a
138535708238441135113329058361494594059
null
517,462
The product reads data past the end, or before the beginning, of the intended buffer.
false
ParseNodePtr Parser::ParseTerm(BOOL fAllowCall, LPCOLESTR pNameHint, uint32 *pHintLength, uint32 *pShortNameOffset, _Inout_opt_ IdentToken* pToken /*= nullptr*/, bool fUnaryOrParen /*= false*/, _Out_opt_ BOOL* pfCanAssign /*= nullptr*/, _Inout_opt_ BOOL* pfLikelyPattern /*= nullptr*/, _O...
[ "CWE-119" ]
ChakraCore
402f3d967c0a905ec5b9ca9c240783d3f2c15724
129391742347079953375542153442850295888
null
217,178
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
true
ParseNodePtr Parser::ParseTerm(BOOL fAllowCall, LPCOLESTR pNameHint, uint32 *pHintLength, uint32 *pShortNameOffset, _Inout_opt_ IdentToken* pToken /*= nullptr*/, bool fUnaryOrParen /*= false*/, _Out_opt_ BOOL* pfCanAssign /*= nullptr*/, _Inout_opt_ BOOL* pfLikelyPattern /*= nullptr*/, _O...
[ "CWE-119" ]
ChakraCore
402f3d967c0a905ec5b9ca9c240783d3f2c15724
211994494161440665520626017502737097979
null
517,605
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
false
unsigned CjfifDecode::DecodeMarker() { TCHAR acIdentifier[MAX_IDENTIFIER]; CString strTmp; CString strFull; // Used for concatenation unsigned nLength; // General purpose unsigned nTmpVal; unsigned nCode; unsigned long nPosEnd; unsigned long nPosSaved; // General-purpose saved positio...
[ "CWE-369" ]
JPEGsnoop
b4e458612d4294e0cfe01dbf1c0b09a07a8133a4
94725122909369844201681052494733336750
null
217,184
The product divides a value by zero.
true
unsigned CjfifDecode::DecodeMarker() { TCHAR acIdentifier[MAX_IDENTIFIER]; CString strTmp; CString strFull; // Used for concatenation unsigned nLength; // General purpose unsigned nTmpVal; unsigned nCode; unsigned long nPosEnd; unsigned long nPosSaved; // General-purpose saved positio...
[ "CWE-369" ]
JPEGsnoop
b4e458612d4294e0cfe01dbf1c0b09a07a8133a4
176760136959220877073871349623351198230
null
518,319
The product divides a value by zero.
false
string sanitize_proprietary_tags(string input_string) { unsigned int i; size_t input_string_size; bool strip = false; bool tag_open = false; int tag_open_idx = 0; //Are we within < > ? bool closing_tag_open = false; //Are we within </ > ? int orig_tag_open_idx = 0; bool proprietary_tag = false; //Are we...
[ "CWE-119" ]
libofx
a70934eea95c76a7737b83773bffe8738935082d
4377857417207398189830361869636063173
null
217,206
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
true
string sanitize_proprietary_tags(string input_string) { unsigned int i; bool strip = false; bool tag_open = false; int tag_open_idx = 0; //Are we within < > ? bool closing_tag_open = false; //Are we within </ > ? int orig_tag_open_idx = 0; bool proprietary_tag = false; //Are we within a proprietary elemen...
[ "CWE-119" ]
libofx
a70934eea95c76a7737b83773bffe8738935082d
9098451714533868055080607438881124267
null
518,533
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
false
void Con_Dump_f( void ) { int l, x, i; short *line; fileHandle_t f; int bufferlen; char *buffer; char filename[MAX_QPATH]; if ( Cmd_Argc() != 2 ) { Com_Printf( "usage: condump <filename>\n" ); return; } Q_strncpyz( filename, Cmd_Argv( 1 ), sizeof( filename ) ); COM_DefaultExtension( filename, sizeof(...
[ "Other" ]
iortcw
11a83410153756ae350a82ed41b08d128ff7f998
303020608578679839633943687236930970953
null
217,217
Unknown
true
void Con_Dump_f( void ) { int l, x, i; short *line; fileHandle_t f; int bufferlen; char *buffer; char filename[MAX_QPATH]; if ( Cmd_Argc() != 2 ) { Com_Printf( "usage: condump <filename>\n" ); return; } Q_strncpyz( filename, Cmd_Argv( 1 ), sizeof( filename ) ); COM_DefaultExtension( filename, sizeof(...
[ "Other" ]
iortcw
11a83410153756ae350a82ed41b08d128ff7f998
59489771750471850188333794426810220513
null
519,025
Unknown
false
int Bind(const Node& node, int max_retry) override { receiver_ = zmq_socket(context_, ZMQ_ROUTER); CHECK(receiver_ != NULL) << "create receiver socket failed: " << zmq_strerror(errno); int local = GetEnv("DMLC_LOCAL", 0); std::string addr = local ? "ipc:///tmp/" : "tcp://*:"; int port = no...
[ "CWE-200" ]
ps-lite
4be817e8b03e7e92517e91f2dfcc50865e91c6ea
296717099701833093883262611190369560316
null
217,218
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
true
int Bind(const Node& node, int max_retry) override { receiver_ = zmq_socket(context_, ZMQ_ROUTER); CHECK(receiver_ != NULL) << "create receiver socket failed: " << zmq_strerror(errno); int local = GetEnv("DMLC_LOCAL", 0); std::string hostname = node.hostname.empty() ? "*" : node.hostname; ...
[ "CWE-200" ]
ps-lite
4be817e8b03e7e92517e91f2dfcc50865e91c6ea
31735977655022379106079125722393812906
null
519,035
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
false
inline bool loadModule(const char* filename, IR::Module& outModule) { // Read the specified file into an array. std::vector<U8> fileBytes; if(!loadFile(filename, fileBytes)) { return false; } // If the file starts with the WASM binary magic number, load it as a binary irModule. if(*(U32*)fileBytes.data() == 0x6d7...
[ "CWE-125" ]
WAVM
2de6cf70c5ef31e22ed119a25ac2daeefd3d18a1
263350585901057157154638918231600726212
null
217,219
The product reads data past the end, or before the beginning, of the intended buffer.
true
inline bool loadModule(const char* filename, IR::Module& outModule) { // Read the specified file into an array. std::vector<U8> fileBytes; if(!loadFile(filename, fileBytes)) { return false; } // If the file starts with the WASM binary magic number, load it as a binary irModule. if(fileBytes.size() >= 4 && *(U32*)...
[ "CWE-125" ]
WAVM
2de6cf70c5ef31e22ed119a25ac2daeefd3d18a1
117563492414894198096947233907540197297
null
519,044
The product reads data past the end, or before the beginning, of the intended buffer.
false
static int run(const CommandLineOptions& options) { IR::Module irModule; // Load the module. if(!loadModule(options.filename, irModule)) { return EXIT_FAILURE; } if(options.onlyCheck) { return EXIT_SUCCESS; } // Compile the module. Runtime::Module* module = nullptr; if(!options.precompiled) { module = Runtime:...
[ "CWE-476" ]
WAVM
31d670b6489e6d708c3b04b911cdf14ac43d846d
329139868232960802075311242455165678292
null
217,220
The product dereferences a pointer that it expects to be valid but is NULL.
true
static int run(const CommandLineOptions& options) { IR::Module irModule; // Load the module. if(!loadModule(options.filename, irModule)) { return EXIT_FAILURE; } if(options.onlyCheck) { return EXIT_SUCCESS; } // Compile the module. Runtime::Module* module = nullptr; if(!options.precompiled) { module = Runtime:...
[ "CWE-476" ]
WAVM
31d670b6489e6d708c3b04b911cdf14ac43d846d
201662277112997874179773987187074867296
null
519,050
The product dereferences a pointer that it expects to be valid but is NULL.
false
int main(int argc, const char *argv[]) { struct group *grent; const char *cmd; const char *path; int i; struct passwd *pw; grent = getgrnam(ABUILD_GROUP); if (grent == NULL) errx(1, "%s: Group not found", ABUILD_GROUP); char *name = NULL; pw = getpwuid(getuid()); if (pw) name = pw->pw_name; if (!is_in...
[ "CWE-862" ]
abuild
4f90ce92778d0ee302e288def75591b96a397c8b
143628468175822743209692080886460222446
null
217,235
The product does not perform an authorization check when an actor attempts to access a resource or perform an action.
true
int main(int argc, const char *argv[]) { struct group *grent; const char *cmd; const char *path; int i; struct passwd *pw; grent = getgrnam(ABUILD_GROUP); if (grent == NULL) errx(1, "%s: Group not found", ABUILD_GROUP); char *name = NULL; pw = getpwuid(getuid()); if (pw) name = pw->pw_name; if (!is_in...
[ "CWE-862" ]
abuild
4f90ce92778d0ee302e288def75591b96a397c8b
75998067276080334492995042096800811106
null
519,115
The product does not perform an authorization check when an actor attempts to access a resource or perform an action.
false
void send_file_direct(char *file_name) { int fh, i, length, delta; char str[MAX_PATH_LENGTH], dir[MAX_PATH_LENGTH], charset[80]; getcwd(dir, sizeof(dir)); fh = open(file_name, O_RDONLY | O_BINARY); if (fh > 0) { lseek(fh, 0, SEEK_END); length = TELL(fh); lseek(fh, 0, SEEK_SET); ...
[ "CWE-79" ]
elog
993bed4923c88593cc6b1186e0d1b9564994a25a
267835927115147499389934724874856171200
null
217,243
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
true
void send_file_direct(char *file_name) { int fh, i, length, delta; char str[MAX_PATH_LENGTH], dir[MAX_PATH_LENGTH], charset[80]; getcwd(dir, sizeof(dir)); fh = open(file_name, O_RDONLY | O_BINARY); if (fh > 0) { lseek(fh, 0, SEEK_END); length = TELL(fh); lseek(fh, 0, SEEK_SET); ...
[ "CWE-79" ]
elog
993bed4923c88593cc6b1186e0d1b9564994a25a
184268512206261144818013410223816296123
null
519,320
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
false
ChunkedDecode(Request *reqPtr, bool update) { const Tcl_DString *bufPtr; const char *end, *chunkStart; bool success = NS_TRUE; NS_NONNULL_ASSERT(reqPtr != NULL); bufPtr = &reqPtr->buffer; end = bufPtr->string + bufPtr->length; chunkStart = bufPtr->string + reqPtr->chunk...
[ "CWE-787" ]
naviserver
a5c3079f1d8996d5f34c9384a440acf3519ca3bb
79929238152975866827375336558768462544
null
217,247
The product writes data past the end, or before the beginning, of the intended buffer.
true
ChunkedDecode(Request *reqPtr, bool update) { const Tcl_DString *bufPtr; const char *end, *chunkStart; SockState result = SOCK_READY; NS_NONNULL_ASSERT(reqPtr != NULL); bufPtr = &reqPtr->buffer; end = bufPtr->string + bufPtr->length; chunkStart = bufPtr->string + reqPtr->chu...
[ "CWE-787" ]
naviserver
a5c3079f1d8996d5f34c9384a440acf3519ca3bb
46377551344842501013718525564349347367
null
519,503
The product writes data past the end, or before the beginning, of the intended buffer.
false
std::string TarFileReader::extract(const string &_path) { if (_path.empty()) THROW("path cannot be empty"); if (!hasMore()) THROW("No more tar files"); string path = _path; if (SystemUtilities::isDirectory(path)) path += "/" + getFilename(); LOG_DEBUG(5, "Extracting: " << path); return extract(*SystemUti...
[ "CWE-22" ]
cbang
1c1dba62bd3e6fa9d0d0c0aa21926043b75382c7
227363812030040044465918830196000528831
null
217,250
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the...
true
std::string TarFileReader::extract(const string &_path) { if (_path.empty()) THROW("path cannot be empty"); if (!hasMore()) THROW("No more tar files"); string path = _path; if (SystemUtilities::isDirectory(path)) { path += "/" + getFilename(); // Check that path is under the target directory strin...
[ "CWE-22" ]
cbang
1c1dba62bd3e6fa9d0d0c0aa21926043b75382c7
126216347100984769286755428881470936529
null
519,599
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the...
false
void CharCodeToUnicode::addMapping(CharCode code, char *uStr, int n, int offset) { CharCode oldLen, i; Unicode u; char uHex[5]; int j; if (code >= mapLen) { oldLen = mapLen; mapLen = (code + 256) & ~255; map = (Unicode *)greallocn(map, mapLen, sizeof(Unicode)); for (i = oldLen; i < map...
[ "CWE-120" ]
pdf2json
80bf71f16c804108fd933e267fe31692aaa509b4
57496440921255867977744863380757802490
null
217,251
The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow.
true
void CharCodeToUnicode::addMapping(CharCode code, char *uStr, int n, int offset) { CharCode oldLen, i; Unicode u; char uHex[5]; int j; if (code >= mapLen) { oldLen = mapLen; mapLen = (code + 256) & ~255; if (unlikely(code >= mapLen)) { error(-1, "Illegal code value in CharCodeToUnico...
[ "CWE-120" ]
pdf2json
80bf71f16c804108fd933e267fe31692aaa509b4
89702516797840072167533563063616513361
null
519,625
The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow.
false
PLT_HttpServer::ServeFile(const NPT_HttpRequest& request, const NPT_HttpRequestContext& context, NPT_HttpResponse& response, NPT_String file_path) { NPT_InputStreamReference stream; NPT_File ...
[ "CWE-22" ]
Platinum
9a4ceaccb1585ec35c45fd8e2585538fff6a865e
233670755210708997692038549902845020391
null
217,252
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the...
true
PLT_HttpServer::ServeFile(const NPT_HttpRequest& request, const NPT_HttpRequestContext& context, NPT_HttpResponse& response, NPT_String file_path) { NPT_InputStreamReference stream; NPT_File ...
[ "CWE-22" ]
Platinum
9a4ceaccb1585ec35c45fd8e2585538fff6a865e
329340563999228006325201950312908412659
null
519,628
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the...
false
static Jsi_RC NumberToPrecisionCmd(Jsi_Interp *interp, Jsi_Value *args, Jsi_Value *_this, Jsi_Value **ret, Jsi_Func *funcPtr) { char buf[100]; int prec = 0, skip = 0; Jsi_Number num; Jsi_Value *v; ChkStringN(_this, funcPtr, v); if (Jsi_GetIntFromValue(interp, Jsi_ValueArrayIndex(interp, args...
[ "CWE-120" ]
jsish
430ea27accd4d4ffddc946c9402e7c9064835a18
227793545891636026261642522398609489207
null
217,285
The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow.
true
static Jsi_RC NumberToPrecisionCmd(Jsi_Interp *interp, Jsi_Value *args, Jsi_Value *_this, Jsi_Value **ret, Jsi_Func *funcPtr) { char buf[JSI_MAX_NUMBER_STRING*2]; int prec = 0, skip = 0; Jsi_Number num; Jsi_Value *v; ChkStringN(_this, funcPtr, v); if (Jsi_GetIntFromValue(interp, Jsi_ValueArr...
[ "CWE-120" ]
jsish
430ea27accd4d4ffddc946c9402e7c9064835a18
331937973223465695797475682525756761160
null
520,296
The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow.
false
bool Decoder::canSplitFunctionOn( utils::Address addr, llvm::BasicBlock* splitBb, std::set<llvm::BasicBlock*>& newFncStarts) { newFncStarts.insert(splitBb); auto* f = splitBb->getParent(); auto fAddr = getFunctionAddress(f); auto fSzIt = _fnc2sz.find(f); if (fSzIt != _fnc2sz.end()) { if (fAddr <= addr &...
[ "CWE-787" ]
retdec
517298bafaaff0a8e3dd60dd055a67c41b545807
324472588665681411660008121469061451143
null
217,327
The product writes data past the end, or before the beginning, of the intended buffer.
true
bool Decoder::canSplitFunctionOn( utils::Address addr, llvm::BasicBlock* splitBb, std::set<llvm::BasicBlock*>& newFncStarts) { newFncStarts.insert(splitBb); auto* f = splitBb->getParent(); auto fAddr = getFunctionAddress(f); auto fSzIt = _fnc2sz.find(f); if (fSzIt != _fnc2sz.end()) { if (fAddr <= addr &...
[ "CWE-787" ]
retdec
517298bafaaff0a8e3dd60dd055a67c41b545807
233302201956625152068667191302051945266
null
520,976
The product writes data past the end, or before the beginning, of the intended buffer.