project
stringclasses
633 values
commit_id
stringlengths
7
81
target
int64
0
1
func
stringlengths
5
484k
cwe
stringclasses
131 values
big_vul_idx
float64
0
189k
idx
int64
0
522k
hash
stringlengths
34
39
size
float64
1
24k
message
stringlengths
0
11.5k
dataset
stringclasses
1 value
openssl
ca989269a2876bae79393bd54c3e72d49975fc75
1
long ssl_get_algorithm2(SSL *s) { long alg2 = s->s3->tmp.new_cipher->algorithm2; if (TLS1_get_version(s) >= TLS1_2_VERSION && alg2 == (SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF)) return SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256; return alg2; }
CWE-310
177,739
0
255087747659226932756944884868284698117
null
null
null
savannah
190cef6eed37d0e73a73c1e205eb31d45ab60a3c
1
gnutls_session_get_data (gnutls_session_t session, void *session_data, size_t * session_data_size) { gnutls_datum_t psession; int ret; if (session->internals.resumable == RESUME_FALSE) return GNUTLS_E_INVALID_SESSION; psession.data = session_data; ret = _gnutls_session_pack (s...
CWE-119
177,741
1
266005388725654386397960628110885023158
null
null
null
savannah
e82ef4545e9e98cbcb032f55d7c750b81e3a0450
1
gnutls_session_get_data (gnutls_session_t session, void *session_data, size_t * session_data_size) { gnutls_datum_t psession; int ret; if (session->internals.resumable == RESUME_FALSE) return GNUTLS_E_INVALID_SESSION; psession.data = session_data; ret = _gnutls_session_pack (s...
CWE-119
177,742
2
162619476999663411812822607346255778028
null
null
null
savannah
075d7556964f5a871a73c22ac4b69f5361295099
1
getftp (struct url *u, wgint passed_expected_bytes, wgint *qtyread, wgint restval, ccon *con, int count, wgint *last_expected_bytes, FILE *warc_tmp) { int csock, dtsock, local_sock, res; uerr_t err = RETROK; /* appease the compiler */ FILE *fp; char *respline, *tms; const char *user...
CWE-200
177,746
3
114753069609161113628525870463495041364
null
null
null
savannah
8794e8d229dc9fe29ea31424883433d4880ef408
1
bgp_attr_unknown (struct bgp_attr_parser_args *args) { bgp_size_t total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->peer; struct attr *const attr = args->attr; u_char *const startp = args->startp; const u_char type = args->type; const u_char flag = args->fla...
177,747
4
330723812404048522826356075144698476813
null
null
null
ghostscript
83d4dae44c71816c084a635550acc1a51529b881
1
void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_colorspace *is, fz_colorspace *ds, fz_colorspace *ss, const fz_color_params *params) { int n = ss->n; fz_cached_color_converter *cached = fz_malloc_struct(ctx, fz_cached_color_converter); cc->opaque = cached; cc->convert = fz_cached_co...
CWE-20
177,748
5
183139468890710880163111516517773812467
null
null
null
ghostscript
f597300439e62f5e921f0d7b1e880b5c1a1f1607
1
add_range(fz_context *ctx, pdf_cmap *cmap, unsigned int low, unsigned int high, unsigned int out, int check_for_overlap, int many) { int current; cmap_splay *tree; if (low > high) { fz_warn(ctx, "range limits out of range in cmap %s", cmap->cmap_name); return; } tree = cmap->tree; if (cmap->tlen) { uns...
CWE-416
177,749
6
73361849657881456808355395187124534685
null
null
null
ghostscript
4dcc6affe04368461310a21238f7e1871a752a05
1
begin_softmask(fz_context *ctx, pdf_run_processor *pr, softmask_save *save) { pdf_gstate *gstate = pr->gstate + pr->gtop; pdf_xobject *softmask = gstate->softmask; fz_rect mask_bbox; fz_matrix tos_save[2], save_ctm; fz_matrix mask_matrix; fz_colorspace *mask_colorspace; save->softmask = softmask; if (softmask ...
CWE-416
177,750
7
213010027523017884356658697073580305774
null
null
null
ghostscript
71ceebcf56e682504da22c4035b39a2d451e8ffd
1
add_range(fz_context *ctx, pdf_cmap *cmap, unsigned int low, unsigned int high, unsigned int out, int check_for_overlap, int many) { int current; cmap_splay *tree; if (low > high) { fz_warn(ctx, "range limits out of range in cmap %s", cmap->cmap_name); return; } tree = cmap->tree; if (cmap->tlen) { uns...
CWE-416
177,751
8
72963719227623516762803191293835350908
null
null
null
ghostscript
b2e7d38e845c7d4922d05e6e41f3a2dc1bc1b14a
1
pdf_show_image(fz_context *ctx, pdf_run_processor *pr, fz_image *image) { pdf_gstate *gstate = pr->gstate + pr->gtop; fz_matrix image_ctm; fz_rect bbox; softmask_save softmask = { NULL }; if (pr->super.hidden) return; break; case PDF_MAT_SHADE: if (gsta...
CWE-20
177,752
9
327424409628836476675717770567987598130
null
null
null
savannah
c15c42ccd1e2377945fd0414eca1a49294bff454
1
sparse_dump_region (struct tar_sparse_file *file, size_t i) { union block *blk; off_t bytes_left = file->stat_info->sparse_map[i].numbytes; if (!lseek_or_error (file, file->stat_info->sparse_map[i].offset)) return false; while (bytes_left > 0) { size_t bufsize = (bytes_left > BLOCKSIZE) ? BLOCKS...
CWE-835
177,768
23
265039722963046446329719176641029797849
null
null
null
samba
5509597decdbd7b91994210f700329d8a35e70a1
1
int recv_files(int f_in, int f_out, char *local_name) { int fd1,fd2; STRUCT_STAT st; int iflags, xlen; char *fname, fbuf[MAXPATHLEN]; char xname[MAXPATHLEN]; char fnametmp[MAXPATHLEN]; char *fnamecmp, *partialptr; char fnamecmpbuf[MAXPATHLEN]; uchar fnamecmp_type; struct file_struct *file; int itemizing = am...
177,769
24
212170282409395430688060914053638522854
null
null
null
samba
70aeb5fddd1b2f8e143276f8d5a085db16c593b9
1
int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, uchar *type_ptr, char *buf, int *len_ptr) { int len, iflags = 0; struct file_list *flist; uchar fnamecmp_type = FNAMECMP_FNAME; int ndx; read_loop: while (1) { ndx = read_ndx(f_in); if (ndx >= 0) break; if (ndx == NDX_DONE) return...
177,770
25
218007185182567162788891557146038450271
null
null
null
haproxy
58df5aea0a0c926b2238f65908f5e9f83d1cca25
1
int dns_read_name(unsigned char *buffer, unsigned char *bufend, unsigned char *name, char *destination, int dest_len, int *offset) { int nb_bytes = 0, n = 0; int label_len; unsigned char *reader = name; char *dest = destination; while (1) { /* Name compression ...
CWE-835
177,771
26
6381338430754950645676757195002300075
null
null
null
poppler
284a92899602daa4a7f429e61849e794569310b5
1
void SplashOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg) { double *ctm; SplashCoord mat[6]; SplashOutImageData imgData; SplashColorMode srcMode; SplashImageSource src; GfxGray gray; GfxRGB rg...
CWE-189
177,774
27
304076538021281751998637961089745244390
null
null
null
poppler
7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
1
void ArthurOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg) { unsigned char *buffer; unsigned int *dest; int x, y; ImageStream *imgStr; Guchar *pix; int i; double *ctm; QMatrix matrix; int...
CWE-189
177,775
28
145223011821522984832787544024029108709
null
null
null
shibboleth
b66cceb0e992c351ad5e2c665229ede82f261b16
1
DynamicMetadataProvider::DynamicMetadataProvider(const DOMElement* e) : saml2md::DynamicMetadataProvider(e), m_verifyHost(XMLHelper::getAttrBool(e, true, verifyHost)), m_ignoreTransport(XMLHelper::getAttrBool(e, false, ignoreTransport)), m_encoded(true), m_trust(nullptr) { const DOME...
CWE-347
177,795
40
11538925675754479849567947994472519439
null
null
null
pengutronix
574ce994016107ad8ab0f845a785f28d7eaa5208
1
static int nfs_readlink_req(struct nfs_priv *npriv, struct nfs_fh *fh, char **target) { uint32_t data[1024]; uint32_t *p; uint32_t len; struct packet *nfs_packet; /* * struct READLINK3args { * nfs_fh3 symlink; * }; * * struct READLINK3resok { * post_op_attr symlink_attributes; * nfspath3 d...
CWE-119
177,796
41
165064796667373419921312233428470052444
null
null
null
pengutronix
84986ca024462058574432b5483f4bf9136c538d
1
static int nfs_readlink_reply(unsigned char *pkt, unsigned len) { uint32_t *data; char *path; int rlen; int ret; ret = rpc_check_reply(pkt, 1); if (ret) return ret; data = (uint32_t *)(pkt + sizeof(struct rpc_reply)); data++; rlen = ntohl(net_read_uint32(data)); /* new path length */ data++; ...
CWE-119
177,797
42
197742048742816713437466148600234690021
null
null
null
ghostscript
aeea342904978c9fe17d85f4906a0f6fcce2d315
1
restore_page_device(i_ctx_t *i_ctx_p, const gs_gstate * pgs_old, const gs_gstate * pgs_new) { gx_device *dev_old = gs_currentdevice(pgs_old); gx_device *dev_new; gx_device *dev_t1; gx_device *dev_t2; bool samepagedevice = obj_eq(dev_old->memory, &gs_int_gstate(pgs_old)->pagedevice, &gs_int_g...
177,809
51
155252896948184637654867393305831762960
null
null
null
ghostscript
661e8d8fb8248c38d67958beda32f3a5876d0c3f
1
zsetdevice(i_ctx_t *i_ctx_p) { gx_device *dev = gs_currentdevice(igs); os_ptr op = osp; int code = 0; check_write_type(*op, t_device); if (dev->LockSafetyParams) { /* do additional checking if locked */ if(op->value.pdevice != dev) /* don't allow a different device */ ...
177,810
52
340004772641014275916898545695953737482
null
null
null
savannah
7a42b78be9a4108d98833069a88e6fddb9285008
1
aspath_put (struct stream *s, struct aspath *as, int use32bit ) { struct assegment *seg = as->segments; size_t bytes = 0; if (!seg || seg->length == 0) return 0; if (seg) { /* * Hey, what do we do when we have > STREAM_WRITABLE(s) here? * At the moment, we would write out a par...
CWE-20
177,811
53
180268846652331292477605901092801668823
null
null
null
samba
c252546ceeb0925eb8a4061315e3ff0a8c55b48b
1
void sum_update(const char *p, int32 len) { switch (cursum_type) { case CSUM_MD5: md5_update(&md, (uchar *)p, len); break; case CSUM_MD4: case CSUM_MD4_OLD: case CSUM_MD4_BUSTED: if (len + sumresidue < CSUM_CHUNK) { memcpy(md.buffer + sumresi...
CWE-354
177,812
54
337655106013087126363639454838638190943
null
null
null
samba
9a480deec4d20277d8e20bc55515ef0640ca1e55
1
char *auth_server(int f_in, int f_out, int module, const char *host, const char *addr, const char *leader) { char *users = lp_auth_users(module); char challenge[MAX_DIGEST_LEN*2]; char line[BIGPATHBUFLEN]; char **auth_uid_groups = NULL; int auth_uid_groups_cnt = -1; const char *err = NULL; int group_match = ...
CWE-354
177,813
55
98721516615150795159214070101872089036
null
null
null
busybox
0402cb32df015d9372578e3db27db47b33d5c7b0
1
static int get_next_block(bunzip_data *bd) { struct group_data *hufGroup; int dbufCount, dbufSize, groupCount, *base, *limit, selector, i, j, runPos, symCount, symTotal, nSelectors, byteCount[256]; int runCnt = runCnt; /* for compiler */ uint8_t uc, symToByte[256], mtfSymbol[256], *selectors; uint32_t *dbuf...
CWE-190
177,822
62
238413816495536863232825191293924303166
null
null
null
libxfont
d11ee5886e9d9ec610051a206b135a4cdc1e09a0
1
BufCompressedFill (BufFilePtr f) { CompressedFile *file; register char_type *stackp, *de_stack; register char_type finchar; register code_int code, oldcode, incode; BufChar *buf, *bufend; file = (CompressedFile *) f->private; buf = f->buffer; bufend = buf + BUFFILESIZE; stackp...
CWE-119
177,823
63
314816336443270992925734214319385584087
null
null
null
musl
45ca5d3fcb6f874bf5ba55d0e9651cef68515395
1
static int dns_parse_callback(void *c, int rr, const void *data, int len, const void *packet) { char tmp[256]; struct dpc_ctx *ctx = c; switch (rr) { case RR_A: if (len != 4) return -1; ctx->addrs[ctx->cnt].scopeid = 0; memcpy(ctx->addrs[ctx->cnt++].addr, data, 4); break; case RR_AAAA: if (len != 1...
CWE-119
177,824
64
212099417602244187828055587331477277729
null
null
null
poppler
61f79b8447c3ac8ab5a26e79e0c28053ffdccf75
1
bool extractPages (const char *srcFileName, const char *destFileName) { char pathName[4096]; GooString *gfileName = new GooString (srcFileName); PDFDoc *doc = new PDFDoc (gfileName, NULL, NULL, NULL); if (!doc->isOk()) { error(errSyntaxError, -1, "Could not extract page(s) from damaged file ('{0:s}')", src...
CWE-20
177,825
65
41887122719404523174993334902149265910
null
null
null
poppler
b8682d868ddf7f741e93b791588af0932893f95c
1
bool extractPages (const char *srcFileName, const char *destFileName) { char pathName[1024]; GooString *gfileName = new GooString (srcFileName); PDFDoc *doc = new PDFDoc (gfileName, NULL, NULL, NULL); if (!doc->isOk()) { error(errSyntaxError, -1, "Could not extract page(s) from damaged file ('{0:s}')",...
CWE-119
177,826
66
244634780333143587019078565382798831655
null
null
null
ghostscript
97096297d409ec6f206298444ba00719607e8ba8
1
walk_string(fz_context *ctx, int uni, int remove, editable_str *str) { int rune; if (str->utf8 == NULL) return; do { char *s = &str->utf8[str->pos]; size_t len; int n = fz_chartorune(&rune, s); if (rune == uni) { /* Match. Skip over that one. */ str->pos += n...
CWE-125
177,832
70
260933823413348392755539962564037161558
null
null
null
spice
53488f0275d6c8a121af49f7ac817d09ce68090d
1
void red_channel_pipes_add_empty_msg(RedChannel *channel, int msg_type) { RingItem *link; RING_FOREACH(link, &channel->clients) { red_channel_client_pipe_add_empty_msg( SPICE_CONTAINEROF(link, RedChannelClient, channel_link), msg_type); } }
CWE-399
177,835
71
246859488383496619201376958064716490992
null
null
null
spice
53488f0275d6c8a121af49f7ac817d09ce68090d
1
void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type) { RingItem *link; RING_FOREACH(link, &channel->clients) { red_channel_client_pipe_add_type( SPICE_CONTAINEROF(link, RedChannelClient, channel_link), pipe_item_type); } }
CWE-399
177,836
72
261946911680290370969616922085083966153
null
null
null
mindrot
1bf477d3cdf1a864646d59820878783d42357a1d
1
x11_open_helper(Buffer *b) { u_char *ucp; u_int proto_len, data_len; u_char *ucp; u_int proto_len, data_len; /* Check if the fixed size part of the packet is in buffer. */ if (buffer_len(b) < 12) return 0; debug2("Initial X11 packet contains bad byte order byte: 0x%x", ucp[0]); return -1; }
CWE-264
177,838
73
186655838205464964819117737453872627903
null
null
null
samba
538d305de91e34a2938f5f219f18bf0e1918763f
1
_PUBLIC_ codepoint_t next_codepoint_handle_ext( struct smb_iconv_handle *ic, const char *str, size_t len, charset_t src_charset, size_t *bytes_consumed) { /* it cannot occupy more than 4 bytes in UTF16 format */ uint8_t buf[4]; smb_iconv_t descriptor; size_t ilen_orig; size_t ilen; size_t olen;...
CWE-200
177,839
74
7537344539298054773758251251687254208
null
null
null
samba
7f51ec8c4ed9ba1f53d722e44fb6fb3cde933b72
1
static int ldb_dn_escape_internal(char *dst, const char *src, int len) { const char *p, *s; char *d; size_t l; p = s = src; d = dst; while (p - src < len) { p += strcspn(p, ",=\n\r+<>#;\\\" "); if (p - src == len) /* found no escapable chars ...
CWE-200
177,840
75
165702818458270596859790967970868439168
null
null
null
samba
a118d4220ed85749c07fb43c1229d9e2fecbea6b
1
_PUBLIC_ char *strupper_talloc_n_handle(struct smb_iconv_handle *iconv_handle, TALLOC_CTX *ctx, const char *src, size_t n) { size_t size=0; char *dest; if (!src) { return NULL; } /* this takes advantage of the fact that upper/lower can't change the length of a character by more than 1 byte */ dest = ...
CWE-200
177,841
76
133076053301010291311483906719742687999
null
null
null
samba
f36cb71c330a52106e36028b3029d952257baf15
1
static bool ldb_dn_explode(struct ldb_dn *dn) { char *p, *ex_name = NULL, *ex_value = NULL, *data, *d, *dt, *t; bool trim = true; bool in_extended = true; bool in_ex_name = false; bool in_ex_value = false; bool in_attr = false; bool in_value = false; bool in_quote = false; bool is_oid = false; bool escape = f...
CWE-200
177,845
80
56521152564463965686656149103554582573
null
null
null
ghostscript
a6807394bd94b708be24758287b606154daaaed9
1
gs_call_interp(i_ctx_t **pi_ctx_p, ref * pref, int user_errors, int *pexit_code, ref * perror_object) { ref *epref = pref; ref doref; ref *perrordict; ref error_name; int code, ccode; ref saref; i_ctx_t *i_ctx_p = *pi_ctx_p; int *gc_signal = &imemory_system->gs_lib_ctx->gc...
CWE-209
177,854
81
158176379266765825681809562263566380830
null
null
null
samba
4278ef25f64d5fdbf432ff1534e275416ec9561e
1
NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, const char *fname, struct smb_request *smbreq) { NTSTATUS status; TALLOC_CTX *ctx = talloc_tos(); const char *conn_rootdir; size_t rootdir_len; char *dir_name = NULL; const char *last_component = NULL; char *resolved_name = NULL; char *sa...
CWE-264
177,855
82
1187391106808919572589646338804645949
null
null
null
savannah
dce4683cbbe107a95f1f0d45fabc304acfb5d71a
1
plan_a (char const *filename) { char const *s; char const *lim; char const **ptr; char *buffer; lin iline; size_t size = instat.st_size; /* Fail if the file size doesn't fit in a size_t, or if storage isn't available. */ if (! (size == instat.st_size && (buffer = malloc (size ? size : (size_t) ...
CWE-59
177,857
83
8366090498822481813911553841981995710
null
null
null
dbus
c3223ba6c401ba81df1305851312a47c485e6cd7
1
_dbus_header_byteswap (DBusHeader *header, int new_order) { if (header->byte_order == new_order) return; _dbus_marshal_byteswap (&_dbus_header_signature_str, 0, header->byte_order, new_order, ...
CWE-20
177,858
84
9228036298590962222843680821307727463
null
null
null
ghostscript
79cccf641486a6595c43f1de1cd7ade696020a31
1
gs_nulldevice(gs_gstate * pgs) { int code = 0; if (pgs->device == 0 || !gx_device_is_null(pgs->device)) { gx_device *ndev; code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device, pgs->memory); if (code < 0) return code; ...
CWE-78
177,859
85
84413200937845432393453109331654543792
null
null
null
ghostscript
5516c614dc33662a2afdc377159f70218e67bde5
1
zrestore(i_ctx_t *i_ctx_p) { os_ptr op = osp; alloc_save_t *asave; bool last; vm_save_t *vmsave; int code = restore_check_operand(op, &asave, idmemory); if (code < 0) return code; if_debug2m('u', imemory, "[u]vmrestore 0x%lx, id = %lu\n", (ulong) alloc_save_clie...
CWE-78
177,860
86
243122500252437636802158481572566726525
null
null
null
NetworkManager
78ce088843d59d4494965bfc40b30a2e63d065f6
1
destroy_one_secret (gpointer data) { char *secret = (char *) data; /* Don't leave the secret lying around in memory */ g_message ("%s: destroying %s", __func__, secret); memset (secret, 0, strlen (secret)); g_free (secret); }
CWE-200
177,861
87
1138568555668242760358654543466979215
null
null
null
libxfont
d1e670a4a8704b8708e493ab6155589bcd570608
1
PatternMatch(char *pat, int patdashes, char *string, int stringdashes) { char c, t; if (stringdashes < patdashes) return 0; for (;;) { switch (c = *pat++) { case '*': if (!(c = *pat++)) return 1; if (c == XK_minus) { patdashes--; for (;;) { while ((t = *strin...
CWE-125
177,865
90
235016592504912789309291169579431913614
null
null
null
ghostscript
b575e1ec42cc86f6a58c603f2a88fcc2af699cc8
1
gs_call_interp(i_ctx_t **pi_ctx_p, ref * pref, int user_errors, int *pexit_code, ref * perror_object) { ref *epref = pref; ref doref; ref *perrordict; ref error_name; int code, ccode; ref saref; i_ctx_t *i_ctx_p = *pi_ctx_p; int *gc_signal = &imemory_system->gs_lib_ctx->gc...
CWE-388
177,866
91
56777007913799829721432476707011479257
null
null
null
ghostscript
241d91112771a6104de10b3948c3f350d6690c1d
1
gs_main_finit(gs_main_instance * minst, int exit_status, int code) { i_ctx_t *i_ctx_p = minst->i_ctx_p; gs_dual_memory_t dmem = {0}; int exit_code; ref error_object; char *tempnames; /* NB: need to free gs_name_table */ /* * Previous versions of this code closed the devices in th...
CWE-416
177,867
92
143975174954705637984220412120331580143
null
null
null
ghostscript
b326a71659b7837d3acde954b18bda1a6f5e9498
1
zsetcolor(i_ctx_t * i_ctx_p) { os_ptr op = osp; es_ptr ep; const gs_color_space * pcs = gs_currentcolorspace(igs); gs_client_color cc; int n_comps, n_numeric_comps, num_offset = 0, code, depth; PS_colour_space_t *space; /* initialize the client ...
CWE-704
177,869
93
204275868331229737175629924419598292681
null
null
null
ghostscript
0edd3d6c634a577db261615a9dc2719bca7f6e01
1
ztype(i_ctx_t *i_ctx_p) { os_ptr op = osp; ref tnref; int code = array_get(imemory, op, (long)r_btype(op - 1), &tnref); if (code < 0) return code; if (!r_has_type(&tnref, t_name)) { /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { ...
CWE-704
177,870
94
6725827723091209183703487545020478022
null
null
null
savannah
ba6b44f6745b14dce414761a8e4b35d31b176bba
1
fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, wgint startpos, wgint *qtyread, wgint *qtywritten, double *elapsed, int flags, FILE *out2) { int ret = 0; #undef max #define max(a,b) ((a) > (b) ? (a) : (b)) int dlbufsize = max (BUFSIZ, 8 * 1024); char *d...
CWE-119
177,873
96
323589515235597079129994725046166819711
null
null
null
ghostscript
0d3901189f245232f0161addf215d7268c4d05a3
1
check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len, gx_io_device *iodev, const char *permitgroup) { long i; ref *permitlist = NULL; /* an empty string (first character == 0) if '\' character is */ /* recognized as a file name separator as on DOS & Windows...
177,880
101
69859639183316940625463158376184599878
null
null
null
drm
9f1f1a2dab38d4ce87a13565cf4dc1b73bef3a5f
1
struct edid *drm_load_edid_firmware(struct drm_connector *connector) { const char *connector_name = connector->name; char *edidname, *last, *colon, *fwstr, *edidstr, *fallback = NULL; struct edid *edid; if (edid_firmware[0] == '\0') return ERR_PTR(-ENOENT); /* * If there are multiple edid files specified and...
CWE-476
177,881
102
277136060870051879610700105139465176140
null
null
null
haproxy
7ec765568883b2d4e5a2796adbeb492a22ec9bd4
1
void buffer_slow_realign(struct buffer *buf) { /* two possible cases : * - the buffer is in one contiguous block, we move it in-place * - the buffer is in two blocks, we move it via the swap_buffer */ if (buf->i) { int block1 = buf->i; int block2...
CWE-119
177,886
106
110551955760274715015247345529003415581
null
null
null
savannah
3f872fe60463a931c5c766dbf8c36870c0023e88
1
new_msg_register_event (u_int32_t seqnum, struct lsa_filter_type *filter) { u_char buf[OSPF_API_MAX_MSG_SIZE]; struct msg_register_event *emsg; int len; emsg = (struct msg_register_event *) buf; len = sizeof (struct msg_register_event) + filter->num_areas * sizeof (struct in_addr); emsg->filter.typema...
CWE-119
177,888
107
24569741928780254928487121835647969548
null
null
null
openssl
cc598f321fbac9c04da5766243ed55d55948637d
1
int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx) { const ASN1_TEMPLATE *tt, *errtt = NULL; const ASN1_COMPAT_FUNCS *cf; const ASN1_EXTERN_FUNCS *ef; const ASN1_AUX *aux...
CWE-200
177,890
108
262483489551334338648277862128153636042
null
null
null
openssl
d8541d7e9e63bf5f343af24644046c8d96498c17
1
static RSA_PSS_PARAMS *rsa_pss_decode(const X509_ALGOR *alg, X509_ALGOR **pmaskHash) { const unsigned char *p; int plen; RSA_PSS_PARAMS *pss; *pmaskHash = NULL; if (!alg->parameter || alg->parameter->type != V_ASN1_SEQUENCE) return NULL; p = alg->p...
177,891
109
288105964239389158612588380167749525157
null
null
null
openssl
c394a488942387246653833359a5c94b5832674e
1
static X509_ALGOR *rsa_mgf1_decode(X509_ALGOR *alg) { const unsigned char *p; int plen; if (alg == NULL) return NULL; if (OBJ_obj2nid(alg->algorithm) != NID_mgf1) return NULL; if (alg->parameter->type != V_ASN1_SEQUENCE) return NULL; p = alg->parameter->value.seque...
177,892
110
308019867511894862199468289587358810995
null
null
null
openssl
d73cc256c8e256c32ed959456101b73ba9842f72
1
int test_mod_exp(BIO *bp, BN_CTX *ctx) { BIGNUM *a, *b, *c, *d, *e; int i; a = BN_new(); b = BN_new(); c = BN_new(); d = BN_new(); e = BN_new(); BN_one(a); BN_one(b); BN_zero(c); if (BN_mod_exp(d, a, b, c, ctx)) { fprintf(stderr, "BN_mod_exp with zero modulus succee...
CWE-200
177,893
111
187209592842827111487919300940629712064
null
null
null
savannah
4d4f992826a4962790ecd0cce6fbba4a415ce149
1
_asn1_ltostr (long v, char *str) { long d, r; char temp[LTOSTR_MAX_SIZE]; int count, k, start; if (v < 0) { str[0] = '-'; start = 1; v = -v; } else start = 0; count = 0; do { d = v / 10; r = v - d * 10; temp[start + count] = '0' + (char) r; c...
CWE-119
177,901
112
119645014080183399681168315542945459906
null
null
null
poppler
a9b8ab4657dec65b8b86c225d12c533ad7e984e2
1
void Splash::blitMask(SplashBitmap *src, int xDest, int yDest, SplashClipResult clipRes) { SplashPipe pipe; Guchar *p; int w, h, x, y; w = src->getWidth(); h = src->getHeight(); if (vectorAntialias && clipRes != splashClipAllInside) { pipeInit(&pipe, xDest, yDest, state->fillPattern, NULL,...
177,904
113
177353594761141217586604236761349137273
null
null
null
poppler
a205e71a2dbe0c8d4f4905a76a3f79ec522eacec
1
void Splash::arbitraryTransformMask(SplashImageMaskSource src, void *srcData, int srcWidth, int srcHeight, SplashCoord *mat, GBool glyphMode) { SplashBitmap *scaledMask; SplashClipResult clipRes, clipRes2; SplashPipe pipe; int scaledWidth, scaledHeight, t0, t1; SplashCoord r00, r01, r10, r11, ...
177,905
114
21833262199574906453642874701778817418
null
null
null
ghostscript
671fd59eb657743aa86fbc1895cb15872a317caa
1
token_continue(i_ctx_t *i_ctx_p, scanner_state * pstate, bool save) { os_ptr op = osp; int code; ref token; /* Note that gs_scan_token may change osp! */ pop(1); /* remove the file or scanner state */ again: gs_scanner_error_object(i_ctx_p, pstate, &i_ctx_p->er...
CWE-125
177,910
117
15644102026731532816747781452593039582
null
null
null
savannah
79972af4f0485a11dcb19551356c45245749fc5b
1
ft_smooth_render_generic( FT_Renderer render, FT_GlyphSlot slot, FT_Render_Mode mode, const FT_Vector* origin, FT_Render_Mode required_mode ) { FT_Error error; FT_Outline* o...
CWE-189
177,914
121
24717888926496377392853611670854702544
null
null
null
savannah
0545ec1ca36b27cb928128870a83e5f668980bc5
1
cff_charset_load( CFF_Charset charset, FT_UInt num_glyphs, FT_Stream stream, FT_ULong base_offset, FT_ULong offset, FT_Bool invert ) { FT_Memory memory = stream->memory; FT_Error erro...
CWE-189
177,915
122
322437368215015751310197159603838280292
null
null
null
netfilter
2ae1099a42e6a0f06de305ca13a842ac83d4683e
1
void add_param_to_argv(char *parsestart, int line) { int quote_open = 0, escaped = 0, param_len = 0; char param_buffer[1024], *curchar; /* After fighting with strtok enough, here's now * a 'real' parser. According to Rusty I'm now no } else { param_buffer[param_len++] = *curchar; for (curchar = pars...
CWE-119
177,922
123
204920135878748692275786929565292679269
null
null
null
accountsservice
f9abd359f71a5bce421b9ae23432f539a067847a
1
user_change_icon_file_authorized_cb (Daemon *daemon, User *user, GDBusMethodInvocation *context, gpointer data) { g_autofree gchar *filename = NULL; ...
CWE-22
177,931
124
310825199754671934664587377706693460973
null
null
null
xserver
215f894965df5fb0bb45b107d84524e700d2073c
1
ProcSendEvent(ClientPtr client) { WindowPtr pWin; WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ DeviceIntPtr dev = PickPointer(client); DeviceIntPtr keybd = GetMaster(dev, MASTER_KEYBOARD); SpritePtr pSprite = dev->spriteInfo->sprite; REQUEST(xSendEventReq); ...
CWE-119
177,936
128
36683317052216501366087070681901031177
null
null
null
xserver
8caed4df36b1f802b4992edcfd282cbeeec35d9d
1
ProcXSendExtensionEvent(ClientPtr client) { int ret; DeviceIntPtr dev; xEvent *first; XEventClass *list; struct tmask tmp[EMASKSIZE]; REQUEST(xSendExtensionEventReq); REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); if (stuff->length != bytes_to_int32(sizeof(xSendExtensionEv...
CWE-119
177,937
129
288772859654498582457761658216356600870
null
null
null
openssl
9a0db453ba017ebcaccbee933ee6511a9ae4d1c8
1
int X509_verify_cert(X509_STORE_CTX *ctx) { X509 *x, *xtmp, *xtmp2, *chain_ss = NULL; int bad_chain = 0; X509_VERIFY_PARAM *param = ctx->param; int depth, i, ok = 0; int num, j, retry; int (*cb) (int xok, X509_STORE_CTX *xctx); STACK_OF(X509) *sktmp = NULL; if (ctx->cert == NULL) { ...
CWE-254
177,939
130
115002758247549560072417551006349173395
null
null
null
savannah
cb07844454d8cc9fb21f53ace75975f91185a120
1
pax_decode_header (struct tar_sparse_file *file) { if (file->stat_info->sparse_major > 0) { uintmax_t u; char nbuf[UINTMAX_STRSIZE_BOUND]; union block *blk; char *p; size_t i; off_t start; #define COPY_BUF(b,buf,src) do \ { ...
CWE-476
177,948
132
138433573634940218648935622617839152489
null
null
null
ghostscript
961b10cdd71403072fb99401a45f3bef6ce53626
1
xps_encode_font_char_imp(xps_font_t *font, int code) { byte *table; /* no cmap selected: return identity */ if (font->cmapsubtable <= 0) return code; table = font->data + font->cmapsubtable; switch (u16(table)) { case 0: /* Apple standard 1-to-1 mapping. */ return table[co...
CWE-125
177,949
133
76117521649677870757890949935460891471
null
null
null
ghostscript
937ccd17ac65935633b2ebc06cb7089b91e17e6b
1
static void gx_ttfReader__Read(ttfReader *self, void *p, int n) { gx_ttfReader *r = (gx_ttfReader *)self; const byte *q; if (!r->error) { if (r->extra_glyph_index != -1) { q = r->glyph_data.bits.data + r->pos; r->error = (r->glyph_data.bits.size - r->pos < n ? ...
CWE-125
177,951
134
68672817859874024460253201984431332219
null
null
null
ghostscript
7755e67116e8973ee0e3b22d653df026a84fa01b
1
static void Ins_MDRP( INS_ARG ) { Int point; TT_F26Dot6 distance, org_dist; point = (Int)args[0]; if ( BOUNDS( args[0], CUR.zp1.n_points ) ) { /* Current version of FreeType silently ignores this out of bounds error * and drops the instruction, ...
CWE-125
177,952
135
29186964022494243055154783334172444823
null
null
null
dbus
166978a09cf5edff4028e670b6074215a4c75eca
1
dbus_g_proxy_manager_filter (DBusConnection *connection, DBusMessage *message, void *user_data) { DBusGProxyManager *manager; if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_SIGNAL) return DBUS_HANDLER_RESULT_NOT_YET_HAN...
CWE-20
177,953
136
115276448693599864140234533276342928360
null
null
null
ghostscript
3ee55637480d5e319a5de0481b01c3346855cbc9
1
xps_select_font_encoding(xps_font_t *font, int idx) { byte *cmapdata, *entry; int pid, eid; if (idx < 0 || idx >= font->cmapsubcount) return; cmapdata = font->data + font->cmaptable; entry = cmapdata + 4 + idx * 8; pid = u16(entry + 0); eid = u16(entry + 2); font->cmaps...
CWE-125
177,954
137
265646624838438476059152739785066885069
null
null
null
ghostscript
c53183d4e7103e87368b7cfa15367a47d559e323
1
xps_true_callback_glyph_name(gs_font *pfont, gs_glyph glyph, gs_const_string *pstr) { /* This function is copied verbatim from plfont.c */ int table_length; int table_offset; ulong format; uint numGlyphs; uint glyph_name_index; const byte *postp; /* post table pointer */ /* gue...
CWE-119
177,956
139
83736377691001723428427436308560857107
null
null
null
ghostscript
3c2aebbedd37fab054e80f2e315de07d7e9b5bdb
1
xps_load_sfnt_name(xps_font_t *font, char *namep) { byte *namedata; int offset, length; /*int format;*/ int count, stringoffset; int found; int i, k; found = 0; strcpy(namep, "Unknown"); offset = xps_find_sfnt_table(font, "name", &length); if (offset < 0 || length < 6) {...
CWE-119
177,957
140
112369513254285676016910036571983121831
null
null
null
altlinux
ffe7058c70253d574b1963c7c93002bd410fddc9
1
check_acl(pam_handle_t *pamh, const char *sense, const char *this_user, const char *other_user, int noent_code, int debug) { char path[PATH_MAX]; struct passwd *pwd; { char path[PATH_MAX]; struct passwd *pwd; FILE *fp; int i, save_errno; uid_t fsuid; /* Check this ...
CWE-399
177,960
141
41551411147695369979843022209854699094
null
null
null
altlinux
05dafc06cd3dfeb7c4b24942e4e1ae33ff75a123
1
pam_sm_close_session (pam_handle_t *pamh, int flags UNUSED, int argc, const char **argv) { void *cookiefile; int i, debug = 0; const char* user; struct passwd *tpwd = NULL; uid_t unlinkuid, fsuid; if (pam_get_user(pamh, &user, NULL) != PAM_SUCCESS) ...
177,961
142
73058116370865376251359869621052738742
null
null
null
gnupg
5a22de904a0a366ae79f03ff1e13a1232a89e26b
1
_gcry_ecc_eddsa_sign (gcry_mpi_t input, ECC_secret_key *skey, gcry_mpi_t r_r, gcry_mpi_t s, int hashalgo, gcry_mpi_t pk) { int rc; mpi_ec_t ctx = NULL; int b; unsigned int tmp; unsigned char *digest = NULL; gcry_buffer_t hvec[3]; const void *mbuf; size_t mlen; unsigned char *rawm...
CWE-200
177,962
143
75265885953023254598111895954805310857
null
null
null
openssl
62e4506a7d4cec1c8e1ff687f6b220f6a62a57c7
1
int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signature, void *asn, EVP_PKEY *pkey) { EVP_MD_CTX ctx; unsigned char *buf_in=NULL; int ret= -1,inl; int mdnid, pknid; EVP_MD_CTX_init(&ctx); /* Convert signature OID into digest and public key OIDs */ { if...
CWE-310
177,963
144
269188142815144649597760452518735983353
null
null
null
openssl
66e8211c0b1347970096e04b18aa52567c325200
1
int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signature, void *asn, EVP_PKEY *pkey) { EVP_MD_CTX ctx; const EVP_MD *type; unsigned char *buf_in=NULL; int ret= -1,i,inl; EVP_MD_CTX_init(&ctx); i=OBJ_obj2nid(a->algorithm); type=EVP_get_digestb...
CWE-310
177,964
145
107114806548745275102067080029582687172
null
null
null
openssl
ebc71865f0506a293242bd4aec97cdc7a8ef24b0
1
int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signature, void *asn, EVP_PKEY *pkey) { EVP_MD_CTX ctx; const EVP_MD *type = NULL; unsigned char *buf_in=NULL; int ret= -1,inl; int mdnid, pknid; EVP_MD_CTX_init(&ctx); /* Convert signature OID into digest...
CWE-310
177,965
146
292171545981096532430963237536493213672
null
null
null
samba
10c3e3923022485c720f322ca4f0aca5d7501310
1
static NTSTATUS fd_open_atomic(struct connection_struct *conn, files_struct *fsp, int flags, mode_t mode, bool *file_created) { NTSTATUS status = NT_STATUS_UNSUCCESSFUL; bool file_existed = VALID_STAT(fsp->fsp_name->st); *file_created = false; * We're not...
CWE-835
177,966
147
161881144216406607325428562477641633507
null
null
null
openssl
d0666f289ac013094bbbf547bfbcd616199b7d2d
1
int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl) { int seof= -1,eof=0,rv= -1,ret=0,i,v,tmp,n,ln,exp_nl; unsigned char *d; n=ctx->num; d=ctx->enc_data; ln=ctx->line_num; exp_nl=ctx->expect_nl; /* last line of input. */ if ((inl == 0) || ((n == 0)...
CWE-119
177,975
150
314448950255259267086706912584575387344
null
null
null
openssl
77c77f0a1b9f15b869ca3342186dfbedd1119d0e
1
int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len) { const unsigned char *buf = buf_; int tot; unsigned int n, nw; #if !defined(OPENSSL_NO_MULTIBLOCK) && EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK unsigned int max_send_fragment; #endif SSL3_BUFFER *wb = &(s->s3->wbuf); int i; s->rwstate...
CWE-17
177,978
151
275384842882046980981080513884860956591
null
null
null
openssl
28a00bcd8e318da18031b2ac8778c64147cd54f9
1
X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md) { X509_REQ *ret; X509_REQ_INFO *ri; int i; EVP_PKEY *pktmp; ret = X509_REQ_new(); if (ret == NULL) { X509err(X509_F_X509_TO_X509_REQ, ERR_R_MALLOC_FAILURE); goto err; } ri = ret->req_info; ri->ve...
177,981
153
65961291460303063310058993287193914232
null
null
null
openssl
b717b083073b6cacc0a5e2397b661678aff7ae7f
1
int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx) { const ASN1_TEMPLATE *tt, *errtt = NULL; const ASN1_COMPAT_FUNCS *cf; const ASN1_EXTERN_FUNCS *ef; const ASN1_AUX *aux...
CWE-17
177,982
154
71024901693981678702406865621946417956
null
null
null
openssl
c3c7fb07dc975dc3c9de0eddb7d8fd79fc9c67c1
1
int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b) { int result = -1; if (!a || !b || a->type != b->type) return -1; switch (a->type) { case V_ASN1_OBJECT: result = OBJ_cmp(a->value.object, b->value.object); break; case V_ASN1_NULL: result = 0; ...
CWE-17
177,983
155
210178361702841664613263558093095710758
null
null
null
openssl
e1b568dd2462f7cacf98f3d117936c34e2849a6b
1
int ssl3_client_hello(SSL *s) { unsigned char *buf; unsigned char *p, *d; int i; unsigned long l; int al = 0; #ifndef OPENSSL_NO_COMP int j; SSL_COMP *comp; #endif buf = (unsigned char *)s->init_buf->data; if (s->state == SSL3_ST_CW_CLNT_HELLO_A) { SSL_SESSION *sess = s->ses...
CWE-310
177,984
156
56759383063747973773032597308927437186
null
null
null
lxde
bc8c3d871e9ecc67c47ff002b68cf049793faf08
1
static void get_socket_name(SingleInstData* data, char* buf, int len) { const char* dpy = g_getenv("DISPLAY"); char* host = NULL; int dpynum; if(dpy) { const char* p = strrchr(dpy, ':'); host = g_strndup(dpy, (p - dpy)); dpynum = atoi(p + 1); } else dpynum ...
CWE-20
177,988
159
106918102879333302695314745785733140248
null
null
null
lxde
56f66684592abf257c4004e6e1fff041c64a12ce
1
static void get_socket_name( char* buf, int len ) { char* dpy = g_strdup(g_getenv("DISPLAY")); if(dpy && *dpy) { char* p = strchr(dpy, ':'); for(++p; *p && *p != '.' && *p != '\n';) ++p; if(*p) *p = '\0'; } g_snprintf( buf, len, "%s/.menu-cached-%s...
CWE-20
177,989
160
265941169333680617124152054354492676988
null
null
null
altlinux
843807a3a90f52e7538be756616510730a24739a
1
check_acl(pam_handle_t *pamh, const char *sense, const char *this_user, const char *other_user, int noent_code, int debug) { struct passwd *pwd; FILE *fp = NULL; int i, fd = -1, save_errno; uid_t fsuid; struct stat st; /* Check this user's <sense> file. */ pw...
177,990
161
129171371405937766299357996317134593545
null
null
null
openssl
1b4a8df38fc9ab3c089ca5765075ee53ec5bd66a
1
EC_KEY *d2i_ECPrivateKey(EC_KEY **a, const unsigned char **in, long len) { int ok = 0; EC_KEY *ret = NULL; EC_PRIVATEKEY *priv_key = NULL; if ((priv_key = EC_PRIVATEKEY_new()) == NULL) { ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_MALLOC_FAILURE); return NULL; } if ((priv_key = d2i_EC_P...
177,991
162
277511298376014988680994809256525705829
null
null
null
openssl
4b22cce3812052fe64fc3f6d58d8cc884e3cb834
1
static int rsa_item_verify(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, X509_ALGOR *sigalg, ASN1_BIT_STRING *sig, EVP_PKEY *pkey) { /* Sanity check: make sure it is PSS */ if (OBJ_obj2nid(sigalg->algorithm) != NID_rsassaPss) { RSAerr(RSA_F_RSA_I...
177,992
163
155872764354016070523324986612752448169
null
null
null
openssl
819418110b6fff4a7b96f01a5d68f71df3e3b736
1
int dtls1_listen(SSL *s, struct sockaddr *client) { int ret; SSL_set_options(s, SSL_OP_COOKIE_EXCHANGE); s->d1->listen = 1; (void)BIO_dgram_get_peer(SSL_get_rbio(s), client); return 1; }
177,993
164
147821170503061866239142160957380206825
null
null
null
savannah
7f2e4f4f553f6836be7683f66226afac3fa979b8
1
_bdf_parse_glyphs( char* line, unsigned long linelen, unsigned long lineno, void* call_data, void* client_data ) { int c, mask_index; char* s; unsigned char* b...
CWE-119
177,994
165
241612252320932154235102760135232983991
null
null
null
savannah
07bdb6e289c7954e2a533039dc93c1c136099d2d
1
_bdf_parse_glyphs( char* line, unsigned long linelen, unsigned long lineno, void* call_data, void* client_data ) { int c, mask_index; char* s; unsigned char* b...
CWE-119
177,995
166
339135483814426971995983985697178320662
null
null
null
savannah
8fcf61523644df42e1905c81bed26838e0b04f91
1
context_length_arg (char const *str, int *out) { uintmax_t value; if (! (xstrtoumax (str, 0, 10, &value, "") == LONGINT_OK && 0 <= (*out = value) && *out == value)) { error (EXIT_TROUBLE, 0, "%s: %s", str, _("invalid context length argument")); } page size, unles...
CWE-189
177,996
167
325237609142015740156610191050140922642
null
null
null
kde
a90289b0962663bc1d247bbbd31b9e65b2ca000e
1
ActionReply Smb4KMountHelper::mount(const QVariantMap &args) { ActionReply reply; QMapIterator<QString, QVariant> it(args); proc.setOutputChannelMode(KProcess::SeparateChannels); proc.setProcessEnvironment(QProcessEnvironment::systemEnvironment()); #if defined(Q_OS_LINUX) proc.setEnv("PASSWD", e...
CWE-20
177,999
169
171260334698845358353677836209008845727
null
null
null