file_name
stringlengths
4
45
method_name
stringlengths
3
58
code_before
stringlengths
980
1.05M
code_after
stringlengths
1.13k
1.05M
func_before
stringlengths
55
114k
func_after
stringlengths
71
114k
diff
stringlengths
75
133k
num_lines_added
float64
1
1.49k
num_lines_deleted
float64
1
1.13k
num_lines_in_file
float64
27
23.2k
num_tokens_in_file
float64
143
192k
repo
stringclasses
259 values
cve_id
stringlengths
13
16
cwe_id
stringclasses
73 values
ip_sockglue.c
ip_cmsg_recv_checksum
/* * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket * interface as the means of communication with the user level. * * The IP to API glue. * * Authors: see ip.c * * Fixes: * Many : Split from ip.c , see ip.c for history. ...
/* * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket * interface as the means of communication with the user level. * * The IP to API glue. * * Authors: see ip.c * * Fixes: * Many : Split from ip.c , see ip.c for history. ...
static void ip_cmsg_recv_checksum(struct msghdr *msg, struct sk_buff *skb, int tlen, int offset) { __wsum csum = skb->csum; if (skb->ip_summed != CHECKSUM_COMPLETE) return; if (offset != 0) csum = csum_sub(csum, csum_partial(skb_transport_header(skb) + tlen, offset, 0)); put_cmsg(msg, SOL...
static void ip_cmsg_recv_checksum(struct msghdr *msg, struct sk_buff *skb, int tlen, int offset) { __wsum csum = skb->csum; if (skb->ip_summed != CHECKSUM_COMPLETE) return; if (offset != 0) { int tend_off = skb_transport_offset(skb) + tlen; csum = csum_sub(csum, skb_checksum(skb, tend_off, offset, 0));...
{'added': [(119, '\tif (offset != 0) {'), (120, '\t\tint tend_off = skb_transport_offset(skb) + tlen;'), (121, '\t\tcsum = csum_sub(csum, skb_checksum(skb, tend_off, offset, 0));'), (122, '\t}')], 'deleted': [(119, '\tif (offset != 0)'), (120, '\t\tcsum = csum_sub(csum,'), (121, '\t\t\t\tcsum_partial(skb_transport_head...
4
4
1,333
7,618
https://github.com/torvalds/linux
CVE-2017-6347
['CWE-125']
url.c
Curl_close
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
CURLcode Curl_close(struct Curl_easy *data) { struct Curl_multi *m; if(!data) return CURLE_OK; Curl_expire_clear(data); /* shut off timers */ m = data->multi; if(m) /* This handle is still part of a multi handle, take care of this first and detach this handle from there. */ curl_multi_re...
CURLcode Curl_close(struct Curl_easy *data) { struct Curl_multi *m; if(!data) return CURLE_OK; Curl_expire_clear(data); /* shut off timers */ m = data->multi; if(m) /* This handle is still part of a multi handle, take care of this first and detach this handle from there. */ curl_multi_re...
{'added': [(334, ' if(data->multi_easy) {'), (338, ' data->multi_easy = NULL;'), (339, ' }')], 'deleted': [(334, ' if(data->multi_easy)')]}
3
1
2,738
16,845
https://github.com/curl/curl
CVE-2018-16840
['CWE-416']
box_code_adobe.c
abst_box_read
/* * GPAC - Multimedia Framework C SDK * * Author: Romain Bouqueau, Jean Le Feuvre * Copyright (c) Romain Bouqueau 2012- Telecom Paris 2019- * All rights reserved * * Note: this development was kindly sponsorized by Vizion'R (http://vizionr.com) * * This file is part of GPAC / ISO Media File...
/* * GPAC - Multimedia Framework C SDK * * Author: Romain Bouqueau, Jean Le Feuvre * Copyright (c) Romain Bouqueau 2012- Telecom Paris 2019- * All rights reserved * * Note: this development was kindly sponsorized by Vizion'R (http://vizionr.com) * * This file is part of GPAC / ISO Media File...
GF_Err abst_box_read(GF_Box *s, GF_BitStream *bs) { GF_AdobeBootstrapInfoBox *ptr = (GF_AdobeBootstrapInfoBox *)s; int i; u32 tmp_strsize; char *tmp_str; Bool zfound=GF_FALSE; GF_Err e; ISOM_DECREASE_SIZE(ptr, 25) ptr->bootstrapinfo_version = gf_bs_read_u32(bs); ptr->profile = gf_bs_read_int(bs, 2); ptr->liv...
GF_Err abst_box_read(GF_Box *s, GF_BitStream *bs) { GF_AdobeBootstrapInfoBox *ptr = (GF_AdobeBootstrapInfoBox *)s; int i; u32 tmp_strsize; char *tmp_str; Bool zfound=GF_FALSE; GF_Err e = GF_OK; ISOM_DECREASE_SIZE(ptr, 25) ptr->bootstrapinfo_version = gf_bs_read_u32(bs); ptr->profile = gf_bs_read_int(bs, 2); ...
{'added': [(83, '\tGF_Err e = GF_OK;'), (103, '\t\tISOM_DECREASE_SIZE_GOTO_EXIT(ptr, 1)'), (112, '\tif (!zfound) {'), (113, '\t\te = GF_ISOM_INVALID_FILE;'), (114, '\t\tgoto exit;'), (115, '\t}'), (120, '\tISOM_DECREASE_SIZE_GOTO_EXIT(ptr, 1)'), (127, '\t\t\tISOM_DECREASE_SIZE_GOTO_EXIT(ptr, 1)'), (136, '\t\tif (!zfoun...
52
26
621
4,431
https://github.com/gpac/gpac
CVE-2021-32132
['CWE-476']
vim9compile.c
compile_def_function
/* vi:set ts=8 sts=4 sw=4 noet: * * VIM - Vi IMproved by Bram Moolenaar * * Do ":help uganda" in Vim to read copying and usage conditions. * Do ":help credits" in Vim to see a list of people who contributed. * See README.txt for an overview of the Vim source code. */ /* * vim9compile.c: compiling a :def funct...
/* vi:set ts=8 sts=4 sw=4 noet: * * VIM - Vi IMproved by Bram Moolenaar * * Do ":help uganda" in Vim to read copying and usage conditions. * Do ":help credits" in Vim to see a list of people who contributed. * See README.txt for an overview of the Vim source code. */ /* * vim9compile.c: compiling a :def funct...
compile_def_function( ufunc_T *ufunc, int check_return_type, compiletype_T compile_type, cctx_T *outer_cctx) { char_u *line = NULL; char_u *line_to_free = NULL; char_u *p; char *errormsg = NULL; // error message cctx_T cctx; garray_T *instr; int did_emsg_before = did_emsg; int ...
compile_def_function( ufunc_T *ufunc, int check_return_type, compiletype_T compile_type, cctx_T *outer_cctx) { char_u *line = NULL; char_u *line_to_free = NULL; char_u *p; char *errormsg = NULL; // error message cctx_T cctx; garray_T *instr; int did_emsg_before = did_emsg; int ...
{'added': [(815, 'compile_nested_function(exarg_T *eap, cctx_T *cctx, char_u **line_to_free)'), (820, ' int\t\toff;'), (821, ' char_u\t*func_name;'), (871, ''), (872, ' // This may free the current line, make a copy of the name.'), (873, ' off = is_global ? 2 : 0;'), (874, ' func_name = vim_strnsave(name...
20
14
2,545
14,097
https://github.com/vim/vim
CVE-2021-4173
['CWE-416']
vim9compile.c
compile_nested_function
/* vi:set ts=8 sts=4 sw=4 noet: * * VIM - Vi IMproved by Bram Moolenaar * * Do ":help uganda" in Vim to read copying and usage conditions. * Do ":help credits" in Vim to see a list of people who contributed. * See README.txt for an overview of the Vim source code. */ /* * vim9compile.c: compiling a :def funct...
/* vi:set ts=8 sts=4 sw=4 noet: * * VIM - Vi IMproved by Bram Moolenaar * * Do ":help uganda" in Vim to read copying and usage conditions. * Do ":help credits" in Vim to see a list of people who contributed. * See README.txt for an overview of the Vim source code. */ /* * vim9compile.c: compiling a :def funct...
compile_nested_function(exarg_T *eap, cctx_T *cctx) { int is_global = *eap->arg == 'g' && eap->arg[1] == ':'; char_u *name_start = eap->arg; char_u *name_end = to_name_end(eap->arg, TRUE); char_u *lambda_name; ufunc_T *ufunc; int r = FAIL; compiletype_T compile_type; if (eap->forcei...
compile_nested_function(exarg_T *eap, cctx_T *cctx, char_u **line_to_free) { int is_global = *eap->arg == 'g' && eap->arg[1] == ':'; char_u *name_start = eap->arg; char_u *name_end = to_name_end(eap->arg, TRUE); int off; char_u *func_name; char_u *lambda_name; ufunc_T *ufunc; int r = ...
{'added': [(815, 'compile_nested_function(exarg_T *eap, cctx_T *cctx, char_u **line_to_free)'), (820, ' int\t\toff;'), (821, ' char_u\t*func_name;'), (871, ''), (872, ' // This may free the current line, make a copy of the name.'), (873, ' off = is_global ? 2 : 0;'), (874, ' func_name = vim_strnsave(name...
20
14
2,545
14,097
https://github.com/vim/vim
CVE-2021-4173
['CWE-416']
sndfile.c
sf_open
/* ** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU Lesser General Public License as published by ** the Free Software Foundation; either version 2.1 of the License, or ** (at your option) any...
/* ** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU Lesser General Public License as published by ** the Free Software Foundation; either version 2.1 of the License, or ** (at your option) any...
sf_open (const char *path, int mode, SF_INFO *sfinfo) { SF_PRIVATE *psf ; /* Ultimate sanity check. */ assert (sizeof (sf_count_t) == 8) ; if ((psf = calloc (1, sizeof (SF_PRIVATE))) == NULL) { sf_errno = SFE_MALLOC_FAILED ; return NULL ; } ; psf_init_files (psf) ; psf_log_printf (psf, "File : %s\n", pat...
sf_open (const char *path, int mode, SF_INFO *sfinfo) { SF_PRIVATE *psf ; /* Ultimate sanity check. */ assert (sizeof (sf_count_t) == 8) ; if ((psf = psf_allocate ()) == NULL) { sf_errno = SFE_MALLOC_FAILED ; return NULL ; } ; psf_init_files (psf) ; psf_log_printf (psf, "File : %s\n", path) ; if (copy_...
{'added': [(270, '\t{\tSFE_BAD_HEADER_ALLOC \t, "Error : Required header allocation is too large." },'), (329, '\tif ((psf = psf_allocate ()) == NULL)'), (361, '\tif ((psf = psf_allocate ()) == NULL)'), (403, '\tif ((psf = psf_allocate ()) == NULL)'), (2691, '\tfree (psf->header.ptr) ;')], 'deleted': [(270, ''), (329, ...
5
4
2,307
15,935
https://github.com/erikd/libsndfile
CVE-2017-7586
['CWE-119']
sndfile.c
sf_open_fd
/* ** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU Lesser General Public License as published by ** the Free Software Foundation; either version 2.1 of the License, or ** (at your option) any...
/* ** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU Lesser General Public License as published by ** the Free Software Foundation; either version 2.1 of the License, or ** (at your option) any...
sf_open_fd (int fd, int mode, SF_INFO *sfinfo, int close_desc) { SF_PRIVATE *psf ; if ((SF_CONTAINER (sfinfo->format)) == SF_FORMAT_SD2) { sf_errno = SFE_SD2_FD_DISALLOWED ; return NULL ; } ; if ((psf = calloc (1, sizeof (SF_PRIVATE))) == NULL) { sf_errno = SFE_MALLOC_FAILED ; return NULL ; } ; psf_ini...
sf_open_fd (int fd, int mode, SF_INFO *sfinfo, int close_desc) { SF_PRIVATE *psf ; if ((SF_CONTAINER (sfinfo->format)) == SF_FORMAT_SD2) { sf_errno = SFE_SD2_FD_DISALLOWED ; return NULL ; } ; if ((psf = psf_allocate ()) == NULL) { sf_errno = SFE_MALLOC_FAILED ; return NULL ; } ; psf_init_files (psf) ; ...
{'added': [(270, '\t{\tSFE_BAD_HEADER_ALLOC \t, "Error : Required header allocation is too large." },'), (329, '\tif ((psf = psf_allocate ()) == NULL)'), (361, '\tif ((psf = psf_allocate ()) == NULL)'), (403, '\tif ((psf = psf_allocate ()) == NULL)'), (2691, '\tfree (psf->header.ptr) ;')], 'deleted': [(270, ''), (329, ...
5
4
2,307
15,935
https://github.com/erikd/libsndfile
CVE-2017-7586
['CWE-119']
sndfile.c
sf_open_virtual
/* ** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU Lesser General Public License as published by ** the Free Software Foundation; either version 2.1 of the License, or ** (at your option) any...
/* ** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU Lesser General Public License as published by ** the Free Software Foundation; either version 2.1 of the License, or ** (at your option) any...
sf_open_virtual (SF_VIRTUAL_IO *sfvirtual, int mode, SF_INFO *sfinfo, void *user_data) { SF_PRIVATE *psf ; /* Make sure we have a valid set ot virtual pointers. */ if (sfvirtual->get_filelen == NULL || sfvirtual->seek == NULL || sfvirtual->tell == NULL) { sf_errno = SFE_BAD_VIRTUAL_IO ; snprintf (sf_parselog, si...
sf_open_virtual (SF_VIRTUAL_IO *sfvirtual, int mode, SF_INFO *sfinfo, void *user_data) { SF_PRIVATE *psf ; /* Make sure we have a valid set ot virtual pointers. */ if (sfvirtual->get_filelen == NULL || sfvirtual->seek == NULL || sfvirtual->tell == NULL) { sf_errno = SFE_BAD_VIRTUAL_IO ; snprintf (sf_parselog, si...
{'added': [(270, '\t{\tSFE_BAD_HEADER_ALLOC \t, "Error : Required header allocation is too large." },'), (329, '\tif ((psf = psf_allocate ()) == NULL)'), (361, '\tif ((psf = psf_allocate ()) == NULL)'), (403, '\tif ((psf = psf_allocate ()) == NULL)'), (2691, '\tfree (psf->header.ptr) ;')], 'deleted': [(270, ''), (329, ...
5
4
2,307
15,935
https://github.com/erikd/libsndfile
CVE-2017-7586
['CWE-119']
aiff.c
aiff_read_chanmap
/* ** Copyright (C) 1999-2017 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2005 David Viens <davidv@plogue.com> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU Lesser General Public License as published by ** the Free Software Foundation; either ...
/* ** Copyright (C) 1999-2017 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2005 David Viens <davidv@plogue.com> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU Lesser General Public License as published by ** the Free Software Foundation; either ...
aiff_read_chanmap (SF_PRIVATE * psf, unsigned dword) { const AIFF_CAF_CHANNEL_MAP * map_info ; unsigned channel_bitmap, channel_decriptions, bytesread ; int layout_tag ; bytesread = psf_binheader_readf (psf, "444", &layout_tag, &channel_bitmap, &channel_decriptions) ; if ((map_info = aiff_caf_of_channel_layout_ta...
aiff_read_chanmap (SF_PRIVATE * psf, unsigned dword) { const AIFF_CAF_CHANNEL_MAP * map_info ; unsigned channel_bitmap, channel_decriptions, bytesread ; int layout_tag ; bytesread = psf_binheader_readf (psf, "444", &layout_tag, &channel_bitmap, &channel_decriptions) ; if ((map_info = aiff_caf_of_channel_layout_ta...
{'added': [(1762, '\t{\tsize_t chanmap_size = SF_MIN (psf->sf.channels, layout_tag & 0xffff) * sizeof (psf->channel_map [0]) ;')], 'deleted': [(1762, '\t{\tsize_t chanmap_size = psf->sf.channels * sizeof (psf->channel_map [0]) ;')]}
1
1
1,277
9,668
https://github.com/erikd/libsndfile
CVE-2017-6892
['CWE-119']
request_key_auth.c
key_get_instantiation_authkey
/* Request key authorisation token key definition. * * Copyright (C) 2005 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free ...
/* Request key authorisation token key definition. * * Copyright (C) 2005 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free ...
struct key *key_get_instantiation_authkey(key_serial_t target_id) { char description[16]; struct keyring_search_context ctx = { .index_key.type = &key_type_request_key_auth, .index_key.description = description, .cred = current_cred(), .match_data.cmp = user_match, .match_data.raw_data = description, ...
struct key *key_get_instantiation_authkey(key_serial_t target_id) { char description[16]; struct keyring_search_context ctx = { .index_key.type = &key_type_request_key_auth, .index_key.description = description, .cred = current_cred(), .match_data.cmp = key_default_cmp, .match_data.raw_data = descriptio...
{'added': [(249, '\t\t.match_data.cmp\t\t= key_default_cmp,')], 'deleted': [(249, '\t\t.match_data.cmp\t\t= user_match,')]}
1
1
184
1,122
https://github.com/torvalds/linux
CVE-2017-2647
['CWE-476']
parse.c
get_over
/* * Parsing functions. * * This file is part of abcm2ps. * * Copyright (C) 1998-2020 Jean-François Moine (http://moinejf.free.fr) * Adapted from abc2ps, Copyright (C) 1996-1998 Michael Methfessel * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser Ge...
/* * Parsing functions. * * This file is part of abcm2ps. * * Copyright (C) 1998-2020 Jean-François Moine (http://moinejf.free.fr) * Adapted from abc2ps, Copyright (C) 1996-1998 Michael Methfessel * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser Ge...
static void get_over(struct SYMBOL *s) { struct VOICE_S *p_voice, *p_voice2, *p_voice3; int range, voice, voice2, voice3; static char tx_wrong_dur[] = "Wrong duration in voice overlay"; static char txt_no_note[] = "No note in voice overlay"; /* treat the end of overlay */ p_voice = curvoice; if (p_voice->ignore) ...
static void get_over(struct SYMBOL *s) { struct VOICE_S *p_voice, *p_voice2, *p_voice3; int range, voice, voice2, voice3; static char tx_wrong_dur[] = "Wrong duration in voice overlay"; static char txt_no_note[] = "No note in voice overlay"; /* treat the end of overlay */ p_voice = curvoice; if (p_voice->ignore) ...
{'added': [(2015, '\t\tif (p_voice->time != over_mxtime) {'), (2016, '\t\t\terror(1, s, tx_wrong_dur);'), (2017, '\t\t\tif (p_voice->time > over_mxtime)'), (2018, '\t\t\t\tcurvoice->time = p_voice->time;'), (2019, '\t\t\telse'), (2020, '\t\t\t\tp_voice->time = curvoice->time;'), (2021, '\t\t}')], 'deleted': [(2014, '\t...
7
2
5,565
33,643
https://github.com/leesavide/abcm2ps
CVE-2021-32434
['CWE-125']
ebtables.c
ebt_size_mwt
/* * ebtables * * Author: * Bart De Schuymer <bdschuym@pandora.be> * * ebtables.c,v 2.0, July, 2002 * * This code is strongly inspired by the iptables code which is * Copyright (C) 1999 Paul `Rusty' Russell & Michael J. Neuling * * This program is free software; you can redistribute it and/or * mod...
/* * ebtables * * Author: * Bart De Schuymer <bdschuym@pandora.be> * * ebtables.c,v 2.0, July, 2002 * * This code is strongly inspired by the iptables code which is * Copyright (C) 1999 Paul `Rusty' Russell & Michael J. Neuling * * This program is free software; you can redistribute it and/or * mod...
static int ebt_size_mwt(struct compat_ebt_entry_mwt *match32, unsigned int size_left, enum compat_mwt type, struct ebt_entries_buf_state *state, const void *base) { int growth = 0; char *buf; if (size_left == 0) return 0; buf = (char *) match32; while (size_left >= sizeof(*match32)) { struct ebt_entry...
static int ebt_size_mwt(struct compat_ebt_entry_mwt *match32, unsigned int size_left, enum compat_mwt type, struct ebt_entries_buf_state *state, const void *base) { int growth = 0; char *buf; if (size_left == 0) return 0; buf = (char *) match32; while (size_left >= sizeof(*match32)) { struct ebt_entry...
{'added': [(2063, '\t\tif (WARN_ON(type == EBT_COMPAT_TARGET && size_left))'), (2064, '\t\t\treturn -EINVAL;'), (2065, ''), (2121, '\tfor (i = 0; i < 4 ; ++i) {'), (2122, '\t\tif (offsets[i] >= *total)'), (2123, '\t\t\treturn -EINVAL;'), (2124, '\t\tif (i == 0)'), (2125, '\t\t\tcontinue;'), (2126, '\t\tif (offsets[i-1]...
12
1
1,939
12,955
https://github.com/torvalds/linux
CVE-2018-1068
['CWE-787']
d1_lib.c
dtls1_clear_queues
/* ssl/d1_lib.c */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. */ /* ==================================================================== * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. * * Redistribution and use in sourc...
/* ssl/d1_lib.c */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. */ /* ==================================================================== * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. * * Redistribution and use in sourc...
static void dtls1_clear_queues(SSL *s) { pitem *item = NULL; hm_fragment *frag = NULL; DTLS1_RECORD_DATA *rdata; while( (item = pqueue_pop(s->d1->unprocessed_rcds.q)) != NULL) { rdata = (DTLS1_RECORD_DATA *) item->data; if (rdata->rbuf.buf) { OPENSSL_free(rdata->rbuf.buf); } ...
static void dtls1_clear_queues(SSL *s) { pitem *item = NULL; hm_fragment *frag = NULL; DTLS1_RECORD_DATA *rdata; while( (item = pqueue_pop(s->d1->unprocessed_rcds.q)) != NULL) { rdata = (DTLS1_RECORD_DATA *) item->data; if (rdata->rbuf.buf) { OPENSSL_free(rdata->rbuf.buf); } ...
{'added': [(205, '\t\trdata = (DTLS1_RECORD_DATA *) item->data;'), (206, '\t\tif (rdata->rbuf.buf)'), (207, '\t\t\t{'), (208, '\t\t\tOPENSSL_free(rdata->rbuf.buf);'), (209, '\t\t\t}'), (210, '\t\tOPENSSL_free(item->data);')], 'deleted': [(205, '\t\tfrag = (hm_fragment *)item->data;'), (206, '\t\tOPENSSL_free(frag->frag...
6
3
361
2,189
https://github.com/openssl/openssl
CVE-2014-8176
['CWE-119']
edge_proxy_common.c
edge_sparse_csr_reader_double
/****************************************************************************** ** Copyright (c) 2017-2018, Intel Corporation ** ** All rights reserved. ** ** ** ...
/****************************************************************************** ** Copyright (c) 2017-2018, Intel Corporation ** ** All rights reserved. ** ** ** ...
void edge_sparse_csr_reader_double( const char* i_csr_file_in, unsigned int** o_row_idx, unsigned int** o_column_idx, double** o_values, un...
void edge_sparse_csr_reader_double( const char* i_csr_file_in, unsigned int** o_row_idx, unsigned int** o_column_idx, double** o_values, un...
{'added': [(65, ' if (3 == sscanf(l_line, "%u %u %u", o_row_count, o_column_count, o_element_count) &&'), (66, ' 0 != *o_row_count && 0 != *o_column_count && 0 != *o_element_count)'), (67, ' {')], 'deleted': [(65, ' if ( sscanf(l_line, "%u %u %u", o_row_count, o_column_count, o_element_c...
3
1
103
762
https://github.com/hfp/libxsmm
CVE-2018-20541
['CWE-787']
debug.c
dump_mm
// SPDX-License-Identifier: GPL-2.0 /* * mm/debug.c * * mm/ specific debug routines. * */ #include <linux/kernel.h> #include <linux/mm.h> #include <linux/trace_events.h> #include <linux/memcontrol.h> #include <trace/events/mmflags.h> #include <linux/migrate.h> #include <linux/page_owner.h> #include "internal.h" ...
// SPDX-License-Identifier: GPL-2.0 /* * mm/debug.c * * mm/ specific debug routines. * */ #include <linux/kernel.h> #include <linux/mm.h> #include <linux/trace_events.h> #include <linux/memcontrol.h> #include <trace/events/mmflags.h> #include <linux/migrate.h> #include <linux/page_owner.h> #include "internal.h" ...
void dump_mm(const struct mm_struct *mm) { pr_emerg("mm %px mmap %px seqnum %d task_size %lu\n" #ifdef CONFIG_MMU "get_unmapped_area %px\n" #endif "mmap_base %lu mmap_legacy_base %lu highest_vm_end %lu\n" "pgd %px mm_users %d mm_count %d pgtables_bytes %lu map_count %d\n" "hiwater_rss %lx hiwater_vm %lx total_...
void dump_mm(const struct mm_struct *mm) { pr_emerg("mm %px mmap %px seqnum %llu task_size %lu\n" #ifdef CONFIG_MMU "get_unmapped_area %px\n" #endif "mmap_base %lu mmap_legacy_base %lu highest_vm_end %lu\n" "pgd %px mm_users %d mm_count %d pgtables_bytes %lu map_count %d\n" "hiwater_rss %lx hiwater_vm %lx tota...
{'added': [(117, '\tpr_emerg("mm %px mmap %px seqnum %llu task_size %lu\\n"'), (145, '\t\tmm, mm->mmap, (long long) mm->vmacache_seqnum, mm->task_size,')], 'deleted': [(117, '\tpr_emerg("mm %px mmap %px seqnum %d task_size %lu\\n"'), (145, '\t\tmm, mm->mmap, mm->vmacache_seqnum, mm->task_size,')]}
2
2
117
631
https://github.com/torvalds/linux
CVE-2018-17182
['CWE-416']
smart_pkt.c
git_pkt_parse_line
/* * Copyright (C) the libgit2 contributors. All rights reserved. * * This file is part of libgit2, distributed under the GNU GPL v2 with * a Linking Exception. For full terms see the included COPYING file. */ #include "common.h" #include "git2/types.h" #include "git2/errors.h" #include "git2/refs.h" #include "g...
/* * Copyright (C) the libgit2 contributors. All rights reserved. * * This file is part of libgit2, distributed under the GNU GPL v2 with * a Linking Exception. For full terms see the included COPYING file. */ #include "common.h" #include "git2/types.h" #include "git2/errors.h" #include "git2/refs.h" #include "g...
int git_pkt_parse_line( git_pkt **head, const char *line, const char **out, size_t bufflen) { int ret; int32_t len; /* Not even enough for the length */ if (bufflen > 0 && bufflen < PKT_LEN_SIZE) return GIT_EBUFS; len = parse_len(line); if (len < 0) { /* * If we fail to parse the length, it might be bec...
int git_pkt_parse_line( git_pkt **head, const char *line, const char **out, size_t bufflen) { int ret; int32_t len; /* Not even enough for the length */ if (bufflen > 0 && bufflen < PKT_LEN_SIZE) return GIT_EBUFS; len = parse_len(line); if (len < 0) { /* * If we fail to parse the length, it might be bec...
{'added': [(440, '\t * The Git protocol does not specify empty lines as part'), (441, '\t * of the protocol. Not knowing what to do with an empty'), (442, '\t * line, we should return an error upon hitting one.'), (445, '\t\tgiterr_set_str(GITERR_NET, "Invalid empty packet");'), (446, '\t\treturn GIT_ERROR;')], 'delete...
5
5
431
2,777
https://github.com/libgit2/libgit2
CVE-2016-10129
['CWE-476']
riff.c
ParseRiffHeaderConfig
//////////////////////////////////////////////////////////////////////////// // **** WAVPACK **** // // Hybrid Lossless Wavefile Compressor // // Copyright (c) 1998 - 2016 David Bryant. // // ...
//////////////////////////////////////////////////////////////////////////// // **** WAVPACK **** // // Hybrid Lossless Wavefile Compressor // // Copyright (c) 1998 - 2016 David Bryant. // // ...
int ParseRiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, WavpackContext *wpc, WavpackConfig *config) { int is_rf64 = !strncmp (fourcc, "RF64", 4), got_ds64 = 0; int64_t total_samples = 0, infilesize; RiffChunkHeader riff_chunk_header; ChunkHeader chunk_header; WaveHeader WaveHeader; ...
int ParseRiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, WavpackContext *wpc, WavpackConfig *config) { int is_rf64 = !strncmp (fourcc, "RF64", 4), got_ds64 = 0; int64_t total_samples = 0, infilesize; RiffChunkHeader riff_chunk_header; ChunkHeader chunk_header; WaveHeader WaveHeader; ...
{'added': [(289, ' char *buff;'), (290, ''), (291, ' if (bytes_to_copy < 0 || bytes_to_copy > 4194304) {'), (292, ' error_line ("%s is not a valid .WAV file!", infilename);'), (293, ' return WAVPACK_SOFT_ERROR;'), (294, ' }'), (295, ''), (296, ' ...
8
1
361
2,721
https://github.com/dbry/WavPack
CVE-2018-10538
['CWE-787']
sas_expander.c
smp_task_done
/* * Serial Attached SCSI (SAS) Expander discovery and configuration * * Copyright (C) 2005 Adaptec, Inc. All rights reserved. * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com> * * This file is licensed under GPLv2. * * This program is free software; you can redistribute it and/or * modify it under...
/* * Serial Attached SCSI (SAS) Expander discovery and configuration * * Copyright (C) 2005 Adaptec, Inc. All rights reserved. * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com> * * This file is licensed under GPLv2. * * This program is free software; you can redistribute it and/or * modify it under...
static void smp_task_done(struct sas_task *task) { if (!del_timer(&task->slow_task->timer)) return; complete(&task->slow_task->completion); }
static void smp_task_done(struct sas_task *task) { del_timer(&task->slow_task->timer); complete(&task->slow_task->completion); }
{'added': [(51, '\tif (!(task->task_state_flags & SAS_TASK_STATE_DONE)) {'), (53, '\t\tcomplete(&task->slow_task->completion);'), (54, '\t}'), (60, '\tdel_timer(&task->slow_task->timer);')], 'deleted': [(51, '\tif (!(task->task_state_flags & SAS_TASK_STATE_DONE))'), (54, ''), (55, '\tcomplete(&task->slow_task->completi...
4
5
1,724
10,440
https://github.com/torvalds/linux
CVE-2018-20836
['CWE-416', 'CWE-362']
sas_expander.c
smp_task_timedout
/* * Serial Attached SCSI (SAS) Expander discovery and configuration * * Copyright (C) 2005 Adaptec, Inc. All rights reserved. * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com> * * This file is licensed under GPLv2. * * This program is free software; you can redistribute it and/or * modify it under...
/* * Serial Attached SCSI (SAS) Expander discovery and configuration * * Copyright (C) 2005 Adaptec, Inc. All rights reserved. * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com> * * This file is licensed under GPLv2. * * This program is free software; you can redistribute it and/or * modify it under...
static void smp_task_timedout(struct timer_list *t) { struct sas_task_slow *slow = from_timer(slow, t, timer); struct sas_task *task = slow->task; unsigned long flags; spin_lock_irqsave(&task->task_state_lock, flags); if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) task->task_state_flags |= SAS_TASK_STATE_...
static void smp_task_timedout(struct timer_list *t) { struct sas_task_slow *slow = from_timer(slow, t, timer); struct sas_task *task = slow->task; unsigned long flags; spin_lock_irqsave(&task->task_state_lock, flags); if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) { task->task_state_flags |= SAS_TASK_STAT...
{'added': [(51, '\tif (!(task->task_state_flags & SAS_TASK_STATE_DONE)) {'), (53, '\t\tcomplete(&task->slow_task->completion);'), (54, '\t}'), (60, '\tdel_timer(&task->slow_task->timer);')], 'deleted': [(51, '\tif (!(task->task_state_flags & SAS_TASK_STATE_DONE))'), (54, ''), (55, '\tcomplete(&task->slow_task->completi...
4
5
1,724
10,440
https://github.com/torvalds/linux
CVE-2018-20836
['CWE-416', 'CWE-362']
msnd_midi.c
snd_msndmidi_input_read
/* * Copyright (c) by Jaroslav Kysela <perex@perex.cz> * Copyright (c) 2009 by Krzysztof Helt * Routines for control of MPU-401 in UART mode * * MPU-401 supports UART mode which is not capable generate transmit * interrupts thus output is done via polling. Also, if irq < 0, then * input is done also via po...
/* * Copyright (c) by Jaroslav Kysela <perex@perex.cz> * Copyright (c) 2009 by Krzysztof Helt * Routines for control of MPU-401 in UART mode * * MPU-401 supports UART mode which is not capable generate transmit * interrupts thus output is done via polling. Also, if irq < 0, then * input is done also via po...
void snd_msndmidi_input_read(void *mpuv) { unsigned long flags; struct snd_msndmidi *mpu = mpuv; void *pwMIDQData = mpu->dev->mappedbase + MIDQ_DATA_BUFF; spin_lock_irqsave(&mpu->input_lock, flags); while (readw(mpu->dev->MIDQ + JQS_wTail) != readw(mpu->dev->MIDQ + JQS_wHead)) { u16 wTmp, val; val = r...
void snd_msndmidi_input_read(void *mpuv) { unsigned long flags; struct snd_msndmidi *mpu = mpuv; void *pwMIDQData = mpu->dev->mappedbase + MIDQ_DATA_BUFF; u16 head, tail, size; spin_lock_irqsave(&mpu->input_lock, flags); head = readw(mpu->dev->MIDQ + JQS_wHead); tail = readw(mpu->dev->MIDQ + JQS_wTail); size =...
{'added': [(123, '\tu16 head, tail, size;'), (126, '\thead = readw(mpu->dev->MIDQ + JQS_wHead);'), (127, '\ttail = readw(mpu->dev->MIDQ + JQS_wTail);'), (128, '\tsize = readw(mpu->dev->MIDQ + JQS_wSize);'), (129, '\tif (head > size || tail > size)'), (130, '\t\tgoto out;'), (131, '\twhile (head != tail) {'), (132, '\t\...
15
15
120
697
https://github.com/torvalds/linux
CVE-2017-9984
['CWE-125']
keyring.c
__releases
/* Keyring handling * * Copyright (C) 2004-2005, 2008, 2013 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Found...
/* Keyring handling * * Copyright (C) 2004-2005, 2008, 2013 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Found...
__releases(&keyring_serialise_link_sem) { BUG_ON(index_key->type == NULL); kenter("%d,%s,", keyring->serial, index_key->type->name); if (index_key->type == &key_type_keyring) up_write(&keyring_serialise_link_sem); if (edit && !edit->dead_leaf) { key_payload_reserve(keyring, keyring->datalen - KEYQUOT...
__releases(&keyring_serialise_link_sem) { BUG_ON(index_key->type == NULL); kenter("%d,%s,", keyring->serial, index_key->type->name); if (index_key->type == &key_type_keyring) up_write(&keyring_serialise_link_sem); if (edit) { if (!edit->dead_leaf) { key_payload_reserve(keyring, keyring->datalen - KEYQ...
{'added': [(1184, '\tif (edit) {'), (1185, '\t\tif (!edit->dead_leaf) {'), (1186, '\t\t\tkey_payload_reserve(keyring,'), (1187, '\t\t\t\tkeyring->datalen - KEYQUOTA_LINK_BYTES);'), (1188, '\t\t}')], 'deleted': [(1184, '\tif (edit && !edit->dead_leaf) {'), (1185, '\t\tkey_payload_reserve(keyring,'), (1186, '\t\t\t\t ...
5
3
864
5,382
https://github.com/torvalds/linux
CVE-2015-1333
['CWE-119']
af_x25.c
x25_recvmsg
/* * X.25 Packet Layer release 002 * * This is ALPHA test software. This code may break your machine, * randomly fail to work with new releases, misbehave and/or generally * screw up. It might even work. * * This code REQUIRES 2.1.15 or higher * * This module: * This module is free software; you can redistri...
/* * X.25 Packet Layer release 002 * * This is ALPHA test software. This code may break your machine, * randomly fail to work with new releases, misbehave and/or generally * screw up. It might even work. * * This code REQUIRES 2.1.15 or higher * * This module: * This module is free software; you can redistri...
static int x25_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t size, int flags) { struct sock *sk = sock->sk; struct x25_sock *x25 = x25_sk(sk); struct sockaddr_x25 *sx25 = (struct sockaddr_x25 *)msg->msg_name; size_t copied; int qbit, header_len; struct sk_buff *skb;...
static int x25_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t size, int flags) { struct sock *sk = sock->sk; struct x25_sock *x25 = x25_sk(sk); struct sockaddr_x25 *sx25 = (struct sockaddr_x25 *)msg->msg_name; size_t copied; int qbit, header_len; struct sk_buff *skb;...
{'added': [(1343, '\t\tmsg->msg_namelen = sizeof(*sx25);')], 'deleted': [(1345, '\tmsg->msg_namelen = sizeof(struct sockaddr_x25);'), (1346, '')]}
1
2
1,395
7,920
https://github.com/torvalds/linux
CVE-2013-7266
['CWE-20']
tls.c
processClientServerHello
/* * tls.c - TLS/TLS/DTLS dissector * * Copyright (C) 2016-21 - ntop.org * * nDPI is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later...
/* * tls.c - TLS/TLS/DTLS dissector * * Copyright (C) 2016-21 - ntop.org * * nDPI is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later...
int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow, uint32_t quic_version) { struct ndpi_packet_struct *packet = &flow->packet; union ja3_info ja3; u_int8_t invalid_ja3 = 0; u_int16_t tls_version, ja3_str_len; char ja3_str[JA3_STR_LEN]; ndpi_...
int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow, uint32_t quic_version) { struct ndpi_packet_struct *packet = &flow->packet; union ja3_info ja3; u_int8_t invalid_ja3 = 0; u_int16_t tls_version, ja3_str_len; char ja3_str[JA3_STR_LEN]; ndpi_...
{'added': [(1372, ' ja3_str_len = snprintf(ja3_str, JA3_STR_LEN, "%u,", ja3.server.tls_handshake_version);'), (1374, ' for(i=0; (i<ja3.server.num_cipher) && (JA3_STR_LEN > ja3_str_len); i++) {'), (1375, '\trc = snprintf(&ja3_str[ja3_str_len], JA3_STR_LEN-ja3_str_len, "%s%u", (i > 0) ? "-" : "", ja3.server.cip...
23
21
1,368
12,328
https://github.com/ntop/nDPI
CVE-2021-36082
['CWE-787']
print-pim.c
cisco_autorp_print
/* * Copyright (c) 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entiret...
/* * Copyright (c) 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entiret...
cisco_autorp_print(netdissect_options *ndo, register const u_char *bp, register u_int len) { int type; int numrps; int hold; ND_TCHECK(bp[0]); ND_PRINT((ndo, " auto-rp ")); type = bp[0]; switch (type) { case 0x11: ND_PRINT((ndo, "candidate-advert")); break; case 0x12: ND_PRINT((ndo, "...
cisco_autorp_print(netdissect_options *ndo, register const u_char *bp, register u_int len) { int type; int numrps; int hold; if (len < 8) goto trunc; ND_TCHECK(bp[0]); ND_PRINT((ndo, " auto-rp ")); type = bp[0]; switch (type) { case 0x11: ND_PRINT((ndo, "candidate-advert")); break; c...
{'added': [(172, '\tif (len < sizeof(struct in_addr))'), (173, '\t\tgoto trunc;'), (178, '\tbp += 4;'), (179, '\tlen -= 4;'), (180, '\tif (len < 4)'), (181, '\t\tgoto trunc;'), (182, '\tND_TCHECK2(bp[2], 2);'), (186, '\tunsigned_relts_print(ndo, EXTRACT_16BITS(&bp[2]));'), (189, '\tbp += 4;'), (190, '\tlen -= 4;'), (19...
207
176
890
5,856
https://github.com/the-tcpdump-group/tcpdump
CVE-2017-13030
['CWE-125']
print-pim.c
pim_print
/* * Copyright (c) 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entiret...
/* * Copyright (c) 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entiret...
pim_print(netdissect_options *ndo, register const u_char *bp, register u_int len, const u_char *bp2) { register const u_char *ep; register const struct pim *pim = (const struct pim *)bp; ep = (const u_char *)ndo->ndo_snapend; if (bp >= ep) return; #ifdef notyet /* currently we see only version and ty...
pim_print(netdissect_options *ndo, register const u_char *bp, register u_int len, const u_char *bp2) { register const struct pim *pim = (const struct pim *)bp; #ifdef notyet /* currently we see only version and type */ ND_TCHECK(pim->pim_rsv); #endif ND_TCHECK(pim->pim_typever); switch (PIM_VER(pim->p...
{'added': [(172, '\tif (len < sizeof(struct in_addr))'), (173, '\t\tgoto trunc;'), (178, '\tbp += 4;'), (179, '\tlen -= 4;'), (180, '\tif (len < 4)'), (181, '\t\tgoto trunc;'), (182, '\tND_TCHECK2(bp[2], 2);'), (186, '\tunsigned_relts_print(ndo, EXTRACT_16BITS(&bp[2]));'), (189, '\tbp += 4;'), (190, '\tlen -= 4;'), (19...
207
176
890
5,856
https://github.com/the-tcpdump-group/tcpdump
CVE-2017-13030
['CWE-125']
print-pim.c
pimv1_join_prune_print
/* * Copyright (c) 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entiret...
/* * Copyright (c) 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entiret...
pimv1_join_prune_print(netdissect_options *ndo, register const u_char *bp, register u_int len) { int ngroups, njoin, nprune; int njp; /* If it's a single group and a single source, use 1-line output. */ if (ND_TTEST2(bp[0], 30) && bp[11] == 1 && ((njoin = EXTRACT_16BITS(&bp[20])) + EXTR...
pimv1_join_prune_print(netdissect_options *ndo, register const u_char *bp, register u_int len) { int ngroups, njoin, nprune; int njp; /* If it's a single group and a single source, use 1-line output. */ if (ND_TTEST2(bp[0], 30) && bp[11] == 1 && ((njoin = EXTRACT_16BITS(&bp[20])) + EXTR...
{'added': [(172, '\tif (len < sizeof(struct in_addr))'), (173, '\t\tgoto trunc;'), (178, '\tbp += 4;'), (179, '\tlen -= 4;'), (180, '\tif (len < 4)'), (181, '\t\tgoto trunc;'), (182, '\tND_TCHECK2(bp[2], 2);'), (186, '\tunsigned_relts_print(ndo, EXTRACT_16BITS(&bp[2]));'), (189, '\tbp += 4;'), (190, '\tlen -= 4;'), (19...
207
176
890
5,856
https://github.com/the-tcpdump-group/tcpdump
CVE-2017-13030
['CWE-125']
print-pim.c
pimv1_print
/* * Copyright (c) 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entiret...
/* * Copyright (c) 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entiret...
pimv1_print(netdissect_options *ndo, register const u_char *bp, register u_int len) { register const u_char *ep; register u_char type; ep = (const u_char *)ndo->ndo_snapend; if (bp >= ep) return; ND_TCHECK(bp[1]); type = bp[1]; ND_PRINT((ndo, " %s", tok2str(pimv1_type_str, "[type %u]", type))); ...
pimv1_print(netdissect_options *ndo, register const u_char *bp, register u_int len) { register u_char type; ND_TCHECK(bp[1]); type = bp[1]; ND_PRINT((ndo, " %s", tok2str(pimv1_type_str, "[type %u]", type))); switch (type) { case PIMV1_TYPE_QUERY: if (ND_TTEST(bp[8])) { switch (bp[8] >> 4) { ...
{'added': [(172, '\tif (len < sizeof(struct in_addr))'), (173, '\t\tgoto trunc;'), (178, '\tbp += 4;'), (179, '\tlen -= 4;'), (180, '\tif (len < 4)'), (181, '\t\tgoto trunc;'), (182, '\tND_TCHECK2(bp[2], 2);'), (186, '\tunsigned_relts_print(ndo, EXTRACT_16BITS(&bp[2]));'), (189, '\tbp += 4;'), (190, '\tlen -= 4;'), (19...
207
176
890
5,856
https://github.com/the-tcpdump-group/tcpdump
CVE-2017-13030
['CWE-125']
print-pim.c
pimv2_addr_print
/* * Copyright (c) 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entiret...
/* * Copyright (c) 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entiret...
pimv2_addr_print(netdissect_options *ndo, const u_char *bp, enum pimv2_addrtype at, int silent) { int af; int len, hdrlen; ND_TCHECK(bp[0]); if (pimv2_addr_len == 0) { ND_TCHECK(bp[1]); switch (bp[0]) { case 1: af = AF_INET; len = sizeof(struct in_addr); break; case 2: af = AF...
pimv2_addr_print(netdissect_options *ndo, const u_char *bp, u_int len, enum pimv2_addrtype at, u_int addr_len, int silent) { int af; int hdrlen; if (addr_len == 0) { if (len < 2) goto trunc; ND_TCHECK(bp[1]); switch (bp[0]) { case 1: af = AF_INET; addr_len = (u_int...
{'added': [(172, '\tif (len < sizeof(struct in_addr))'), (173, '\t\tgoto trunc;'), (178, '\tbp += 4;'), (179, '\tlen -= 4;'), (180, '\tif (len < 4)'), (181, '\t\tgoto trunc;'), (182, '\tND_TCHECK2(bp[2], 2);'), (186, '\tunsigned_relts_print(ndo, EXTRACT_16BITS(&bp[2]));'), (189, '\tbp += 4;'), (190, '\tlen -= 4;'), (19...
207
176
890
5,856
https://github.com/the-tcpdump-group/tcpdump
CVE-2017-13030
['CWE-125']
print-pim.c
pimv2_print
/* * Copyright (c) 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entiret...
/* * Copyright (c) 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entiret...
pimv2_print(netdissect_options *ndo, register const u_char *bp, register u_int len, const u_char *bp2) { register const u_char *ep; register const struct pim *pim = (const struct pim *)bp; int advance; enum checksum_status cksum_status; ep = (const u_char *)ndo->ndo_snapend; if (bp >= ep) return; ...
pimv2_print(netdissect_options *ndo, register const u_char *bp, register u_int len, const u_char *bp2) { register const u_char *ep; register const struct pim *pim = (const struct pim *)bp; int advance; enum checksum_status cksum_status; int pimv2_addr_len; ep = (const u_char *)ndo->ndo_snapend; if (...
{'added': [(172, '\tif (len < sizeof(struct in_addr))'), (173, '\t\tgoto trunc;'), (178, '\tbp += 4;'), (179, '\tlen -= 4;'), (180, '\tif (len < 4)'), (181, '\t\tgoto trunc;'), (182, '\tND_TCHECK2(bp[2], 2);'), (186, '\tunsigned_relts_print(ndo, EXTRACT_16BITS(&bp[2]));'), (189, '\tbp += 4;'), (190, '\tlen -= 4;'), (19...
207
176
890
5,856
https://github.com/the-tcpdump-group/tcpdump
CVE-2017-13030
['CWE-125']
print-atm.c
atm_if_print
/* * Copyright (c) 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in...
/* * Copyright (c) 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in...
atm_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { u_int caplen = h->caplen; u_int length = h->len; uint32_t llchdr; u_int hdrlen = 0; if (caplen < 1 || length < 1) { ND_PRINT((ndo, "%s", tstr)); return (caplen); } /* Cisco Style NLPID ? */ if ...
atm_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { u_int caplen = h->caplen; u_int length = h->len; uint32_t llchdr; u_int hdrlen = 0; if (caplen < 1 || length < 1) { ND_PRINT((ndo, "%s", tstr)); return (caplen); } /* Cisco Style NLPID ? */ if ...
{'added': [(265, ' isoclns_print(ndo, p + 1, length - 1);')], 'deleted': [(265, ' isoclns_print(ndo, p + 1, length - 1, caplen - 1);')]}
1
1
304
1,824
https://github.com/the-tcpdump-group/tcpdump
CVE-2017-12897
['CWE-125']
stm32h7xx_eth_driver.c
stm32h7xxEthInitGpio
/** * @file stm32h7xx_eth_driver.c * @brief STM32H7 Ethernet MAC driver * * @section License * * SPDX-License-Identifier: GPL-2.0-or-later * * Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * * This file is part of CycloneTCP Open. * * This program is free software; you can redistribute it...
/** * @file stm32h7xx_eth_driver.c * @brief STM32H7 Ethernet MAC driver * * @section License * * SPDX-License-Identifier: GPL-2.0-or-later * * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved. * * This file is part of CycloneTCP Open. * * This program is free software; you can redistribute it...
void stm32h7xxEthInitGpio(NetInterface *interface) { GPIO_InitTypeDef GPIO_InitStructure; //STM32F743I-EVAL, STM32F747I-EVAL or STM32H747I-Discovery evaluation board? #if defined(USE_STM32H743I_EVAL) || defined(USE_STM32H747I_EVAL) || \ defined(USE_STM32H747I_DISCO) //Enable SYSCFG clock __HAL_RCC_SYSCFG_C...
void stm32h7xxEthInitGpio(NetInterface *interface) { GPIO_InitTypeDef GPIO_InitStructure; //STM32F743I-EVAL, STM32F747I-EVAL or STM32H747I-Discovery evaluation board? #if defined(USE_STM32H743I_EVAL) || defined(USE_STM32H747I_EVAL) || \ defined(USE_STM32H747I_DISCO) //Enable SYSCFG clock __HAL_RCC_SYSCFG_C...
{'added': [(9, ' * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.'), (28, ' * @version 2.0.2'), (258, '//STM32F743I-EVAL, STM32F747I-EVAL, STM32H735G-DK, STM32H745I-Discovery,'), (259, '//STM32H747I-Discovery, STM32H750B-DK, Nucleo-H723ZG, Nucleo-H743ZI,'), (260, '//Nucleo-H743ZI2 or Nucleo-H745ZI-Q e...
45
11
531
2,891
https://github.com/Oryx-Embedded/CycloneTCP
CVE-2021-26788
['CWE-20']
openssl.c
ossl_connect_step1
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
static CURLcode ossl_connect_step1(struct Curl_easy *data, struct connectdata *conn, int sockindex) { CURLcode result = CURLE_OK; char *ciphers; SSL_METHOD_QUAL SSL_METHOD *req_method = NULL; X509_LOOKUP *lookup = NULL; curl_socket_t sockfd = conn->sock[sockindex]; struct ...
static CURLcode ossl_connect_step1(struct Curl_easy *data, struct connectdata *conn, int sockindex) { CURLcode result = CURLE_OK; char *ciphers; SSL_METHOD_QUAL SSL_METHOD *req_method = NULL; X509_LOOKUP *lookup = NULL; curl_socket_t sockfd = conn->sock[sockindex]; struct ...
{'added': [(243, 'static void ossl_associate_connection(struct Curl_easy *data,'), (244, ' struct connectdata *conn,'), (245, ' int sockindex);'), (246, ''), (2588, ' void *ssl_sessionid = NULL;'), (3233, ' ossl_associate_connection(data, conn,...
107
39
2,985
16,423
https://github.com/curl/curl
CVE-2021-22901
['CWE-416']
http_common.c
httpCheckCharset
/** * @file http_common.c * @brief Definitions common to HTTP client and server * * @section License * * SPDX-License-Identifier: GPL-2.0-or-later * * Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * * This file is part of CycloneTCP Open. * * This program is free software; you can redistr...
/** * @file http_common.c * @brief Definitions common to HTTP client and server * * @section License * * SPDX-License-Identifier: GPL-2.0-or-later * * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved. * * This file is part of CycloneTCP Open. * * This program is free software; you can redistr...
error_t httpCheckCharset(const char_t *s, size_t length, uint_t charset) { error_t error; size_t i; uint8_t c; uint_t m; //Initialize status code error = NO_ERROR; //Parse string for(i = 0; i < length; i++) { //Get current character c = (uint8_t) s[i]; //Any 8-bit sequenc...
error_t httpCheckCharset(const char_t *s, size_t length, uint_t charset) { error_t error; size_t i; uint8_t c; uint_t m; //Initialize status code error = NO_ERROR; //Parse string for(i = 0; i < length; i++) { //Get current character c = (uint8_t) s[i]; //Any 8-bit sequenc...
{'added': [(9, ' * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.'), (28, ' * @version 2.0.2'), (97, ' if(osStrchr("!#$%&\'*+-.^_`|~", c))'), (166, ' else if(isalnum(c) || osStrchr("!#$%&\'*+-.^_`|~", c) || c >= 128)'), (199, ' else if(isalnum(c) || osStrchr("!#$%&\'*+-.^_`|~", c)...
8
9
271
1,293
https://github.com/Oryx-Embedded/CycloneTCP
CVE-2021-26788
['CWE-20']
http_common.c
httpParseParam
/** * @file http_common.c * @brief Definitions common to HTTP client and server * * @section License * * SPDX-License-Identifier: GPL-2.0-or-later * * Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * * This file is part of CycloneTCP Open. * * This program is free software; you can redistr...
/** * @file http_common.c * @brief Definitions common to HTTP client and server * * @section License * * SPDX-License-Identifier: GPL-2.0-or-later * * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved. * * This file is part of CycloneTCP Open. * * This program is free software; you can redistr...
error_t httpParseParam(const char_t **pos, HttpParam *param) { error_t error; size_t i; uint8_t c; bool_t escapeFlag; bool_t separatorFound; const char_t *p; //Check parameters if(pos == NULL || param == NULL) return ERROR_INVALID_PARAMETER; //Initialize structure param->name = NUL...
error_t httpParseParam(const char_t **pos, HttpParam *param) { error_t error; size_t i; uint8_t c; bool_t escapeFlag; bool_t separatorFound; const char_t *p; //Check parameters if(pos == NULL || param == NULL) return ERROR_INVALID_PARAMETER; //Initialize structure param->name = NUL...
{'added': [(9, ' * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.'), (28, ' * @version 2.0.2'), (97, ' if(osStrchr("!#$%&\'*+-.^_`|~", c))'), (166, ' else if(isalnum(c) || osStrchr("!#$%&\'*+-.^_`|~", c) || c >= 128)'), (199, ' else if(isalnum(c) || osStrchr("!#$%&\'*+-.^_`|~", c)...
8
9
271
1,293
https://github.com/Oryx-Embedded/CycloneTCP
CVE-2021-26788
['CWE-20']
jpg_dec.c
jpg_dec_parseopts
/* * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights...
/* * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights...
static int jpg_dec_parseopts(char *optstr, jpg_dec_importopts_t *opts) { jas_tvparser_t *tvp; opts->max_size = 0; if (!(tvp = jas_tvparser_create(optstr ? optstr : ""))) { return -1; } while (!jas_tvparser_next(tvp)) { switch (jas_taginfo_nonull(jas_taginfos_lookup(decopts, jas_tvparser_gettag(tvp)))->i...
static int jpg_dec_parseopts(char *optstr, jpg_dec_importopts_t *opts) { jas_tvparser_t *tvp; opts->max_samples = 64 * JAS_MEBI; if (!(tvp = jas_tvparser_create(optstr ? optstr : ""))) { return -1; } while (!jas_tvparser_next(tvp)) { switch (jas_taginfo_nonull(jas_taginfos_lookup(decopts, jas_tvparser_g...
{'added': [(83, 'typedef struct {'), (84, '\tsize_t max_samples;'), (85, '} jpg_dec_importopts_t;'), (86, ''), (87, 'typedef enum {'), (88, '\tOPT_MAXSIZE,'), (89, '} optid_t;'), (90, ''), (138, '* Option parsing.'), (142, '\t{OPT_MAXSIZE, "max_samples"},'), (150, '\topts->max_samples = 64 * JAS_MEBI;'), (160, '\t\t\to...
27
25
280
1,669
https://github.com/mdadams/jasper
CVE-2016-9395
['CWE-20']
jpg_dec.c
jpg_decode
/* * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights...
/* * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights...
jas_image_t *jpg_decode(jas_stream_t *in, char *optstr) { struct jpeg_decompress_struct cinfo; struct jpeg_error_mgr jerr; FILE *input_file; jpg_dest_t dest_mgr_buf; jpg_dest_t *dest_mgr = &dest_mgr_buf; JDIMENSION num_scanlines; jas_image_t *image; int ret; jpg_dec_importopts_t opts; size_t size; if (jpg_d...
jas_image_t *jpg_decode(jas_stream_t *in, char *optstr) { struct jpeg_decompress_struct cinfo; struct jpeg_error_mgr jerr; FILE *input_file; jpg_dest_t dest_mgr_buf; jpg_dest_t *dest_mgr = &dest_mgr_buf; JDIMENSION num_scanlines; jas_image_t *image; int ret; jpg_dec_importopts_t opts; size_t num_samples; JA...
{'added': [(83, 'typedef struct {'), (84, '\tsize_t max_samples;'), (85, '} jpg_dec_importopts_t;'), (86, ''), (87, 'typedef enum {'), (88, '\tOPT_MAXSIZE,'), (89, '} optid_t;'), (90, ''), (138, '* Option parsing.'), (142, '\t{OPT_MAXSIZE, "max_samples"},'), (150, '\topts->max_samples = 64 * JAS_MEBI;'), (160, '\t\t\to...
27
25
280
1,669
https://github.com/mdadams/jasper
CVE-2016-9395
['CWE-20']
processor.c
set_content_type
/* * Copyright (C) Tildeslash Ltd. All rights reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even th...
/* * Copyright (C) Tildeslash Ltd. All rights reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even th...
void set_content_type(HttpResponse res, const char *mime) { set_header(res, "Content-Type", mime); }
void set_content_type(HttpResponse res, const char *mime) { set_header(res, "Content-Type", "%s", mime); }
{'added': [(244, 'void set_header(HttpResponse res, const char *name, const char *value, ...) {'), (252, ' va_list ap;'), (253, ' va_start(ap, value);'), (254, ' h->value = Str_vcat(value, ap);'), (255, ' va_end(ap);'), (291, ' set_header(res, "Content-Type", "%s", mime);'), (448, ' ...
33
3
581
3,625
https://bitbucket.org/tildeslash/monit
CVE-2016-7067
['CWE-352']
processor.c
set_header
/* * Copyright (C) Tildeslash Ltd. All rights reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even th...
/* * Copyright (C) Tildeslash Ltd. All rights reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even th...
void set_header(HttpResponse res, const char *name, const char *value) { HttpHeader h = NULL; ASSERT(res); ASSERT(name); NEW(h); h->name = Str_dup(name); h->value = Str_dup(value); if (res->headers) { HttpHeader n, p; for (n = p =...
void set_header(HttpResponse res, const char *name, const char *value, ...) { HttpHeader h = NULL; ASSERT(res); ASSERT(name); NEW(h); h->name = Str_dup(name); va_list ap; va_start(ap, value); h->value = Str_vcat(value, ap); va_end(ap); if...
{'added': [(244, 'void set_header(HttpResponse res, const char *name, const char *value, ...) {'), (252, ' va_list ap;'), (253, ' va_start(ap, value);'), (254, ' h->value = Str_vcat(value, ap);'), (255, ' va_end(ap);'), (291, ' set_header(res, "Content-Type", "%s", mime);'), (448, ' ...
33
3
581
3,625
https://bitbucket.org/tildeslash/monit
CVE-2016-7067
['CWE-352']
heap_overflow.c
main
/** * Test that the crafted TGA file doesn't trigger OOB reads. */ #include "gd.h" #include "gdtest.h" static size_t read_test_file(char **buffer, char *basename); int main() { gdImagePtr im; char *buffer; size_t size; size = read_test_file(&buffer, "heap_overflow.tga"); im = gdImageCreateF...
/** * Test that crafted TGA files don't trigger OOB reads. */ #include "gd.h" #include "gdtest.h" static void check_file(char *basename); static size_t read_test_file(char **buffer, char *basename); int main() { check_file("heap_overflow_1.tga"); check_file("heap_overflow_2.tga"); return gdNumFailu...
int main() { gdImagePtr im; char *buffer; size_t size; size = read_test_file(&buffer, "heap_overflow.tga"); im = gdImageCreateFromTgaPtr(size, (void *) buffer); gdTestAssert(im == NULL); free(buffer); return gdNumFailures(); }
int main() { check_file("heap_overflow_1.tga"); check_file("heap_overflow_2.tga"); return gdNumFailures(); }
{'added': [(2, " * Test that crafted TGA files don't trigger OOB reads."), (10, 'static void check_file(char *basename);'), (15, '{'), (16, ' check_file("heap_overflow_1.tga");'), (17, ' check_file("heap_overflow_2.tga");'), (18, ''), (19, ' return gdNumFailures();'), (20, '}'), (21, ''), (22, ''), (23, 'stati...
12
4
39
233
https://github.com/libgd/libgd
CVE-2016-6906
['CWE-125']
big_key.c
big_key_init
/* Large capacity key type * * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public Licence * as published by the Free Software Foundation; eit...
/* Large capacity key type * * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public Licence * as published by the Free Software Foundation; eit...
static int __init big_key_init(void) { return register_key_type(&key_type_big_key); }
static int __init big_key_init(void) { struct crypto_skcipher *cipher; struct crypto_rng *rng; int ret; rng = crypto_alloc_rng(big_key_rng_name, 0, 0); if (IS_ERR(rng)) { pr_err("Can't alloc rng: %ld\n", PTR_ERR(rng)); return PTR_ERR(rng); } big_key_rng = rng; /* seed RNG */ ret = crypto_rng_reset(rng, ...
{'added': [(12, '#define pr_fmt(fmt) "big_key: "fmt'), (345, '\tstruct crypto_skcipher *cipher;'), (346, '\tstruct crypto_rng *rng;'), (347, '\tint ret;'), (349, '\trng = crypto_alloc_rng(big_key_rng_name, 0, 0);'), (350, '\tif (IS_ERR(rng)) {'), (351, '\t\tpr_err("Can\'t alloc rng: %ld\\n", PTR_ERR(rng));'), (352, '\t...
32
27
241
1,430
https://github.com/torvalds/linux
CVE-2016-9313
['CWE-476']
media.c
Media_CheckDataEntry
/* * GPAC - Multimedia Framework C SDK * * Authors: Jean Le Feuvre * Copyright (c) Telecom ParisTech 2000-2019 * All rights reserved * * This file is part of GPAC / ISO Media File Format sub-project * * GPAC is free software; you can redistribute it and/or modify * it under the terms of the GNU L...
/* * GPAC - Multimedia Framework C SDK * * Authors: Jean Le Feuvre * Copyright (c) Telecom ParisTech 2000-2019 * All rights reserved * * This file is part of GPAC / ISO Media File Format sub-project * * GPAC is free software; you can redistribute it and/or modify * it under the terms of the GNU L...
GF_Err Media_CheckDataEntry(GF_MediaBox *mdia, u32 dataEntryIndex) { GF_DataEntryURLBox *entry; GF_DataMap *map; GF_Err e; if (!mdia || !dataEntryIndex || dataEntryIndex > gf_list_count(mdia->information->dataInformation->dref->child_boxes)) return GF_BAD_PARAM; entry = (GF_DataEntryURLBox*)gf_list_get(mdia->inf...
GF_Err Media_CheckDataEntry(GF_MediaBox *mdia, u32 dataEntryIndex) { GF_DataEntryURLBox *entry; GF_DataMap *map; GF_Err e; if (!mdia || !dataEntryIndex || dataEntryIndex > gf_list_count(mdia->information->dataInformation->dref->child_boxes)) return GF_BAD_PARAM; entry = (GF_DataEntryURLBox*)gf_list_get(mdia->info...
{'added': [(687, '\t//we only support alias and URL boxes'), (688, '\tif ((entry->type != GF_ISOM_BOX_TYPE_URL) && (entry->type != GF_QT_BOX_TYPE_ALIS) )'), (689, '\t\treturn GF_NOT_SUPPORTED;'), (690, '')], 'deleted': [(677, ''), (688, "\t//we don't know what's a URN yet"), (689, '\tif (entry->type == GF_ISOM_BOX_TYPE...
4
3
949
7,411
https://github.com/gpac/gpac
CVE-2021-32137
['CWE-787']
print-isoclns.c
esis_print
/* * Copyright (c) 1992, 1993, 1994, 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragr...
/* * Copyright (c) 1992, 1993, 1994, 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragr...
esis_print(netdissect_options *ndo, const uint8_t *pptr, u_int length) { const uint8_t *optr; u_int li,esis_pdu_type,source_address_length, source_address_number; const struct esis_header_t *esis_header; if (!ndo->ndo_eflag) ND_PRINT((ndo, "ES-IS")); if (length <= 2) { ND_PRINT((ndo, ndo->ndo_qfla...
esis_print(netdissect_options *ndo, const uint8_t *pptr, u_int length) { const uint8_t *optr; u_int li,esis_pdu_type,source_address_length, source_address_number; const struct esis_header_t *esis_header; if (!ndo->ndo_eflag) ND_PRINT((ndo, "ES-IS")); if (length <= 2) { ND_PRINT((ndo, ndo->ndo_qfla...
{'added': [(1220, '\t\tif (snpal == 6)'), (1221, '\t\t\tND_PRINT((ndo, "\\n\\t SNPA (length: %u): %s",'), (1222, '\t\t\t snpal,'), (1223, '\t\t\t etheraddr_string(ndo, snpa)));'), (1225, '\t\t\tND_PRINT((ndo, "\\n\\t SNPA (length: %u): %s",'), (1226, '\t\t\t snpal,'), (1227, '\t\t\t linkaddr_s...
11
3
2,411
14,646
https://github.com/the-tcpdump-group/tcpdump
CVE-2017-13016
['CWE-125']
mpegts.c
gf_m2ts_process_pat
/* * GPAC - Multimedia Framework C SDK * * Authors: Jean Le Feuvre * Copyright (c) Telecom ParisTech 2005-2012 * * This file is part of GPAC / MPEG2-TS sub-project * * GPAC is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as publishe...
/* * GPAC - Multimedia Framework C SDK * * Authors: Jean Le Feuvre * Copyright (c) Telecom ParisTech 2005-2012 * * This file is part of GPAC / MPEG2-TS sub-project * * GPAC is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as publishe...
static void gf_m2ts_process_pat(GF_M2TS_Demuxer *ts, GF_M2TS_SECTION_ES *ses, GF_List *sections, u8 table_id, u16 ex_table_id, u8 version_number, u8 last_section_number, u32 status) { GF_M2TS_Program *prog; GF_M2TS_SECTION_ES *pmt; u32 i, nb_progs, evt_type; u32 nb_sections; u32 data_size; unsigned char *data; G...
static void gf_m2ts_process_pat(GF_M2TS_Demuxer *ts, GF_M2TS_SECTION_ES *ses, GF_List *sections, u8 table_id, u16 ex_table_id, u8 version_number, u8 last_section_number, u32 status) { GF_M2TS_Program *prog; GF_M2TS_SECTION_ES *pmt; u32 i, nb_progs, evt_type; u32 nb_sections; u32 data_size; unsigned char *data; G...
{'added': [(1670, '\t\t} else if (!pid) {'), (1671, '\t\t\tGF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("Broken PAT found reserved PID 0, ignoring\\n", pid));'), (1672, '\t\t} else if (! ts->ess[pid]) {')], 'deleted': [(1670, '\t\t} else {')]}
3
1
2,469
18,945
https://github.com/gpac/gpac
CVE-2019-20628
['CWE-416']
utils.c
avcodec_open2
/* * utils for libavcodec * Copyright (c) 2001 Fabrice Bellard * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the...
/* * utils for libavcodec * Copyright (c) 2001 Fabrice Bellard * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the...
int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options) { int ret = 0; int codec_init_ok = 0; AVDictionary *tmp = NULL; const AVPixFmtDescriptor *pixdesc; if (avcodec_is_open(avctx)) return 0; if ((!codec && !avctx->codec)) { a...
int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options) { int ret = 0; int codec_init_ok = 0; AVDictionary *tmp = NULL; const AVPixFmtDescriptor *pixdesc; if (avcodec_is_open(avctx)) return 0; if ((!codec && !avctx->codec)) { a...
{'added': [(1027, ' if (avctx->codec && avctx->codec->close &&')], 'deleted': [(1027, ' if (avctx->codec &&')]}
1
1
1,874
12,221
https://github.com/FFmpeg/FFmpeg
CVE-2019-17539
['CWE-476']
verifier.c
regsafe
/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com * Copyright (c) 2016 Facebook * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * License as published by the Free Software Foundation. * * This program is distributed in th...
/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com * Copyright (c) 2016 Facebook * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * License as published by the Free Software Foundation. * * This program is distributed in th...
static bool regsafe(struct bpf_reg_state *rold, struct bpf_reg_state *rcur, struct idpair *idmap) { if (!(rold->live & REG_LIVE_READ)) /* explored state didn't use this */ return true; if (memcmp(rold, rcur, offsetof(struct bpf_reg_state, live)) == 0) return true; if (rold->type == NOT_INIT) /* explo...
static bool regsafe(struct bpf_reg_state *rold, struct bpf_reg_state *rcur, struct idpair *idmap) { if (!(rold->live & REG_LIVE_READ)) /* explored state didn't use this */ return true; if (memcmp(rold, rcur, offsetof(struct bpf_reg_state, live)) == 0) return true; if (rold->type == NOT_INIT) /* explo...
{'added': [(3470, "\t\t\t/* We're trying to use a pointer in place of a scalar."), (3471, '\t\t\t * Even if the scalar was unbounded, this could lead to'), (3472, '\t\t\t * pointer leaks because scalars are allowed to leak'), (3473, '\t\t\t * while pointers are not. We could make this safe in'), (3474, "\t\t\t * specia...
7
8
3,247
20,660
https://github.com/torvalds/linux
CVE-2017-17855
['CWE-119']
print-nfs.c
nfs_printfh
/* * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above co...
/* * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above co...
nfs_printfh(netdissect_options *ndo, register const uint32_t *dp, const u_int len) { my_fsid fsid; uint32_t ino; const char *sfsname = NULL; char *spacep; if (ndo->ndo_uflag) { u_int i; char const *sep = ""; ND_PRINT((ndo, " fh[")); for (i=0; i<len; i++) { ND_PRINT((ndo, "%s%x", sep, dp[i]...
nfs_printfh(netdissect_options *ndo, register const uint32_t *dp, const u_int len) { my_fsid fsid; uint32_t ino; const char *sfsname = NULL; char *spacep; if (ndo->ndo_uflag) { u_int i; char const *sep = ""; ND_PRINT((ndo, " fh[")); for (i=0; i<len; i++) { ND_PRINT((ndo, "%s%x", sep, dp[i]...
{'added': [(810, '\t\tchar temp[NFSX_V3FHMAX+1];'), (811, '\t\tu_int stringlen;'), (814, '\t\tstringlen = len;'), (815, '\t\tif (stringlen > NFSX_V3FHMAX)'), (816, '\t\t\tstringlen = NFSX_V3FHMAX;'), (817, '\t\tstrncpy(temp, sfsname, stringlen);'), (818, "\t\ttemp[stringlen] = '\\0';")], 'deleted': [(810, '\t\tstatic c...
7
3
1,404
9,297
https://github.com/the-tcpdump-group/tcpdump
CVE-2017-13001
['CWE-125']
pack-bitmap.c
show_object
#include "cache.h" #include "commit.h" #include "tag.h" #include "diff.h" #include "revision.h" #include "progress.h" #include "list-objects.h" #include "pack.h" #include "pack-bitmap.h" #include "pack-revindex.h" #include "pack-objects.h" /* * An entry on the bitmap index, representing the bitmap for a given * comm...
#include "cache.h" #include "commit.h" #include "tag.h" #include "diff.h" #include "revision.h" #include "progress.h" #include "list-objects.h" #include "pack.h" #include "pack-bitmap.h" #include "pack-revindex.h" #include "pack-objects.h" /* * An entry on the bitmap index, representing the bitmap for a given * comm...
static void show_object(struct object *object, struct strbuf *path, const char *last, void *data) { struct bitmap *base = data; int bitmap_pos; bitmap_pos = bitmap_position(object->oid.hash); if (bitmap_pos < 0) { char *name = path_name(path, last); bitmap_pos = ext_index_add_object(object, name); free(n...
static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base = data; int bitmap_pos; bitmap_pos = bitmap_position(object->oid.hash); if (bitmap_pos < 0) bitmap_pos = ext_index_add_object(object, name); bitmap_set(base, bitmap_pos); }
{'added': [(417, 'static void show_object(struct object *object, const char *name, void *data)'), (424, '\tif (bitmap_pos < 0)'), (893, 'static void test_show_object(struct object *object, const char *name,'), (894, '\t\t\t void *data)')], 'deleted': [(417, 'static void show_object(struct object *object, struct str...
4
9
744
4,729
https://github.com/git/git
CVE-2016-2315
['CWE-119']
pack-bitmap.c
test_show_object
#include "cache.h" #include "commit.h" #include "tag.h" #include "diff.h" #include "revision.h" #include "progress.h" #include "list-objects.h" #include "pack.h" #include "pack-bitmap.h" #include "pack-revindex.h" #include "pack-objects.h" /* * An entry on the bitmap index, representing the bitmap for a given * comm...
#include "cache.h" #include "commit.h" #include "tag.h" #include "diff.h" #include "revision.h" #include "progress.h" #include "list-objects.h" #include "pack.h" #include "pack-bitmap.h" #include "pack-revindex.h" #include "pack-objects.h" /* * An entry on the bitmap index, representing the bitmap for a given * comm...
static void test_show_object(struct object *object, struct strbuf *path, const char *last, void *data) { struct bitmap_test_data *tdata = data; int bitmap_pos; bitmap_pos = bitmap_position(object->oid.hash); if (bitmap_pos < 0) die("Object not in bitmap: %s\n", oid_to_hex(&object->oid)); bitmap...
static void test_show_object(struct object *object, const char *name, void *data) { struct bitmap_test_data *tdata = data; int bitmap_pos; bitmap_pos = bitmap_position(object->oid.hash); if (bitmap_pos < 0) die("Object not in bitmap: %s\n", oid_to_hex(&object->oid)); bitmap_set(tdata->base, bitmap_pos)...
{'added': [(417, 'static void show_object(struct object *object, const char *name, void *data)'), (424, '\tif (bitmap_pos < 0)'), (893, 'static void test_show_object(struct object *object, const char *name,'), (894, '\t\t\t void *data)')], 'deleted': [(417, 'static void show_object(struct object *object, struct str...
4
9
744
4,729
https://github.com/git/git
CVE-2016-2315
['CWE-119']
tlb.c
flush_tlb_mm_range
#include <linux/init.h> #include <linux/mm.h> #include <linux/spinlock.h> #include <linux/smp.h> #include <linux/interrupt.h> #include <linux/module.h> #include <linux/cpu.h> #include <asm/tlbflush.h> #include <asm/mmu_context.h> #include <asm/cache.h> #include <asm/apic.h> #include <asm/uv/uv.h> #include <linux/debu...
#include <linux/init.h> #include <linux/mm.h> #include <linux/spinlock.h> #include <linux/smp.h> #include <linux/interrupt.h> #include <linux/module.h> #include <linux/cpu.h> #include <asm/tlbflush.h> #include <asm/mmu_context.h> #include <asm/cache.h> #include <asm/apic.h> #include <asm/uv/uv.h> #include <linux/debu...
void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start, unsigned long end, unsigned long vmflag) { unsigned long addr; /* do a global flush by default */ unsigned long base_pages_to_flush = TLB_FLUSH_ALL; preempt_disable(); if (current->active_mm != mm) goto out; if (!current->mm) { leave_mm(...
void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start, unsigned long end, unsigned long vmflag) { unsigned long addr; /* do a global flush by default */ unsigned long base_pages_to_flush = TLB_FLUSH_ALL; preempt_disable(); if (current->active_mm != mm) { /* Synchronize with switch_mm. */ smp_m...
{'added': [(164, ''), (165, '\t/* This is an implicit full barrier that synchronizes with switch_mm. */'), (167, ''), (194, '\tif (current->active_mm != mm) {'), (195, '\t\t/* Synchronize with switch_mm. */'), (196, '\t\tsmp_mb();'), (197, ''), (199, '\t}'), (203, ''), (204, '\t\t/* Synchronize with switch_mm. */'), (2...
26
3
211
1,177
https://github.com/torvalds/linux
CVE-2016-2069
['CWE-362']
tlb.c
flush_tlb_page
#include <linux/init.h> #include <linux/mm.h> #include <linux/spinlock.h> #include <linux/smp.h> #include <linux/interrupt.h> #include <linux/module.h> #include <linux/cpu.h> #include <asm/tlbflush.h> #include <asm/mmu_context.h> #include <asm/cache.h> #include <asm/apic.h> #include <asm/uv/uv.h> #include <linux/debu...
#include <linux/init.h> #include <linux/mm.h> #include <linux/spinlock.h> #include <linux/smp.h> #include <linux/interrupt.h> #include <linux/module.h> #include <linux/cpu.h> #include <asm/tlbflush.h> #include <asm/mmu_context.h> #include <asm/cache.h> #include <asm/apic.h> #include <asm/uv/uv.h> #include <linux/debu...
void flush_tlb_page(struct vm_area_struct *vma, unsigned long start) { struct mm_struct *mm = vma->vm_mm; preempt_disable(); if (current->active_mm == mm) { if (current->mm) __flush_tlb_one(start); else leave_mm(smp_processor_id()); } if (cpumask_any_but(mm_cpumask(mm), smp_processor_id()) < nr_cpu_id...
void flush_tlb_page(struct vm_area_struct *vma, unsigned long start) { struct mm_struct *mm = vma->vm_mm; preempt_disable(); if (current->active_mm == mm) { if (current->mm) { /* * Implicit full barrier (INVLPG) that synchronizes * with switch_mm. */ __flush_tlb_one(start); } else { leave_...
{'added': [(164, ''), (165, '\t/* This is an implicit full barrier that synchronizes with switch_mm. */'), (167, ''), (194, '\tif (current->active_mm != mm) {'), (195, '\t\t/* Synchronize with switch_mm. */'), (196, '\t\tsmp_mb();'), (197, ''), (199, '\t}'), (203, ''), (204, '\t\t/* Synchronize with switch_mm. */'), (2...
26
3
211
1,177
https://github.com/torvalds/linux
CVE-2016-2069
['CWE-362']
cil_reset_ast.c
cil_reset_classperms_set
#include "cil_internal.h" #include "cil_log.h" #include "cil_list.h" #include "cil_reset_ast.h" #include "cil_symtab.h" static inline void cil_reset_classperms_list(struct cil_list *cp_list); static inline void cil_reset_level(struct cil_level *level); static inline void cil_reset_levelrange(struct cil_levelrange *le...
#include "cil_internal.h" #include "cil_log.h" #include "cil_list.h" #include "cil_reset_ast.h" #include "cil_symtab.h" static inline void cil_reset_classperms_list(struct cil_list *cp_list); static inline void cil_reset_level(struct cil_level *level); static inline void cil_reset_levelrange(struct cil_levelrange *le...
static void cil_reset_classperms_set(struct cil_classperms_set *cp_set) { cil_reset_classpermission(cp_set->set); }
static void cil_reset_classperms_set(struct cil_classperms_set *cp_set) { if (cp_set == NULL) { return; } cp_set->set = NULL; }
{'added': [(62, '\tif (cp_set == NULL) {'), (63, '\t\treturn;'), (64, '\t}'), (65, ''), (66, '\tcp_set->set = NULL;')], 'deleted': [(62, '\tcil_reset_classpermission(cp_set->set);')]}
5
1
505
2,377
https://github.com/SELinuxProject/selinux
CVE-2021-36086
['CWE-416']
rose_loopback.c
rose_loopback_timer
/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.u...
/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.u...
static void rose_loopback_timer(unsigned long param) { struct sk_buff *skb; struct net_device *dev; rose_address *dest; struct sock *sk; unsigned short frametype; unsigned int lci_i, lci_o; while ((skb = skb_dequeue(&loopback_queue)) != NULL) { lci_i = ((skb->data[0] << 8) & 0xF00) + ((skb->data[1] << 0) ...
static void rose_loopback_timer(unsigned long param) { struct sk_buff *skb; struct net_device *dev; rose_address *dest; struct sock *sk; unsigned short frametype; unsigned int lci_i, lci_o; while ((skb = skb_dequeue(&loopback_queue)) != NULL) { if (skb->len < ROSE_MIN_LEN) { kfree_skb(skb); continue; ...
{'added': [(76, '\t\tif (skb->len < ROSE_MIN_LEN) {'), (77, '\t\t\tkfree_skb(skb);'), (78, '\t\t\tcontinue;'), (79, '\t\t}'), (82, '\t\tif (frametype == ROSE_CALL_REQUEST &&'), (83, '\t\t (skb->len <= ROSE_CALL_REQ_FACILITIES_OFF ||'), (84, '\t\t skb->data[ROSE_CALL_REQ_ADDR_LEN_OFF] !='), (85, '\t\t ROSE_CA...
12
1
93
492
https://github.com/torvalds/linux
CVE-2011-4914
['CWE-20']
gd_tiff.c
createFromTiffRgba
/* TIFF - Tagged Image File Format Encapsulation for GD Library gd_tiff.c Copyright (C) Pierre-A. Joye, M. Retallack --------------------------------------------------------------------------- ** ** Permission to use, copy, modify, and distribute this software and its ** documentation for any pur...
/* TIFF - Tagged Image File Format Encapsulation for GD Library gd_tiff.c Copyright (C) Pierre-A. Joye, M. Retallack --------------------------------------------------------------------------- ** ** Permission to use, copy, modify, and distribute this software and its ** documentation for any pur...
static int createFromTiffRgba(TIFF * tif, gdImagePtr im) { int a; int x, y; int alphaBlendingFlag = 0; int color; int width = im->sx; int height = im->sy; uint32 *buffer; uint32 rgba; /* switch off colour merging on target gd image just while we write out * content - we want to preserve the alpha data until...
static int createFromTiffRgba(TIFF * tif, gdImagePtr im) { int a; int x, y; int alphaBlendingFlag = 0; int color; int width = im->sx; int height = im->sy; uint32 *buffer; uint32 rgba; int success; /* switch off colour merging on target gd image just while we write out * content - we want to preserve the al...
{'added': [(762, '\tint success;'), (775, '\tsuccess = TIFFReadRGBAImage(tif, width, height, buffer, 1);'), (776, ''), (777, '\tif (success) {'), (778, '\t\tfor(y = 0; y < height; y++) {'), (779, '\t\t\tfor(x = 0; x < width; x++) {'), (780, "\t\t\t\t/* if it doesn't already exist, allocate a new colour,"), (781, '\t\t\...
16
13
736
4,609
https://github.com/libgd/libgd
CVE-2016-6911
['CWE-125']
var_unserializer.c
object_common1
/* Generated by re2c 0.13.7.5 */ #line 1 "ext/standard/var_unserializer.re" /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c...
/* Generated by re2c 0.13.7.5 */ #line 1 "ext/standard/var_unserializer.re" /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c...
static inline long object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce) { long elements; elements = parse_iv2((*p) + 2, p); (*p) += 2; if (ce->serialize == NULL) { object_init_ex(*rval, ce); } else { /* If this class implements Serializable, it should not land here but in object_custom(). The passed ...
static inline long object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce) { long elements; if( *p >= max - 2) { zend_error(E_WARNING, "Bad unserialize data"); return -1; } elements = parse_iv2((*p) + 2, p); (*p) += 2; if (ce->serialize == NULL) { object_init_ex(*rval, ce); } else { /* If this cl...
{'added': [(408, '\tif( *p >= max - 2) {'), (409, '\t\tzend_error(E_WARNING, "Bad unserialize data");'), (410, '\t\treturn -1;'), (411, '\t}'), (412, ''), (423, '\t\treturn -1;'), (500, '#line 501 "ext/standard/var_unserializer.c"'), (560, '#line 875 "ext/standard/var_unserializer.re"'), (562, '#line 563 "ext/standard/...
47
33
1,073
6,905
https://github.com/php/php-src
CVE-2016-10161
['CWE-125']
var_unserializer.c
php_var_unserialize
/* Generated by re2c 0.13.7.5 */ #line 1 "ext/standard/var_unserializer.re" /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c...
/* Generated by re2c 0.13.7.5 */ #line 1 "ext/standard/var_unserializer.re" /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c...
PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER) { const unsigned char *cursor, *limit, *marker, *start; zval **rval_ref; limit = max; cursor = *p; if (YYCURSOR >= YYLIMIT) { return 0; } if (var_hash && cursor[0] != 'R') { var_push(var_hash, rval); } start = cursor; #line 496 "ext/standard/var...
PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER) { const unsigned char *cursor, *limit, *marker, *start; zval **rval_ref; limit = max; cursor = *p; if (YYCURSOR >= YYLIMIT) { return 0; } if (var_hash && cursor[0] != 'R') { var_push(var_hash, rval); } start = cursor; #line 501 "ext/standard/var...
{'added': [(408, '\tif( *p >= max - 2) {'), (409, '\t\tzend_error(E_WARNING, "Bad unserialize data");'), (410, '\t\treturn -1;'), (411, '\t}'), (412, ''), (423, '\t\treturn -1;'), (500, '#line 501 "ext/standard/var_unserializer.c"'), (560, '#line 875 "ext/standard/var_unserializer.re"'), (562, '#line 563 "ext/standard/...
47
33
1,073
6,905
https://github.com/php/php-src
CVE-2016-10161
['CWE-125']
elf.c
store_versioninfo_gnu_verdef
/* radare - LGPL - Copyright 2008-2017 - nibble, pancake, alvaro_fe */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <r_types.h> #include <r_util.h> #include "elf.h" #ifdef IFDBG #undef IFDBG #endif #define DO_THE_DBG 0 #define IFDBG if (DO_THE_DBG) #define IFINT if (0) #de...
/* radare - LGPL - Copyright 2008-2017 - nibble, pancake, alvaro_fe */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <r_types.h> #include <r_util.h> #include "elf.h" #ifdef IFDBG #undef IFDBG #endif #define DO_THE_DBG 0 #define IFDBG if (DO_THE_DBG) #define IFINT if (0) #de...
static Sdb *store_versioninfo_gnu_verdef(ELFOBJ *bin, Elf_(Shdr) *shdr, int sz) { const char *section_name = ""; const char *link_section_name = ""; char *end = NULL; Elf_(Shdr) *link_shdr = NULL; ut8 dfs[sizeof (Elf_(Verdef))] = {0}; Sdb *sdb; int cnt, i; if (shdr->sh_link > bin->ehdr.e_shnum) { return false...
static Sdb *store_versioninfo_gnu_verdef(ELFOBJ *bin, Elf_(Shdr) *shdr, int sz) { const char *section_name = ""; const char *link_section_name = ""; char *end = NULL; Elf_(Shdr) *link_shdr = NULL; ut8 dfs[sizeof (Elf_(Verdef))] = {0}; Sdb *sdb; int cnt, i; if (shdr->sh_link > bin->ehdr.e_shnum) { return false...
{'added': [(737, '\t\tsize_t vstart_off = i;'), (753, '\t\tif (vdaux < 1 || shdr->sh_size - vstart_off < vdaux) {'), (758, '\t\tvstart_off += vdaux;'), (786, '\t\t\tvstart_off += aux.vda_next;')], 'deleted': [(752, '\t\tif (vdaux < 1 || vstart + vdaux < vstart) {')]}
4
1
2,833
21,486
https://github.com/radare/radare2
CVE-2017-16359
['CWE-476']
foreign.c
vips_foreign_load_start
/* foreign file formats base class * * 7/2/12 * - add support for sequential reads * 18/6/12 * - flatten alpha with vips_flatten() * 28/5/13 * - auto rshift down to 8 bits during save * 19/1/14 * - pack and unpack rad to scrgb * 18/8/14 * - fix conversion to 16-bit RGB, thanks John * 18/6/15 * - forw...
/* foreign file formats base class * * 7/2/12 * - add support for sequential reads * 18/6/12 * - flatten alpha with vips_flatten() * 28/5/13 * - auto rshift down to 8 bits during save * 19/1/14 * - pack and unpack rad to scrgb * 18/8/14 * - fix conversion to 16-bit RGB, thanks John * 18/6/15 * - forw...
vips_foreign_load_start( VipsImage *out, void *a, void *b ) { VipsForeignLoad *load = VIPS_FOREIGN_LOAD( b ); VipsForeignLoadClass *class = VIPS_FOREIGN_LOAD_GET_CLASS( load ); if( !load->real ) { if( !(load->real = vips_foreign_load_temp( load )) ) return( NULL ); #ifdef DEBUG printf( "vips_foreign_load_st...
vips_foreign_load_start( VipsImage *out, void *a, void *b ) { VipsForeignLoad *load = VIPS_FOREIGN_LOAD( b ); VipsForeignLoadClass *class = VIPS_FOREIGN_LOAD_GET_CLASS( load ); /* If this start has failed before in another thread, we can fail now. */ if( load->error ) return( NULL ); if( !load->real ) { if...
{'added': [(21, ' * 5/3/18'), (22, ' * \t- block _start if one start fails, see #893'), (801, '\t/* If this start has failed before in another thread, we can fail now.'), (802, '\t */'), (803, '\tif( load->error )'), (804, '\t\treturn( NULL );'), (805, ''), (829, '\t\t/* Load the image and check the result.'), (830, '\...
19
6
959
5,271
https://github.com/jcupitt/libvips
CVE-2018-7998
['CWE-476', 'CWE-362']
ne.c
r_bin_ne_get_relocs
/* radare - LGPL - Copyright 2019-2022 - GustavoLCR */ #include "ne.h" #define NE_BUG 0 static char *__get_target_os(r_bin_ne_obj_t *bin) { switch (bin->ne_header->targOS) { case 1: return "OS/2"; case 2: return "Windows"; case 3: return "European MS-DOS 4.x"; case 4: return "Windows 386"; case 5: ret...
/* radare - LGPL - Copyright 2019-2022 - GustavoLCR */ #include "ne.h" static char *__get_target_os(r_bin_ne_obj_t *bin) { switch (bin->ne_header->targOS) { case 1: return "OS/2"; case 2: return "Windows"; case 3: return "European MS-DOS 4.x"; case 4: return "Windows 386"; case 5: return "BOSS (Borlan...
RList *r_bin_ne_get_relocs(r_bin_ne_obj_t *bin) { RList *segments = bin->segments; if (!segments) { return NULL; } RList *entries = bin->entries; if (!entries) { return NULL; } RList *symbols = bin->symbols; if (!symbols) { return NULL; } ut16 *modref = calloc (bin->ne_header->ModRefs, sizeof (ut16)); ...
RList *r_bin_ne_get_relocs(r_bin_ne_obj_t *bin) { RList *segments = bin->segments; if (!segments) { return NULL; } RList *entries = bin->entries; if (!entries) { return NULL; } RList *symbols = bin->symbols; if (!symbols) { return NULL; } ut16 *modref = calloc (bin->ne_header->ModRefs, sizeof (ut16)); ...
{'added': [(507, '\t\t\t\tchar *name = NULL;'), (510, '\t\t\t\t} else if (rel.index > 0) {'), (516, '\t\t\t\t\tchar *fname = __func_name_from_ord (name, rel.func_ord);'), (517, '\t\t\t\t\timp->name = r_str_newf ("%s.%s", name, fname);'), (518, '\t\t\t\t\tfree (fname);'), (561, '#define NE_BUG 0')], 'deleted': [(4, '#de...
6
13
619
3,727
https://github.com/radareorg/radare2
CVE-2022-1296
['CWE-125']
jpc_t2cod.c
jpc_pi_nextcprl
/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image P...
/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image P...
static int jpc_pi_nextcprl(register jpc_pi_t *pi) { int rlvlno; jpc_pirlvl_t *pirlvl; jpc_pchg_t *pchg; int prchind; int prcvind; int *prclyrno; uint_fast32_t trx0; uint_fast32_t try0; uint_fast32_t r; uint_fast32_t rpx; uint_fast32_t rpy; pchg = pi->pchg; if (!pi->prgvolfirst) { goto skip; } else { ...
static int jpc_pi_nextcprl(register jpc_pi_t *pi) { int rlvlno; jpc_pirlvl_t *pirlvl; jpc_pchg_t *pchg; int prchind; int prcvind; int *prclyrno; uint_fast32_t trx0; uint_fast32_t try0; uint_fast32_t r; uint_fast32_t rpx; uint_fast32_t rpy; pchg = pi->pchg; if (!pi->prgvolfirst) { goto skip; } else { ...
{'added': [(201, '\t\t\t pi->compno < JAS_CAST(int, pchg->compnoend); ++pi->compno,'), (202, '\t\t\t ++pi->picomp) {'), (251, '\t\t\t\t// Check for the potential for overflow problems.'), (252, '\t\t\t\tif (pirlvl->prcwidthexpn + pi->picomp->numrlvls >'), (253, '\t\t\t\t JAS_UINTFAST32_NUMBITS - 2 ||'), (254, '\t\t\...
77
53
595
4,400
https://github.com/mdadams/jasper
CVE-2016-9583
['CWE-125']
jpc_t2cod.c
jpc_pi_nextpcrl
/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image P...
/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image P...
static int jpc_pi_nextpcrl(register jpc_pi_t *pi) { int rlvlno; jpc_pirlvl_t *pirlvl; jpc_pchg_t *pchg; int prchind; int prcvind; int *prclyrno; int compno; jpc_picomp_t *picomp; int xstep; int ystep; uint_fast32_t trx0; uint_fast32_t try0; uint_fast32_t r; uint_fast32_t rpx; uint_fast32_t rpy; pchg = ...
static int jpc_pi_nextpcrl(register jpc_pi_t *pi) { int rlvlno; jpc_pirlvl_t *pirlvl; jpc_pchg_t *pchg; int prchind; int prcvind; int *prclyrno; int compno; jpc_picomp_t *picomp; int xstep; int ystep; uint_fast32_t trx0; uint_fast32_t try0; uint_fast32_t r; uint_fast32_t rpx; uint_fast32_t rpy; pchg = ...
{'added': [(201, '\t\t\t pi->compno < JAS_CAST(int, pchg->compnoend); ++pi->compno,'), (202, '\t\t\t ++pi->picomp) {'), (251, '\t\t\t\t// Check for the potential for overflow problems.'), (252, '\t\t\t\tif (pirlvl->prcwidthexpn + pi->picomp->numrlvls >'), (253, '\t\t\t\t JAS_UINTFAST32_NUMBITS - 2 ||'), (254, '\t\t\...
77
53
595
4,400
https://github.com/mdadams/jasper
CVE-2016-9583
['CWE-125']
jpc_t2cod.c
jpc_pi_nextrlcp
/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image P...
/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image P...
static int jpc_pi_nextrlcp(register jpc_pi_t *pi) { jpc_pchg_t *pchg; int *prclyrno; pchg = pi->pchg; if (!pi->prgvolfirst) { assert(pi->prcno < pi->pirlvl->numprcs); prclyrno = &pi->pirlvl->prclyrnos[pi->prcno]; goto skip; } else { pi->prgvolfirst = 0; } for (pi->rlvlno = pchg->rlvlnostart; pi->rlvlno...
static int jpc_pi_nextrlcp(register jpc_pi_t *pi) { jpc_pchg_t *pchg; int *prclyrno; pchg = pi->pchg; if (!pi->prgvolfirst) { assert(pi->prcno < pi->pirlvl->numprcs); prclyrno = &pi->pirlvl->prclyrnos[pi->prcno]; goto skip; } else { pi->prgvolfirst = 0; } for (pi->rlvlno = pchg->rlvlnostart; pi->rlvlno...
{'added': [(201, '\t\t\t pi->compno < JAS_CAST(int, pchg->compnoend); ++pi->compno,'), (202, '\t\t\t ++pi->picomp) {'), (251, '\t\t\t\t// Check for the potential for overflow problems.'), (252, '\t\t\t\tif (pirlvl->prcwidthexpn + pi->picomp->numrlvls >'), (253, '\t\t\t\t JAS_UINTFAST32_NUMBITS - 2 ||'), (254, '\t\t\...
77
53
595
4,400
https://github.com/mdadams/jasper
CVE-2016-9583
['CWE-125']
jpc_t2cod.c
jpc_pi_nextrpcl
/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image P...
/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image P...
static int jpc_pi_nextrpcl(register jpc_pi_t *pi) { int rlvlno; jpc_pirlvl_t *pirlvl; jpc_pchg_t *pchg; int prchind; int prcvind; int *prclyrno; int compno; jpc_picomp_t *picomp; int xstep; int ystep; uint_fast32_t r; uint_fast32_t rpx; uint_fast32_t rpy; uint_fast32_t trx0; uint_fast32_t try0; pchg = ...
static int jpc_pi_nextrpcl(register jpc_pi_t *pi) { int rlvlno; jpc_pirlvl_t *pirlvl; jpc_pchg_t *pchg; int prchind; int prcvind; int *prclyrno; int compno; jpc_picomp_t *picomp; int xstep; int ystep; uint_fast32_t r; uint_fast32_t rpx; uint_fast32_t rpy; uint_fast32_t trx0; uint_fast32_t try0; pchg = ...
{'added': [(201, '\t\t\t pi->compno < JAS_CAST(int, pchg->compnoend); ++pi->compno,'), (202, '\t\t\t ++pi->picomp) {'), (251, '\t\t\t\t// Check for the potential for overflow problems.'), (252, '\t\t\t\tif (pirlvl->prcwidthexpn + pi->picomp->numrlvls >'), (253, '\t\t\t\t JAS_UINTFAST32_NUMBITS - 2 ||'), (254, '\t\t\...
77
53
595
4,400
https://github.com/mdadams/jasper
CVE-2016-9583
['CWE-125']
pgtable.h
pmd_none_or_trans_huge_or_clear_bad
#ifndef _ASM_GENERIC_PGTABLE_H #define _ASM_GENERIC_PGTABLE_H #ifndef __ASSEMBLY__ #ifdef CONFIG_MMU #include <linux/mm_types.h> #include <linux/bug.h> #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS extern int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address, pte_t *ptep, pte_t entry, int...
#ifndef _ASM_GENERIC_PGTABLE_H #define _ASM_GENERIC_PGTABLE_H #ifndef __ASSEMBLY__ #ifdef CONFIG_MMU #include <linux/mm_types.h> #include <linux/bug.h> #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS extern int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address, pte_t *ptep, pte_t entry, int...
static inline int pmd_none_or_trans_huge_or_clear_bad(pmd_t *pmd) { /* depend on compiler for an atomic pmd read */ pmd_t pmdval = *pmd; /* * The barrier will stabilize the pmdval in a register or on * the stack so that it will stop changing under the code. */ #ifdef CONFIG_TRANSPARENT_HUGEPAGE barrier(); #en...
static inline int pmd_none_or_trans_huge_or_clear_bad(pmd_t *pmd) { pmd_t pmdval = pmd_read_atomic(pmd); /* * The barrier will stabilize the pmdval in a register or on * the stack so that it will stop changing under the code. */ #ifdef CONFIG_TRANSPARENT_HUGEPAGE barrier(); #endif if (pmd_none(pmdval)) retu...
{'added': [(448, '#ifndef pmd_read_atomic'), (449, 'static inline pmd_t pmd_read_atomic(pmd_t *pmdp)'), (450, '{'), (451, '\t/*'), (452, '\t * Depend on compiler for an atomic pmd read. NOTE: this is'), (453, "\t * only going to work, if the pmdval_t isn't larger than"), (454, '\t * an unsigned long.'), (455, '\t */'),...
20
2
222
1,157
https://github.com/torvalds/linux
CVE-2012-2373
['CWE-362']
cmd_info.c
cmd_info
/* radare - LGPL - Copyright 2009-2017 - pancake */ #include <string.h> #include "r_bin.h" #include "r_config.h" #include "r_cons.h" #include "r_core.h" #define PAIR_WIDTH 9 // TODO: reuse implementation in core/bin.c static void pair(const char *a, const char *b) { char ws[16]; int al = strlen (a); if (!b) { re...
/* radare - LGPL - Copyright 2009-2017 - pancake */ #include <string.h> #include "r_bin.h" #include "r_config.h" #include "r_cons.h" #include "r_core.h" #define PAIR_WIDTH 9 // TODO: reuse implementation in core/bin.c static void pair(const char *a, const char *b) { char ws[16]; int al = strlen (a); if (!b) { re...
static int cmd_info(void *data, const char *input) { RCore *core = (RCore *) data; bool newline = r_config_get_i (core->config, "scr.interactive"); RBinObject *o = r_bin_cur_object (core->bin); RCoreFile *cf = core->file; int i, va = core->io->va || core->io->debug; int mode = 0; //R_CORE_BIN_SIMPLE; int is_arra...
static int cmd_info(void *data, const char *input) { RCore *core = (RCore *) data; bool newline = r_config_get_i (core->config, "scr.interactive"); RBinObject *o = r_bin_cur_object (core->bin); RCoreFile *cf = core->file; int i, va = core->io->va || core->io->debug; int mode = 0; //R_CORE_BIN_SIMPLE; int is_arra...
{'added': [(398, "\t\tcase 'l':"), (399, '\t\t\t {'), (400, '\t\t\t\t RBinObject *obj = r_bin_cur_object (core->bin);'), (401, '\t\t\t\t RBININFO ("libs", R_CORE_BIN_ACC_LIBS, NULL, obj? r_list_length (obj->libs): 0);'), (402, '\t\t\t }'), (403, '\t\t\t break;'), (452, "\t\tcase 'i': {"), (453, '\t\t\t\t RBinObje...
12
2
646
4,110
https://github.com/radare/radare2
CVE-2017-9761
['CWE-119']
tja1101_driver.c
tja1101Init
/** * @file tja1101_driver.c * @brief TJA1101 100Base-T1 Ethernet PHY driver * * @section License * * SPDX-License-Identifier: GPL-2.0-or-later * * Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved. * * This file is part of CycloneTCP Open. * * This program is free software; you can redistribu...
/** * @file tja1101_driver.c * @brief TJA1101 100Base-T1 Ethernet PHY driver * * @section License * * SPDX-License-Identifier: GPL-2.0-or-later * * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved. * * This file is part of CycloneTCP Open. * * This program is free software; you can redistribu...
error_t tja1101Init(NetInterface *interface) { uint16_t value; //Debug message TRACE_INFO("Initializing TJA1101...\r\n"); //Undefined PHY address? if(interface->phyAddr >= 32) { //Use the default address interface->phyAddr = TJA1101_PHY_ADDR; } //Initialize serial management inter...
error_t tja1101Init(NetInterface *interface) { uint16_t value; //Debug message TRACE_INFO("Initializing TJA1101...\r\n"); //Undefined PHY address? if(interface->phyAddr >= 32) { //Use the default address interface->phyAddr = TJA1101_PHY_ADDR; } //Initialize serial management inter...
{'added': [(9, ' * Copyright (C) 2010-2021 Oryx Embedded SARL. All rights reserved.'), (28, ' * @version 2.0.2'), (104, ' //Select RMII mode (50MHz output on REF_CLK)'), (107, ' value |= TJA1101_CONFIG1_MII_MODE_RMII_50MHZ_REF_CLK_OUT;')], 'deleted': [(9, ' * Copyright (C) 2010-2020 Oryx Embedded SARL. All rights r...
4
4
138
601
https://github.com/Oryx-Embedded/CycloneTCP
CVE-2021-26788
['CWE-20']
rawsock.c
rawsock_create
// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2011 Instituto Nokia de Tecnologia * * Authors: * Aloisio Almeida Jr <aloisio.almeida@openbossa.org> * Lauro Ramos Venancio <lauro.venancio@openbossa.org> */ #define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__ #include <net/tcp_states.h...
// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2011 Instituto Nokia de Tecnologia * * Authors: * Aloisio Almeida Jr <aloisio.almeida@openbossa.org> * Lauro Ramos Venancio <lauro.venancio@openbossa.org> */ #define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__ #include <net/tcp_states.h...
static int rawsock_create(struct net *net, struct socket *sock, const struct nfc_protocol *nfc_proto, int kern) { struct sock *sk; pr_debug("sock=%p\n", sock); if ((sock->type != SOCK_SEQPACKET) && (sock->type != SOCK_RAW)) return -ESOCKTNOSUPPORT; if (sock->type == SOCK_RAW) sock->ops = &rawsock_raw_op...
static int rawsock_create(struct net *net, struct socket *sock, const struct nfc_protocol *nfc_proto, int kern) { struct sock *sk; pr_debug("sock=%p\n", sock); if ((sock->type != SOCK_SEQPACKET) && (sock->type != SOCK_RAW)) return -ESOCKTNOSUPPORT; if (sock->type == SOCK_RAW) { if (!capable(CAP_NET_RAW)...
{'added': [(331, '\tif (sock->type == SOCK_RAW) {'), (332, '\t\tif (!capable(CAP_NET_RAW))'), (333, '\t\t\treturn -EPERM;'), (335, '\t} else {'), (337, '\t}')], 'deleted': [(331, '\tif (sock->type == SOCK_RAW)'), (333, '\telse')]}
5
2
321
1,916
https://github.com/torvalds/linux
CVE-2020-26088
['CWE-276']
print-pim.c
pimv2_print
/* * Copyright (c) 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entiret...
/* * Copyright (c) 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entiret...
pimv2_print(netdissect_options *ndo, register const u_char *bp, register u_int len, const u_char *bp2) { register const u_char *ep; register const struct pim *pim = (const struct pim *)bp; int advance; enum checksum_status cksum_status; ep = (const u_char *)ndo->ndo_snapend; if (bp >= ep) return; ...
pimv2_print(netdissect_options *ndo, register const u_char *bp, register u_int len, const u_char *bp2) { register const u_char *ep; register const struct pim *pim = (const struct pim *)bp; int advance; enum checksum_status cksum_status; ep = (const u_char *)ndo->ndo_snapend; if (bp >= ep) return; ...
{'added': [(733, '\t\t\t\tif (olen != 2) {'), (734, '\t\t\t\t\tND_PRINT((ndo, "ERROR: Option Length != 2 Bytes (%u)", olen));'), (735, '\t\t\t\t} else {'), (736, '\t\t\t\t\tunsigned_relts_print(ndo, EXTRACT_16BITS(bp));'), (737, '\t\t\t\t}'), (771, '\t\t\t\tif (olen != 4) {'), (772, '\t\t\t\t\tND_PRINT((ndo, "ERROR: Op...
21
9
857
5,713
https://github.com/the-tcpdump-group/tcpdump
CVE-2017-12996
['CWE-125']
index.c
mobi_trie_insert_infl
/** @file index.c * @brief Functions to parse index records * * Copyright (c) 2020 Bartek Fabiszewski * http://www.fabiszewski.net * * This file is part of libmobi. * Licensed under LGPL, either version 3, or any later. * See <http://www.gnu.org/licenses/> */ #define _GNU_SOURCE 1 #ifndef __USE_BSD #define _...
/** @file index.c * @brief Functions to parse index records * * Copyright (c) 2020 Bartek Fabiszewski * http://www.fabiszewski.net * * This file is part of libmobi. * Licensed under LGPL, either version 3, or any later. * See <http://www.gnu.org/licenses/> */ #define _GNU_SOURCE 1 #ifndef __USE_BSD #define _...
MOBI_RET mobi_trie_insert_infl(MOBITrie **root, const MOBIIndx *indx, size_t i) { MOBIIndexEntry e = indx->entries[i]; char *inflected = e.label; for (size_t j = 0; j < e.tags_count; j++) { MOBIIndexTag t = e.tags[j]; if (t.tagid == INDX_TAGARR_INFL_PARTS_V1) { for (size_t k = 0;...
MOBI_RET mobi_trie_insert_infl(MOBITrie **root, const MOBIIndx *indx, size_t i) { MOBIIndexEntry e = indx->entries[i]; char *inflected = e.label; for (size_t j = 0; j < e.tags_count; j++) { MOBIIndexTag t = e.tags[j]; if (t.tagid == INDX_TAGARR_INFL_PARTS_V1) { for (size_t k = 0;...
{'added': [(1060, ' for (size_t k = 0; k + 1 < t.tagvalues_count; k += 2) {')], 'deleted': [(1060, ' for (size_t k = 0; k < t.tagvalues_count - 1; k += 2) {')]}
1
1
817
5,479
https://github.com/bfabiszewski/libmobi
CVE-2022-29788
['CWE-476']
dns.c
PHP_FUNCTION
/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2014 The PHP Group | +---------...
/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2014 The PHP Group | +---------...
PHP_FUNCTION(dns_get_record) { char *hostname; int hostname_len; long type_param = PHP_DNS_ANY; zval *authns = NULL, *addtl = NULL; int type_to_fetch; #if defined(HAVE_DNS_SEARCH) struct sockaddr_storage from; uint32_t fromsize = sizeof(from); dns_handle_t handle; #elif defined(HAVE_RES_NSEARCH) struct __res_s...
PHP_FUNCTION(dns_get_record) { char *hostname; int hostname_len; long type_param = PHP_DNS_ANY; zval *authns = NULL, *addtl = NULL; int type_to_fetch; #if defined(HAVE_DNS_SEARCH) struct sockaddr_storage from; uint32_t fromsize = sizeof(from); dns_handle_t handle; #elif defined(HAVE_RES_NSEARCH) struct __res_s...
{'added': [(415, '#define CHECKCP(n) do { \\'), (416, '\tif (cp + n > end) { \\'), (417, '\t\treturn NULL; \\'), (418, '\t} \\'), (419, '} while (0)'), (420, ''), (422, 'static u_char *php_parserr(u_char *cp, u_char *end, querybuf *answer, int type_to_fetch, int store, int raw, zval **subarray)'), (434, '\tn = dn_expan...
60
24
742
4,728
https://github.com/php/php-src
CVE-2014-3597
['CWE-119']
dns.c
php_parserr
/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2014 The PHP Group | +---------...
/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2014 The PHP Group | +---------...
static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int store, int raw, zval **subarray) { u_short type, class, dlen; u_long ttl; long n, i; u_short s; u_char *tp, *p; char name[MAXHOSTNAMELEN]; int have_v6_break = 0, in_v6_break = 0; *subarray = NULL; n = dn_expand(answer->qb2, answe...
static u_char *php_parserr(u_char *cp, u_char *end, querybuf *answer, int type_to_fetch, int store, int raw, zval **subarray) { u_short type, class, dlen; u_long ttl; long n, i; u_short s; u_char *tp, *p; char name[MAXHOSTNAMELEN]; int have_v6_break = 0, in_v6_break = 0; *subarray = NULL; n = dn_expand(answe...
{'added': [(415, '#define CHECKCP(n) do { \\'), (416, '\tif (cp + n > end) { \\'), (417, '\t\treturn NULL; \\'), (418, '\t} \\'), (419, '} while (0)'), (420, ''), (422, 'static u_char *php_parserr(u_char *cp, u_char *end, querybuf *answer, int type_to_fetch, int store, int raw, zval **subarray)'), (434, '\tn = dn_expan...
60
24
742
4,728
https://github.com/php/php-src
CVE-2014-3597
['CWE-119']
mod_auth_openidc.c
oidc_request_post_preserved_restore
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
static int oidc_request_post_preserved_restore(request_rec *r, const char *original_url) { oidc_debug(r, "enter: original_url=%s", original_url); const char *method = "postOnLoad"; const char *script = apr_psprintf(r->pool, " <script type=\"text/javascript\">\n" " function str_decode(string)...
static int oidc_request_post_preserved_restore(request_rec *r, const char *original_url) { oidc_debug(r, "enter: original_url=%s", original_url); const char *method = "postOnLoad"; const char *script = apr_psprintf(r->pool, " <script type=\"text/javascript\">\n" " function str_decode(string)...
{'added': [(516, '\t\t\t\t\t" document.forms[0].action = \\"%s\\";\\n"')], 'deleted': [(516, '\t\t\t\t\t" document.forms[0].action = \'%s\';\\n"')]}
1
1
2,637
17,669
https://github.com/zmartzone/mod_auth_openidc
CVE-2021-32792
['CWE-79']
xwddec.c
xwd_decode_frame
/* * XWD image format * * Copyright (c) 2012 Paul B Mahol * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (a...
/* * XWD image format * * Copyright (c) 2012 Paul B Mahol * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (a...
static int xwd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { AVFrame *p = data; const uint8_t *buf = avpkt->data; int i, ret, buf_size = avpkt->size; uint32_t version, header_size, vclass, ncolors; uint32_t xoffset, be, bpp, lsize, rsi...
static int xwd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { AVFrame *p = data; const uint8_t *buf = avpkt->data; int i, ret, buf_size = avpkt->size; uint32_t version, header_size, vclass, ncolors; uint32_t xoffset, be, bpp, lsize, rsi...
{'added': [(160, ' if (bpp == 1 && pixdepth == 1) {'), (162, ' } else if (bpp == 8 && pixdepth == 8) {')], 'deleted': [(160, ' if (pixdepth == 1) {'), (162, ' } else if (pixdepth == 8) {')]}
2
2
198
1,495
https://github.com/FFmpeg/FFmpeg
CVE-2017-9991
['CWE-119']
sip_ua_layer.c
pjsip_ua_register_dlg
/* $Id$ */ /* * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; eit...
/* $Id$ */ /* * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; eit...
PJ_DEF(pj_status_t) pjsip_ua_register_dlg( pjsip_user_agent *ua, pjsip_dialog *dlg ) { /* Sanity check. */ PJ_ASSERT_RETURN(ua && dlg, PJ_EINVAL); /* For all dialogs, local tag (inc hash) must has been initialized. */ PJ_ASSERT_RETURN(dlg->local.info && dlg->local.info->tag.slen && dlg->...
PJ_DEF(pj_status_t) pjsip_ua_register_dlg( pjsip_user_agent *ua, pjsip_dialog *dlg ) { /* Sanity check. */ PJ_ASSERT_RETURN(ua && dlg, PJ_EINVAL); /* For all dialogs, local tag (inc hash) must has been initialized. */ PJ_ASSERT_RETURN(dlg->local.info && dlg->local.info->tag.slen && dlg->...
{'added': [(68, ' /* Entry key in the hash table */'), (69, ' pj_str_t ht_key;'), (70, ''), (333, '\t dlg_set->ht_key = dlg->local.info->tag;'), (341, '\t\t\t dlg_set->ht_key.ptr,'), (342, ' (unsigned)dlg_set->ht_key.slen,'), (352, '\tdlg_set->ht_key = dlg->local.info->t...
42
6
538
3,384
https://github.com/pjsip/pjproject
CVE-2022-23608
['CWE-416']
sip_ua_layer.c
pjsip_ua_unregister_dlg
/* $Id$ */ /* * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; eit...
/* $Id$ */ /* * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; eit...
PJ_DEF(pj_status_t) pjsip_ua_unregister_dlg( pjsip_user_agent *ua, pjsip_dialog *dlg ) { struct dlg_set *dlg_set; pjsip_dialog *d; /* Sanity-check arguments. */ PJ_ASSERT_RETURN(ua && dlg, PJ_EINVAL); /* Check that dialog has been registered. */ PJ_ASSERT_RETURN(dlg->dlg_set, PJ_EINV...
PJ_DEF(pj_status_t) pjsip_ua_unregister_dlg( pjsip_user_agent *ua, pjsip_dialog *dlg ) { struct dlg_set *dlg_set; pjsip_dialog *d; /* Sanity-check arguments. */ PJ_ASSERT_RETURN(ua && dlg, PJ_EINVAL); /* Check that dialog has been registered. */ PJ_ASSERT_RETURN(dlg->dlg_set, PJ_EINV...
{'added': [(68, ' /* Entry key in the hash table */'), (69, ' pj_str_t ht_key;'), (70, ''), (333, '\t dlg_set->ht_key = dlg->local.info->tag;'), (341, '\t\t\t dlg_set->ht_key.ptr,'), (342, ' (unsigned)dlg_set->ht_key.slen,'), (352, '\tdlg_set->ht_key = dlg->local.info->t...
42
6
538
3,384
https://github.com/pjsip/pjproject
CVE-2022-23608
['CWE-416']
scrub.c
btrfs_scrub_dev
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2011, 2012 STRATO. All rights reserved. */ #include <linux/blkdev.h> #include <linux/ratelimit.h> #include <linux/sched/mm.h> #include "ctree.h" #include "volumes.h" #include "disk-io.h" #include "ordered-data.h" #include "transaction.h" #include "backref.h" #i...
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2011, 2012 STRATO. All rights reserved. */ #include <linux/blkdev.h> #include <linux/ratelimit.h> #include <linux/sched/mm.h> #include "ctree.h" #include "volumes.h" #include "disk-io.h" #include "ordered-data.h" #include "transaction.h" #include "backref.h" #i...
int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start, u64 end, struct btrfs_scrub_progress *progress, int readonly, int is_dev_replace) { struct scrub_ctx *sctx; int ret; struct btrfs_device *dev; unsigned int nofs_flag; if (btrfs_fs_closing(fs_info)) return -EINVAL; if (fs_info...
int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start, u64 end, struct btrfs_scrub_progress *progress, int readonly, int is_dev_replace) { struct scrub_ctx *sctx; int ret; struct btrfs_device *dev; unsigned int nofs_flag; if (btrfs_fs_closing(fs_info)) return -EINVAL; if (fs_info...
{'added': [(3838, '\tdev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL, true);'), (4015, '\tdev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL, true);')], 'deleted': [(3838, '\tdev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL);'), (4015, '\tdev = btrfs_find_device(fs_info->fs_devi...
2
2
3,051
18,241
https://github.com/torvalds/linux
CVE-2019-18885
['CWE-476']
scrub.c
btrfs_scrub_progress
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2011, 2012 STRATO. All rights reserved. */ #include <linux/blkdev.h> #include <linux/ratelimit.h> #include <linux/sched/mm.h> #include "ctree.h" #include "volumes.h" #include "disk-io.h" #include "ordered-data.h" #include "transaction.h" #include "backref.h" #i...
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2011, 2012 STRATO. All rights reserved. */ #include <linux/blkdev.h> #include <linux/ratelimit.h> #include <linux/sched/mm.h> #include "ctree.h" #include "volumes.h" #include "disk-io.h" #include "ordered-data.h" #include "transaction.h" #include "backref.h" #i...
int btrfs_scrub_progress(struct btrfs_fs_info *fs_info, u64 devid, struct btrfs_scrub_progress *progress) { struct btrfs_device *dev; struct scrub_ctx *sctx = NULL; mutex_lock(&fs_info->fs_devices->device_list_mutex); dev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL); if (dev) sctx = dev->scru...
int btrfs_scrub_progress(struct btrfs_fs_info *fs_info, u64 devid, struct btrfs_scrub_progress *progress) { struct btrfs_device *dev; struct scrub_ctx *sctx = NULL; mutex_lock(&fs_info->fs_devices->device_list_mutex); dev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL, true); if (dev) sctx = dev...
{'added': [(3838, '\tdev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL, true);'), (4015, '\tdev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL, true);')], 'deleted': [(3838, '\tdev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL);'), (4015, '\tdev = btrfs_find_device(fs_info->fs_devi...
2
2
3,051
18,241
https://github.com/torvalds/linux
CVE-2019-18885
['CWE-476']
orders.c
update_read_brush
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
static INLINE BOOL update_read_brush(wStream* s, rdpBrush* brush, BYTE fieldFlags) { if (fieldFlags & ORDER_FIELD_01) { if (Stream_GetRemainingLength(s) < 1) return FALSE; Stream_Read_UINT8(s, brush->x); } if (fieldFlags & ORDER_FIELD_02) { if (Stream_GetRemainingLength(s) < 1) return FALSE; Strea...
static INLINE BOOL update_read_brush(wStream* s, rdpBrush* brush, BYTE fieldFlags) { if (fieldFlags & ORDER_FIELD_01) { if (Stream_GetRemainingLength(s) < 1) return FALSE; Stream_Read_UINT8(s, brush->x); } if (fieldFlags & ORDER_FIELD_02) { if (Stream_GetRemainingLength(s) < 1) return FALSE; Strea...
{'added': [(116, 'static BYTE get_cbr2_bpp(UINT32 bpp, BOOL* pValid)'), (117, '{'), (118, '\tif (pValid)'), (119, '\t\t*pValid = TRUE;'), (120, '\tswitch (bpp)'), (121, '\t{'), (122, '\t\tcase 3:'), (123, '\t\t\treturn 8;'), (124, '\t\tcase 4:'), (125, '\t\t\treturn 16;'), (126, '\t\tcase 5:'), (127, '\t\t\treturn 24;'...
98
24
3,271
19,873
https://github.com/FreeRDP/FreeRDP
CVE-2020-11096
['CWE-125']
orders.c
update_read_cache_bitmap_v2_order
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
static CACHE_BITMAP_V2_ORDER* update_read_cache_bitmap_v2_order(rdpUpdate* update, wStream* s, BOOL compressed, UINT16 flags) { BYTE bitsPerPixelId; CACHE_BITMAP_V2_ORDER* cache_bitmap_v2; if (!update || !s) return NULL; cache_bitmap_v2 = calloc(1,...
static CACHE_BITMAP_V2_ORDER* update_read_cache_bitmap_v2_order(rdpUpdate* update, wStream* s, BOOL compressed, UINT16 flags) { BOOL rc; BYTE bitsPerPixelId; CACHE_BITMAP_V2_ORDER* cache_bitmap_v2; if (!update || !s) return NULL; cache_bitmap_v2 =...
{'added': [(116, 'static BYTE get_cbr2_bpp(UINT32 bpp, BOOL* pValid)'), (117, '{'), (118, '\tif (pValid)'), (119, '\t\t*pValid = TRUE;'), (120, '\tswitch (bpp)'), (121, '\t{'), (122, '\t\tcase 3:'), (123, '\t\t\treturn 8;'), (124, '\t\tcase 4:'), (125, '\t\t\treturn 16;'), (126, '\t\tcase 5:'), (127, '\t\t\treturn 24;'...
98
24
3,271
19,873
https://github.com/FreeRDP/FreeRDP
CVE-2020-11096
['CWE-125']
orders.c
update_read_cache_bitmap_v3_order
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
static CACHE_BITMAP_V3_ORDER* update_read_cache_bitmap_v3_order(rdpUpdate* update, wStream* s, UINT16 flags) { BYTE bitsPerPixelId; BITMAP_DATA_EX* bitmapData; UINT32 new_len; BYTE* new_data; CACHE_BITMAP_V3_ORDER* cache_bitmap_v3; if (!update || !s...
static CACHE_BITMAP_V3_ORDER* update_read_cache_bitmap_v3_order(rdpUpdate* update, wStream* s, UINT16 flags) { BOOL rc; BYTE bitsPerPixelId; BITMAP_DATA_EX* bitmapData; UINT32 new_len; BYTE* new_data; CACHE_BITMAP_V3_ORDER* cache_bitmap_v3; if (!up...
{'added': [(116, 'static BYTE get_cbr2_bpp(UINT32 bpp, BOOL* pValid)'), (117, '{'), (118, '\tif (pValid)'), (119, '\t\t*pValid = TRUE;'), (120, '\tswitch (bpp)'), (121, '\t{'), (122, '\t\tcase 3:'), (123, '\t\t\treturn 8;'), (124, '\t\tcase 4:'), (125, '\t\t\treturn 16;'), (126, '\t\tcase 5:'), (127, '\t\t\treturn 24;'...
98
24
3,271
19,873
https://github.com/FreeRDP/FreeRDP
CVE-2020-11096
['CWE-125']
orders.c
update_read_cache_brush_order
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
static CACHE_BRUSH_ORDER* update_read_cache_brush_order(rdpUpdate* update, wStream* s, UINT16 flags) { int i; BYTE iBitmapFormat; BOOL compressed = FALSE; CACHE_BRUSH_ORDER* cache_brush = calloc(1, sizeof(CACHE_BRUSH_ORDER)); if (!cache_brush) goto fail; if (Stream_GetRemainingLength(s) < 6) goto fail; St...
static CACHE_BRUSH_ORDER* update_read_cache_brush_order(rdpUpdate* update, wStream* s, UINT16 flags) { int i; BOOL rc; BYTE iBitmapFormat; BOOL compressed = FALSE; CACHE_BRUSH_ORDER* cache_brush = calloc(1, sizeof(CACHE_BRUSH_ORDER)); if (!cache_brush) goto fail; if (Stream_GetRemainingLength(s) < 6) goto ...
{'added': [(116, 'static BYTE get_cbr2_bpp(UINT32 bpp, BOOL* pValid)'), (117, '{'), (118, '\tif (pValid)'), (119, '\t\t*pValid = TRUE;'), (120, '\tswitch (bpp)'), (121, '\t{'), (122, '\t\tcase 3:'), (123, '\t\t\treturn 8;'), (124, '\t\tcase 4:'), (125, '\t\t\treturn 16;'), (126, '\t\tcase 5:'), (127, '\t\t\treturn 24;'...
98
24
3,271
19,873
https://github.com/FreeRDP/FreeRDP
CVE-2020-11096
['CWE-125']
orders.c
update_write_brush
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
static INLINE BOOL update_write_brush(wStream* s, rdpBrush* brush, BYTE fieldFlags) { if (fieldFlags & ORDER_FIELD_01) { Stream_Write_UINT8(s, brush->x); } if (fieldFlags & ORDER_FIELD_02) { Stream_Write_UINT8(s, brush->y); } if (fieldFlags & ORDER_FIELD_03) { Stream_Write_UINT8(s, brush->style); } i...
static INLINE BOOL update_write_brush(wStream* s, rdpBrush* brush, BYTE fieldFlags) { if (fieldFlags & ORDER_FIELD_01) { Stream_Write_UINT8(s, brush->x); } if (fieldFlags & ORDER_FIELD_02) { Stream_Write_UINT8(s, brush->y); } if (fieldFlags & ORDER_FIELD_03) { Stream_Write_UINT8(s, brush->style); } i...
{'added': [(116, 'static BYTE get_cbr2_bpp(UINT32 bpp, BOOL* pValid)'), (117, '{'), (118, '\tif (pValid)'), (119, '\t\t*pValid = TRUE;'), (120, '\tswitch (bpp)'), (121, '\t{'), (122, '\t\tcase 3:'), (123, '\t\t\treturn 8;'), (124, '\t\tcase 4:'), (125, '\t\t\treturn 16;'), (126, '\t\tcase 5:'), (127, '\t\t\treturn 24;'...
98
24
3,271
19,873
https://github.com/FreeRDP/FreeRDP
CVE-2020-11096
['CWE-125']
orders.c
update_write_cache_bitmap_v2_order
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
BOOL update_write_cache_bitmap_v2_order(wStream* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2, BOOL compressed, UINT16* flags) { BYTE bitsPerPixelId; if (!Stream_EnsureRemainingCapacity( s, update_approximate_cache_bitmap_v2_order(cache_bitmap_v2, compressed, flags))) ...
BOOL update_write_cache_bitmap_v2_order(wStream* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2, BOOL compressed, UINT16* flags) { BOOL rc; BYTE bitsPerPixelId; if (!Stream_EnsureRemainingCapacity( s, update_approximate_cache_bitmap_v2_order(cache_bitmap_v2, compressed, f...
{'added': [(116, 'static BYTE get_cbr2_bpp(UINT32 bpp, BOOL* pValid)'), (117, '{'), (118, '\tif (pValid)'), (119, '\t\t*pValid = TRUE;'), (120, '\tswitch (bpp)'), (121, '\t{'), (122, '\t\tcase 3:'), (123, '\t\t\treturn 8;'), (124, '\t\tcase 4:'), (125, '\t\t\treturn 16;'), (126, '\t\tcase 5:'), (127, '\t\t\treturn 24;'...
98
24
3,271
19,873
https://github.com/FreeRDP/FreeRDP
CVE-2020-11096
['CWE-125']
orders.c
update_write_cache_bitmap_v3_order
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
BOOL update_write_cache_bitmap_v3_order(wStream* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3, UINT16* flags) { BYTE bitsPerPixelId; BITMAP_DATA_EX* bitmapData; if (!Stream_EnsureRemainingCapacity( s, update_approximate_cache_bitmap_v3_order(cache_bitmap_v3, flags))) ...
BOOL update_write_cache_bitmap_v3_order(wStream* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3, UINT16* flags) { BOOL rc; BYTE bitsPerPixelId; BITMAP_DATA_EX* bitmapData; if (!Stream_EnsureRemainingCapacity( s, update_approximate_cache_bitmap_v3_order(cache_bitmap_v3, f...
{'added': [(116, 'static BYTE get_cbr2_bpp(UINT32 bpp, BOOL* pValid)'), (117, '{'), (118, '\tif (pValid)'), (119, '\t\t*pValid = TRUE;'), (120, '\tswitch (bpp)'), (121, '\t{'), (122, '\t\tcase 3:'), (123, '\t\t\treturn 8;'), (124, '\t\tcase 4:'), (125, '\t\t\treturn 16;'), (126, '\t\tcase 5:'), (127, '\t\t\treturn 24;'...
98
24
3,271
19,873
https://github.com/FreeRDP/FreeRDP
CVE-2020-11096
['CWE-125']
orders.c
update_write_cache_brush_order
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
/** * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * Copyright 2016 Armin Novak <armin.novak@thincast.com> * Copyright 2016 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
BOOL update_write_cache_brush_order(wStream* s, const CACHE_BRUSH_ORDER* cache_brush, UINT16* flags) { int i; BYTE iBitmapFormat; BOOL compressed = FALSE; if (!Stream_EnsureRemainingCapacity(s, update_approximate_cache_brush_order(cache_brush, flags))) return FALSE; iBitmap...
BOOL update_write_cache_brush_order(wStream* s, const CACHE_BRUSH_ORDER* cache_brush, UINT16* flags) { int i; BYTE iBitmapFormat; BOOL rc; BOOL compressed = FALSE; if (!Stream_EnsureRemainingCapacity(s, update_approximate_cache_brush_order(cache_brush, flags))) return FALSE;...
{'added': [(116, 'static BYTE get_cbr2_bpp(UINT32 bpp, BOOL* pValid)'), (117, '{'), (118, '\tif (pValid)'), (119, '\t\t*pValid = TRUE;'), (120, '\tswitch (bpp)'), (121, '\t{'), (122, '\t\tcase 3:'), (123, '\t\t\treturn 8;'), (124, '\t\tcase 4:'), (125, '\t\t\treturn 16;'), (126, '\t\tcase 5:'), (127, '\t\t\treturn 24;'...
98
24
3,271
19,873
https://github.com/FreeRDP/FreeRDP
CVE-2020-11096
['CWE-125']
env.c
mongo_env_read_socket
#if !defined(MONGO_ENV_STANDARD) && (defined(_WIN32) || defined(_WIN64)) /* env_win32.c */ /* Copyright 2009-2012 10gen Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
#if !defined(MONGO_ENV_STANDARD) && (defined(_WIN32) || defined(_WIN64)) /* env_win32.c */ /* Copyright 2009-2012 10gen Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
int mongo_env_read_socket( mongo *conn, void *buf, int len ) { char *cbuf = buf; while ( len ) { int sent = recv( conn->sock, cbuf, len, 0 ); if ( sent == 0 || sent == -1 ) { __mongo_set_error( conn, MONGO_IO_ERROR, NULL, WSAGetLastError() ); return MONGO_ERROR; ...
int mongo_env_read_socket( mongo *conn, void *buf, size_t len ) { char *cbuf = buf; while ( len ) { size_t sent = recv( conn->sock, cbuf, len, 0 ); if ( sent == 0 || sent == -1 ) { __mongo_set_error( conn, MONGO_IO_ERROR, NULL, WSAGetLastError() ); return MONGO_ERROR; ...
{'added': [(41, 'int mongo_env_write_socket( mongo *conn, const void *buf, size_t len ) {'), (46, ' size_t sent = send( conn->sock, cbuf, len, flags );'), (59, 'int mongo_env_read_socket( mongo *conn, void *buf, size_t len ) {'), (63, ' size_t sent = recv( conn->sock, cbuf, len, 0 );'), (228, 'int mongo_e...
12
12
367
2,238
https://github.com/10gen-archive/mongo-c-driver-legacy
CVE-2020-12135
['CWE-190']
env.c
mongo_env_write_socket
#if !defined(MONGO_ENV_STANDARD) && (defined(_WIN32) || defined(_WIN64)) /* env_win32.c */ /* Copyright 2009-2012 10gen Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
#if !defined(MONGO_ENV_STANDARD) && (defined(_WIN32) || defined(_WIN64)) /* env_win32.c */ /* Copyright 2009-2012 10gen Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
int mongo_env_write_socket( mongo *conn, const void *buf, int len ) { const char *cbuf = buf; int flags = 0; while ( len ) { int sent = send( conn->sock, cbuf, len, flags ); if ( sent == -1 ) { __mongo_set_error( conn, MONGO_IO_ERROR, NULL, WSAGetLastError() ); conn-...
int mongo_env_write_socket( mongo *conn, const void *buf, size_t len ) { const char *cbuf = buf; int flags = 0; while ( len ) { size_t sent = send( conn->sock, cbuf, len, flags ); if ( sent == -1 ) { __mongo_set_error( conn, MONGO_IO_ERROR, NULL, WSAGetLastError() ); ...
{'added': [(41, 'int mongo_env_write_socket( mongo *conn, const void *buf, size_t len ) {'), (46, ' size_t sent = send( conn->sock, cbuf, len, flags );'), (59, 'int mongo_env_read_socket( mongo *conn, void *buf, size_t len ) {'), (63, ' size_t sent = recv( conn->sock, cbuf, len, 0 );'), (228, 'int mongo_e...
12
12
367
2,238
https://github.com/10gen-archive/mongo-c-driver-legacy
CVE-2020-12135
['CWE-190']
gtco.c
parse_hid_report_descriptor
/* -*- linux-c -*- GTCO digitizer USB driver TO CHECK: Is pressure done right on report 5? Copyright (C) 2006 GTCO CalComp This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the Lic...
/* -*- linux-c -*- GTCO digitizer USB driver TO CHECK: Is pressure done right on report 5? Copyright (C) 2006 GTCO CalComp This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the Lic...
static void parse_hid_report_descriptor(struct gtco *device, char * report, int length) { struct device *ddev = &device->intf->dev; int x, i = 0; /* Tag primitive vars */ __u8 prefix; __u8 size; __u8 tag; __u8 type; __u8 data = 0; __u16 data16 = 0; __u32 data32 = 0; /* For parsing logi...
static void parse_hid_report_descriptor(struct gtco *device, char * report, int length) { struct device *ddev = &device->intf->dev; int x, i = 0; /* Tag primitive vars */ __u8 prefix; __u8 size; __u8 tag; __u8 type; __u8 data = 0; __u16 data16 = 0; __u32 data32 = 0; /* For parsing logi...
{'added': [(233, '\t\tprefix = report[i++];'), (236, '\t\tsize = (1U << PREF_SIZE(prefix)) >> 1;'), (237, '\t\tif (i + size > length) {'), (238, '\t\t\tdev_err(ddev,'), (239, '\t\t\t\t"Not enough data (need %d, have %d)\\n",'), (240, '\t\t\t\ti + size, length);'), (241, '\t\t\tbreak;'), (242, '\t\t}'), (243, ''), (251,...
10
7
569
3,491
https://github.com/torvalds/linux
CVE-2017-16643
['CWE-125']
diskstore.c
dsOpen
/* diskstore.c implements a very simple disk backed key-value store used * by Redis for the "disk" backend. This implementation uses the filesystem * to store key/value pairs. Every file represents a given key. * * The key path is calculated using the SHA1 of the key name. For instance * the key "foo" is stored as...
/* diskstore.c implements a very simple disk backed key-value store used * by Redis for the "disk" backend. This implementation uses the filesystem * to store key/value pairs. Every file represents a given key. * * The key path is calculated using the SHA1 of the key name. For instance * the key "foo" is stored as...
int dsOpen(void) { struct stat sb; int retval; char *path = server.diskstore_path; if ((retval = stat(path,&sb) == -1) && errno != ENOENT) { redisLog(REDIS_WARNING, "Error opening disk store at %s: %s", path, strerror(errno)); return REDIS_ERR; } /* Directory al...
int dsOpen(void) { struct stat sb; int retval; char *path = server.ds_path; if ((retval = stat(path,&sb) == -1) && errno != ENOENT) { redisLog(REDIS_WARNING, "Error opening disk store at %s: %s", path, strerror(errno)); return REDIS_ERR; } /* Directory already i...
{'added': [(19, ' * Note that since Redis supports multiple databases, the actual key name'), (20, ' * is:'), (21, ' *'), (22, ' * /0b/ee/<dbid>_0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33'), (23, ' *'), (24, ' * so for instance if the key is inside DB 0:'), (25, ' *'), (26, ' * /0b/ee/0_0beec7b5ea3f0fdbc95d0dd47f3c5bc...
12
3
33
198
https://github.com/antirez/redis
CVE-2013-0178
['CWE-20']
pkcs15-gemsafeV1.c
gemsafe_get_cert_len
/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it wi...
/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it wi...
static int gemsafe_get_cert_len(sc_card_t *card) { int r; u8 ibuf[GEMSAFE_MAX_OBJLEN]; u8 *iptr; struct sc_path path; struct sc_file *file; size_t objlen, certlen; unsigned int ind, i=0; sc_format_path(GEMSAFE_PATH, &path); r = sc_select_file(card, &path, &file); if (r != SC_SUCCESS || !file) return SC_ER...
static int gemsafe_get_cert_len(sc_card_t *card) { int r; u8 ibuf[GEMSAFE_MAX_OBJLEN]; u8 *iptr; struct sc_path path; struct sc_file *file; size_t objlen, certlen; unsigned int ind, i=0; sc_format_path(GEMSAFE_PATH, &path); r = sc_select_file(card, &path, &file); if (r != SC_SUCCESS || !file) return SC_ER...
{'added': [(211, '\twhile (ibuf[ind] == 0x01 && i < gemsafe_cert_max) {')], 'deleted': [(211, '\twhile (ibuf[ind] == 0x01) {')]}
1
1
455
3,267
https://github.com/OpenSC/OpenSC
CVE-2018-16391
['CWE-119']
bin.c
string_scan_range
/* radare - LGPL - Copyright 2009-2017 - pancake, nibble, dso */ // TODO: dlopen library and show address #include <r_bin.h> #include <r_types.h> #include <r_util.h> #include <r_lib.h> #include <r_io.h> #include <config.h> R_LIB_VERSION (r_bin); #define bprintf if(binfile->rbin->verbose)eprintf #define DB a->sdb; #...
/* radare - LGPL - Copyright 2009-2017 - pancake, nibble, dso */ // TODO: dlopen library and show address #include <r_bin.h> #include <r_types.h> #include <r_util.h> #include <r_lib.h> #include <r_io.h> #include <config.h> R_LIB_VERSION (r_bin); #define bprintf if(binfile->rbin->verbose)eprintf #define DB a->sdb; #...
static int string_scan_range(RList *list, const ut8 *buf, int min, const ut64 from, const ut64 to, int type) { ut8 tmp[R_STRING_SCAN_BUFFER_SIZE]; ut64 str_start, needle = from; int count = 0, i, rc, runes; int str_type = R_STRING_TYPE_DETECT; if (type == -1) { type = R_STRING_TYPE_DETECT; } if (!buf...
static int string_scan_range(RList *list, const ut8 *buf, int min, const ut64 from, const ut64 to, int type) { ut8 tmp[R_STRING_SCAN_BUFFER_SIZE]; ut64 str_start, needle = from; int count = 0, i, rc, runes; int str_type = R_STRING_TYPE_DETECT; if (type == -1) { type = R_STRING_TYPE_DETECT; } if (!buf...
{'added': [(355, '\t\t\t\t\tif (str_start > 1) {'), (356, '\t\t\t\t\t\tconst ut8 *p = buf + str_start - 2;'), (363, '\t\t\t\t\tif (str_start > 3) {'), (364, '\t\t\t\t\t\tconst ut8 *p = buf + str_start - 4;')], 'deleted': [(355, '\t\t\t\t\t{'), (356, '\t\t\t\t\t\tconst ut8 *p = buf + str_start - 2;'), (363, '\t\t\t\t\t...
4
4
2,511
16,375
https://github.com/radare/radare2
CVE-2017-16358
['CWE-125']
file.c
__close_fd_get_file
// SPDX-License-Identifier: GPL-2.0 /* * linux/fs/file.c * * Copyright (C) 1998-1999, Stephen Tweedie and Bill Hawes * * Manage the dynamic fd arrays in the process files_struct. */ #include <linux/syscalls.h> #include <linux/export.h> #include <linux/fs.h> #include <linux/mm.h> #include <linux/sched/signal.h...
// SPDX-License-Identifier: GPL-2.0 /* * linux/fs/file.c * * Copyright (C) 1998-1999, Stephen Tweedie and Bill Hawes * * Manage the dynamic fd arrays in the process files_struct. */ #include <linux/syscalls.h> #include <linux/export.h> #include <linux/fs.h> #include <linux/mm.h> #include <linux/sched/signal.h...
int __close_fd_get_file(unsigned int fd, struct file **res) { struct files_struct *files = current->files; struct file *file; struct fdtable *fdt; spin_lock(&files->file_lock); fdt = files_fdtable(files); if (fd >= fdt->max_fds) goto out_unlock; file = fdt->fd[fd]; if (!file) goto out_unlock; rcu_assign_p...
int __close_fd_get_file(unsigned int fd, struct file **res) { struct files_struct *files = current->files; struct file *file; struct fdtable *fdt; spin_lock(&files->file_lock); fdt = files_fdtable(files); if (fd >= fdt->max_fds) goto out_unlock; file = fdt->fd[fd]; if (!file) goto out_unlock; rcu_assign_p...
{'added': [(653, ' * variant of __close_fd that gets a ref on the file for later fput.'), (654, ' * The caller must ensure that filp_close() called on the file, and then'), (655, ' * an fput().'), (675, '\treturn 0;')], 'deleted': [(653, ' * variant of __close_fd that gets a ref on the file for later fput'), (673, '\tr...
4
2
722
4,409
https://github.com/oracle/linux-uek
CVE-2022-21504
['CWE-416']
mqueue.c
do_mq_notify
/* * POSIX message queues filesystem for Linux. * * Copyright (C) 2003,2004 Krzysztof Benedyczak (golbi@mat.uni.torun.pl) * Michal Wronski (michal.wronski@gmail.com) * * Spinlocks: Mohamed Abbas (abbas.mohamed@intel.com) * Lockless receive & send, fd ...
/* * POSIX message queues filesystem for Linux. * * Copyright (C) 2003,2004 Krzysztof Benedyczak (golbi@mat.uni.torun.pl) * Michal Wronski (michal.wronski@gmail.com) * * Spinlocks: Mohamed Abbas (abbas.mohamed@intel.com) * Lockless receive & send, fd ...
static int do_mq_notify(mqd_t mqdes, const struct sigevent *notification) { int ret; struct fd f; struct sock *sock; struct inode *inode; struct mqueue_inode_info *info; struct sk_buff *nc; audit_mq_notify(mqdes, notification); nc = NULL; sock = NULL; if (notification != NULL) { if (unlikely(notification-...
static int do_mq_notify(mqd_t mqdes, const struct sigevent *notification) { int ret; struct fd f; struct sock *sock; struct inode *inode; struct mqueue_inode_info *info; struct sk_buff *nc; audit_mq_notify(mqdes, notification); nc = NULL; sock = NULL; if (notification != NULL) { if (unlikely(notification-...
{'added': [(1273, '\t\t\tif (ret == 1) {'), (1274, '\t\t\t\tsock = NULL;'), (1276, '\t\t\t}')], 'deleted': [(1273, '\t\t\tif (ret == 1)')]}
3
1
1,291
7,674
https://github.com/torvalds/linux
CVE-2017-11176
['CWE-416']
blkback.c
dispatch_discard_io
/****************************************************************************** * * Back-end of the driver for virtual block devices. This portion of the * driver exports a 'unified' block-device interface that can be accessed * by any operating system that implements a compatible front end. A * reference front-en...
/****************************************************************************** * * Back-end of the driver for virtual block devices. This portion of the * driver exports a 'unified' block-device interface that can be accessed * by any operating system that implements a compatible front end. A * reference front-en...
static int dispatch_discard_io(struct xen_blkif *blkif, struct blkif_request *req) { int err = 0; int status = BLKIF_RSP_OKAY; struct block_device *bdev = blkif->vbd.bdev; unsigned long secure; blkif->st_ds_req++; xen_blkif_get(blkif); secure = (blkif->vbd.discard_secure && (req->u.discard.flag & BLKIF_...
static int dispatch_discard_io(struct xen_blkif *blkif, struct blkif_request *req) { int err = 0; int status = BLKIF_RSP_OKAY; struct block_device *bdev = blkif->vbd.bdev; unsigned long secure; struct phys_req preq; preq.sector_number = req->u.discard.sector_number; preq.nr_sects = req->u.discard.nr_se...
{'added': [(879, '\tstruct phys_req preq;'), (880, ''), (881, '\tpreq.sector_number = req->u.discard.sector_number;'), (882, '\tpreq.nr_sects = req->u.discard.nr_sectors;'), (884, '\terr = xen_vbd_translate(&preq, blkif, WRITE);'), (885, '\tif (err) {'), (886, '\t\tpr_warn(DRV_PFX "access denied: DISCARD [%llu->%l...
12
1
978
6,140
https://github.com/torvalds/linux
CVE-2013-2140
['CWE-20']
insn-eval.c
get_desc
/* * Utility functions for x86 operand and address decoding * * Copyright (C) Intel Corporation 2017 */ #include <linux/kernel.h> #include <linux/string.h> #include <linux/ratelimit.h> #include <linux/mmu_context.h> #include <asm/desc_defs.h> #include <asm/desc.h> #include <asm/inat.h> #include <asm/insn.h> #includ...
/* * Utility functions for x86 operand and address decoding * * Copyright (C) Intel Corporation 2017 */ #include <linux/kernel.h> #include <linux/string.h> #include <linux/ratelimit.h> #include <linux/mmu_context.h> #include <asm/desc_defs.h> #include <asm/desc.h> #include <asm/inat.h> #include <asm/insn.h> #includ...
static struct desc_struct *get_desc(unsigned short sel) { struct desc_ptr gdt_desc = {0, 0}; unsigned long desc_base; #ifdef CONFIG_MODIFY_LDT_SYSCALL if ((sel & SEGMENT_TI_MASK) == SEGMENT_LDT) { struct desc_struct *desc = NULL; struct ldt_struct *ldt; /* Bits [15:3] contain the index of the desired entry. ...
static bool get_desc(struct desc_struct *out, unsigned short sel) { struct desc_ptr gdt_desc = {0, 0}; unsigned long desc_base; #ifdef CONFIG_MODIFY_LDT_SYSCALL if ((sel & SEGMENT_TI_MASK) == SEGMENT_LDT) { bool success = false; struct ldt_struct *ldt; /* Bits [15:3] contain the index of the desired entry. *...
{'added': [(560, ' * get_desc() - Obtain contents of a segment descriptor'), (561, ' * @out:\tSegment descriptor contents on success'), (569, ' * True on success, false on failure.'), (573, 'static bool get_desc(struct desc_struct *out, unsigned short sel)'), (580, '\t\tbool success = false;'), (588, '\t\tif (ldt && se...
24
23
634
3,848
https://github.com/torvalds/linux
CVE-2019-13233
['CWE-416', 'CWE-362']
insn-eval.c
get_seg_limit
/* * Utility functions for x86 operand and address decoding * * Copyright (C) Intel Corporation 2017 */ #include <linux/kernel.h> #include <linux/string.h> #include <linux/ratelimit.h> #include <linux/mmu_context.h> #include <asm/desc_defs.h> #include <asm/desc.h> #include <asm/inat.h> #include <asm/insn.h> #includ...
/* * Utility functions for x86 operand and address decoding * * Copyright (C) Intel Corporation 2017 */ #include <linux/kernel.h> #include <linux/string.h> #include <linux/ratelimit.h> #include <linux/mmu_context.h> #include <asm/desc_defs.h> #include <asm/desc.h> #include <asm/inat.h> #include <asm/insn.h> #includ...
static unsigned long get_seg_limit(struct pt_regs *regs, int seg_reg_idx) { struct desc_struct *desc; unsigned long limit; short sel; sel = get_segment_selector(regs, seg_reg_idx); if (sel < 0) return 0; if (user_64bit_mode(regs) || v8086_mode(regs)) return -1L; if (!sel) return 0; desc = get_desc(sel...
static unsigned long get_seg_limit(struct pt_regs *regs, int seg_reg_idx) { struct desc_struct desc; unsigned long limit; short sel; sel = get_segment_selector(regs, seg_reg_idx); if (sel < 0) return 0; if (user_64bit_mode(regs) || v8086_mode(regs)) return -1L; if (!sel) return 0; if (!get_desc(&desc,...
{'added': [(560, ' * get_desc() - Obtain contents of a segment descriptor'), (561, ' * @out:\tSegment descriptor contents on success'), (569, ' * True on success, false on failure.'), (573, 'static bool get_desc(struct desc_struct *out, unsigned short sel)'), (580, '\t\tbool success = false;'), (588, '\t\tif (ldt && se...
24
23
634
3,848
https://github.com/torvalds/linux
CVE-2019-13233
['CWE-416', 'CWE-362']
insn-eval.c
insn_get_code_seg_params
/* * Utility functions for x86 operand and address decoding * * Copyright (C) Intel Corporation 2017 */ #include <linux/kernel.h> #include <linux/string.h> #include <linux/ratelimit.h> #include <linux/mmu_context.h> #include <asm/desc_defs.h> #include <asm/desc.h> #include <asm/inat.h> #include <asm/insn.h> #includ...
/* * Utility functions for x86 operand and address decoding * * Copyright (C) Intel Corporation 2017 */ #include <linux/kernel.h> #include <linux/string.h> #include <linux/ratelimit.h> #include <linux/mmu_context.h> #include <asm/desc_defs.h> #include <asm/desc.h> #include <asm/inat.h> #include <asm/insn.h> #includ...
int insn_get_code_seg_params(struct pt_regs *regs) { struct desc_struct *desc; short sel; if (v8086_mode(regs)) /* Address and operand size are both 16-bit. */ return INSN_CODE_SEG_PARAMS(2, 2); sel = get_segment_selector(regs, INAT_SEG_REG_CS); if (sel < 0) return sel; desc = get_desc(sel); if (!desc) ...
int insn_get_code_seg_params(struct pt_regs *regs) { struct desc_struct desc; short sel; if (v8086_mode(regs)) /* Address and operand size are both 16-bit. */ return INSN_CODE_SEG_PARAMS(2, 2); sel = get_segment_selector(regs, INAT_SEG_REG_CS); if (sel < 0) return sel; if (!get_desc(&desc, sel)) return...
{'added': [(560, ' * get_desc() - Obtain contents of a segment descriptor'), (561, ' * @out:\tSegment descriptor contents on success'), (569, ' * True on success, false on failure.'), (573, 'static bool get_desc(struct desc_struct *out, unsigned short sel)'), (580, '\t\tbool success = false;'), (588, '\t\tif (ldt && se...
24
23
634
3,848
https://github.com/torvalds/linux
CVE-2019-13233
['CWE-416', 'CWE-362']
insn-eval.c
insn_get_seg_base
/* * Utility functions for x86 operand and address decoding * * Copyright (C) Intel Corporation 2017 */ #include <linux/kernel.h> #include <linux/string.h> #include <linux/ratelimit.h> #include <linux/mmu_context.h> #include <asm/desc_defs.h> #include <asm/desc.h> #include <asm/inat.h> #include <asm/insn.h> #includ...
/* * Utility functions for x86 operand and address decoding * * Copyright (C) Intel Corporation 2017 */ #include <linux/kernel.h> #include <linux/string.h> #include <linux/ratelimit.h> #include <linux/mmu_context.h> #include <asm/desc_defs.h> #include <asm/desc.h> #include <asm/inat.h> #include <asm/insn.h> #includ...
unsigned long insn_get_seg_base(struct pt_regs *regs, int seg_reg_idx) { struct desc_struct *desc; short sel; sel = get_segment_selector(regs, seg_reg_idx); if (sel < 0) return -1L; if (v8086_mode(regs)) /* * Base is simply the segment selector shifted 4 * bits to the right. */ return (unsigned lo...
unsigned long insn_get_seg_base(struct pt_regs *regs, int seg_reg_idx) { struct desc_struct desc; short sel; sel = get_segment_selector(regs, seg_reg_idx); if (sel < 0) return -1L; if (v8086_mode(regs)) /* * Base is simply the segment selector shifted 4 * bits to the right. */ return (unsigned lon...
{'added': [(560, ' * get_desc() - Obtain contents of a segment descriptor'), (561, ' * @out:\tSegment descriptor contents on success'), (569, ' * True on success, false on failure.'), (573, 'static bool get_desc(struct desc_struct *out, unsigned short sel)'), (580, '\t\tbool success = false;'), (588, '\t\tif (ldt && se...
24
23
634
3,848
https://github.com/torvalds/linux
CVE-2019-13233
['CWE-416', 'CWE-362']
vim9compile.c
generate_loadvar
/* vi:set ts=8 sts=4 sw=4 noet: * * VIM - Vi IMproved by Bram Moolenaar * * Do ":help uganda" in Vim to read copying and usage conditions. * Do ":help credits" in Vim to see a list of people who contributed. * See README.txt for an overview of the Vim source code. */ /* * vim9compile.c: compiling a :def funct...
/* vi:set ts=8 sts=4 sw=4 noet: * * VIM - Vi IMproved by Bram Moolenaar * * Do ":help uganda" in Vim to read copying and usage conditions. * Do ":help credits" in Vim to see a list of people who contributed. * See README.txt for an overview of the Vim source code. */ /* * vim9compile.c: compiling a :def funct...
generate_loadvar( cctx_T *cctx, assign_dest_T dest, char_u *name, lvar_T *lvar, type_T *type) { switch (dest) { case dest_option: case dest_func_option: generate_LOAD(cctx, ISN_LOADOPT, 0, name, type); break; case dest_global: if (vim_strchr(name, AUTOLOAD_CHAR) == NULL) { if (...
generate_loadvar( cctx_T *cctx, assign_dest_T dest, char_u *name, lvar_T *lvar, type_T *type) { switch (dest) { case dest_option: case dest_func_option: generate_LOAD(cctx, ISN_LOADOPT, 0, name, type); break; case dest_global: if (vim_strchr(name, AUTOLOAD_CHAR) == NULL) { if (...
{'added': [(1168, '\t if (cctx->ctx_skip != SKIP_YES)'), (1169, '\t {'), (1170, '\t\tif (lvar->lv_from_outer > 0)'), (1171, '\t\t generate_LOADOUTER(cctx, lvar->lv_idx, lvar->lv_from_outer,'), (1173, '\t\telse'), (1174, '\t\t generate_LOAD(cctx, ISN_LOAD, lvar->lv_idx, NULL, type);'), (1175, '\t }'), (19...
10
4
2,761
15,117
https://github.com/vim/vim
CVE-2022-2874
['CWE-476']
upnpsoap.c
GetOutboundPinholeTimeout
/* $Id: upnpsoap.c,v 1.151 2018/03/13 10:32:53 nanard Exp $ */ /* vim: tabstop=4 shiftwidth=4 noexpandtab * MiniUPnP project * http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/ * (c) 2006-2018 Thomas Bernard * This software is subject to the conditions detailed * in the LICENCE file provided within the d...
/* $Id: upnpsoap.c,v 1.151 2018/03/13 10:32:53 nanard Exp $ */ /* vim: tabstop=4 shiftwidth=4 noexpandtab * MiniUPnP project * http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/ * (c) 2006-2018 Thomas Bernard * This software is subject to the conditions detailed * in the LICENCE file provided within the d...
GetOutboundPinholeTimeout(struct upnphttp * h, const char * action, const char * ns) { int r; static const char resp[] = "<u:%sResponse " "xmlns:u=\"%s\">" "<OutboundPinholeTimeout>%d</OutboundPinholeTimeout>" "</u:%sResponse>"; char body[512]; int bodylen; struct NameValueParserData data; char * int_ip...
GetOutboundPinholeTimeout(struct upnphttp * h, const char * action, const char * ns) { int r; static const char resp[] = "<u:%sResponse " "xmlns:u=\"%s\">" "<OutboundPinholeTimeout>%d</OutboundPinholeTimeout>" "</u:%sResponse>"; char body[512]; int bodylen; struct NameValueParserData data; char * int_ip...
{'added': [(1853, '\tif (!int_port || !rem_port || !protocol)')], 'deleted': [(1853, '\tif (!int_port || !ext_port || !protocol)')]}
1
1
1,785
10,156
https://github.com/miniupnp/miniupnp
CVE-2019-12108
['CWE-476']
imap.c
imap_subscribe
/* * Copyright (C) 1996-1998,2012 Michael R. Elkins <me@mutt.org> * Copyright (C) 1996-1999 Brandon Long <blong@fiction.net> * Copyright (C) 1999-2009,2012,2017 Brendan Cully <brendan@kublai.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Gener...
/* * Copyright (C) 1996-1998,2012 Michael R. Elkins <me@mutt.org> * Copyright (C) 1996-1999 Brandon Long <blong@fiction.net> * Copyright (C) 1999-2009,2012,2017 Brendan Cully <brendan@kublai.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Gener...
int imap_subscribe (char *path, int subscribe) { IMAP_DATA *idata; char buf[LONG_STRING]; char mbox[LONG_STRING]; char errstr[STRING]; BUFFER err, token; IMAP_MBOX mx; if (!mx_is_imap (path) || imap_parse_path (path, &mx) || !mx.mbox) { mutt_error (_("Bad mailbox name")); return -1; } if (!...
int imap_subscribe (char *path, int subscribe) { IMAP_DATA *idata; char buf[LONG_STRING]; char mbox[LONG_STRING]; char errstr[STRING]; int mblen; BUFFER err, token; IMAP_MBOX mx; if (!mx_is_imap (path) || imap_parse_path (path, &mx) || !mx.mbox) { mutt_error (_("Bad mailbox name")); return -1...
{'added': [(1933, ' int mblen;'), (1955, ' mblen = snprintf (mbox, sizeof (mbox), "%smailboxes ",'), (1956, ' subscribe ? "" : "un");'), (1957, ' imap_quote_string_and_backquotes (mbox + mblen, sizeof(mbox) - mblen,'), (1958, ' path);')], 'deleted': [(195...
5
2
1,684
10,639
https://gitlab.com/muttmua/mutt
CVE-2018-14354
['CWE-78']