func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
open_source_for_copy (GFile *source,
GFile *destination,
GFileCopyFlags flags,
GCancellable *cancellable,
GError **error)
{
GError *my_error;
GFileInputStream *ret;
GFileInfo *info;
GFileType... | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 11,950,398,614,483,752,000,000,000,000,000,000,000 | 74 | gfile: Limit access to files when copying
file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to lim... |
int ClientHandler::do_read() { return read_(*this); } | 0 | [] | nghttp2 | 95efb3e19d174354ca50c65d5d7227d92bcd60e1 | 171,197,404,220,805,360,000,000,000,000,000,000,000 | 1 | Don't read too greedily |
vte_remove_line_internal(VteTerminal *terminal, glong position)
{
if (_vte_ring_next(terminal->pvt->screen->row_data) > position) {
if (terminal->pvt->free_row)
_vte_free_row_data (terminal->pvt->free_row);
terminal->pvt->free_row = _vte_ring_remove(
terminal->pvt->screen->row_data,
position,
FALSE... | 0 | [] | vte | 58bc3a942f198a1a8788553ca72c19d7c1702b74 | 102,449,180,145,531,320,000,000,000,000,000,000,000 | 12 | fix bug #548272
svn path=/trunk/; revision=2365 |
static int devinet_conf_proc(struct ctl_table *ctl, int write,
void __user *buffer,
size_t *lenp, loff_t *ppos)
{
int old_value = *(int *)ctl->data;
int ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
int new_value = *(int *)ctl->data;
if (write) {
struct ipv4_devconf *cnf = ctl->extra1;
s... | 0 | [
"CWE-399"
] | net-next | fbd40ea0180a2d328c5adc61414dc8bab9335ce2 | 255,258,485,288,832,230,000,000,000,000,000,000,000 | 45 | ipv4: Don't do expensive useless work during inetdev destroy.
When an inetdev is destroyed, every address assigned to the interface
is removed. And in this scenerio we do two pointless things which can
be very expensive if the number of assigned interfaces is large:
1) Address promotion. We are deleting all address... |
bool is_module_address(unsigned long addr)
{
bool ret;
preempt_disable();
ret = __module_address(addr) != NULL;
preempt_enable();
return ret;
} | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 327,454,217,104,653,140,000,000,000,000,000,000,000 | 10 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
static void vmx_set_msr_bitmap(struct kvm_vcpu *vcpu)
{
unsigned long *msr_bitmap;
if (irqchip_in_kernel(vcpu->kvm) && apic_x2apic_mode(vcpu->arch.apic)) {
if (is_long_mode(vcpu))
msr_bitmap = vmx_msr_bitmap_longmode_x2apic;
else
msr_bitmap = vmx_msr_bitmap_legacy_x2apic;
} else {
if (is_long_mode(vcpu)... | 0 | [] | kvm | a642fc305053cc1c6e47e4f4df327895747ab485 | 65,963,442,745,777,000,000,000,000,000,000,000,000 | 18 | kvm: vmx: handle invvpid vm exit gracefully
On systems with invvpid instruction support (corresponding bit in
IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid
causes vm exit, which is currently not handled and results in
propagation of unknown exit to userspace.
Fix this by installing an invvpid vm exit ... |
server_client_command_done(struct cmdq_item *item, __unused void *data)
{
struct client *c = item->client;
if (~c->flags & CLIENT_ATTACHED)
c->flags |= CLIENT_EXIT;
return (CMD_RETURN_NORMAL);
} | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 35,419,349,210,077,633,000,000,000,000,000,000,000 | 8 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
int jp2_encode(jas_image_t *image, jas_stream_t *out, const char *optstr)
{
jp2_box_t *box;
jp2_ftyp_t *ftyp;
jp2_ihdr_t *ihdr;
jas_stream_t *tmpstream;
int allcmptssame;
jp2_bpcc_t *bpcc;
long len;
uint_fast16_t cmptno;
jp2_colr_t *colr;
char buf[4096];
uint_fast32_t overhead;
jp2_cdefchan_t *cdefchanent;
... | 1 | [
"CWE-125"
] | jasper | 03db7c81f6a8a92d896249bc673877749987fd7a | 19,879,316,639,441,336,000,000,000,000,000,000,000 | 330 | jp2_enc: check number of components before dereferencing them
Fixes CVE-2018-20570
Closes https://github.com/jasper-maint/jasper/issues/11
Closes https://github.com/mdadams/jasper/issues/191 |
static int dvb_frontend_handle_ioctl(struct file *file,
unsigned int cmd, void *parg)
{
struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend *fe = dvbdev->priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
int i, err;
... | 0 | [
"CWE-416"
] | linux | b1cb7372fa822af6c06c8045963571d13ad6348b | 22,100,962,273,139,085,000,000,000,000,000,000,000 | 365 | dvb_frontend: don't use-after-free the frontend struct
dvb_frontend_invoke_release() may free the frontend struct.
So, the free logic can't update it anymore after calling it.
That's OK, as __dvb_frontend_free() is called only when the
krefs are zeroed, so nobody is using it anymore.
That should fix the following KA... |
static int check_struct_ops_btf_id(struct bpf_verifier_env *env)
{
const struct btf_type *t, *func_proto;
const struct bpf_struct_ops *st_ops;
const struct btf_member *member;
struct bpf_prog *prog = env->prog;
u32 btf_id, member_idx;
const char *mname;
if (!prog->gpl_compatible) {
verbose(env, "struct ops pr... | 0 | [
"CWE-125"
] | bpf | 049c4e13714ecbca567b4d5f6d563f05d431c80e | 166,201,359,784,977,440,000,000,000,000,000,000,000 | 56 | bpf: Fix alu32 const subreg bound tracking on bitwise operations
Fix a bug in the verifier's scalar32_min_max_*() functions which leads to
incorrect tracking of 32 bit bounds for the simulation of and/or/xor bitops.
When both the src & dst subreg is a known constant, then the assumption is
that scalar_min_max_*() will... |
TPMU_HA_Marshal(TPMU_HA *source, BYTE **buffer, INT32 *size, UINT32 selector)
{
UINT16 written = 0;
switch (selector) {
#if ALG_SHA1
case TPM_ALG_SHA1:
written += Array_Marshal(&source->sha1[0], SHA1_DIGEST_SIZE, buffer, size);
break;
#endif
#if ALG_SHA256
case TPM_ALG_SHA256:
written += Array_... | 0 | [
"CWE-787"
] | libtpms | 3ef9b26cb9f28bd64d738bff9505a20d4eb56acd | 303,695,004,630,648,960,000,000,000,000,000,000,000 | 37 | tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks
Add maxSize parameter to TPM2B_Marshal and assert on it checking
the size of the data intended to be marshaled versus the maximum
buffer size.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
static bool actions_may_change_flow(const struct nlattr *actions)
{
struct nlattr *nla;
int rem;
nla_for_each_nested(nla, actions, rem) {
u16 action = nla_type(nla);
switch (action) {
case OVS_ACTION_ATTR_OUTPUT:
case OVS_ACTION_ATTR_RECIRC:
case OVS_ACTION_ATTR_TRUNC:
case OVS_ACTION_ATTR_USERSPACE:
... | 0 | [
"CWE-362",
"CWE-787"
] | linux | cefa91b2332d7009bc0be5d951d6cbbf349f90f8 | 296,150,432,608,492,650,000,000,000,000,000,000,000 | 39 | openvswitch: fix OOB access in reserve_sfa_size()
Given a sufficiently large number of actions, while copying and
reserving memory for a new action of a new flow, if next_offset is
greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does
not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS... |
mlx5_monitor_callback(const uint64_t value,
const uint64_t opaque[RTE_POWER_MONITOR_OPAQUE_SZ])
{
const uint64_t m = opaque[CLB_MSK_IDX];
const uint64_t v = opaque[CLB_VAL_IDX];
return (value & m) == v ? -1 : 0;
} | 0 | [] | dpdk | 60b254e3923d007bcadbb8d410f95ad89a2f13fa | 189,578,985,831,360,160,000,000,000,000,000,000,000 | 8 | net/mlx5: fix Rx queue recovery mechanism
The local variables are getting inconsistent in data receiving routines
after queue error recovery.
Receive queue consumer index is getting wrong, need to reset one to the
size of the queue (as RQ was fully replenished in recovery procedure).
In MPRQ case, also the local cons... |
static int string_contains(const void *a, const void *b) {
return !strstr((const char *)a, (const char *)b);
} | 0 | [
"CWE-787"
] | rizin | 556ca2f9eef01ec0f4a76d1fbacfcf3a87a44810 | 169,164,284,310,893,110,000,000,000,000,000,000,000 | 3 | Fix oob write in dyldcache
When the individual n_slide_infos were too high, the sum would overflow
and too few entries would be allocated. |
lib_merge_tklist(argc, argv, obj)
int argc;
VALUE *argv;
VALUE obj;
{
int num, len;
int *flagPtr;
char *dst, *result;
volatile VALUE str;
int taint_flag = 0;
int thr_crit_bup;
VALUE old_gc;
if (argc == 0) return rb_str_new2("");
tcl_stubs_check();
thr_crit_bup = ... | 0 | [] | tk | d098136e3f62a4879a7d7cd34bbd50f482ba3331 | 276,758,312,974,425,600,000,000,000,000,000,000,000 | 96 | tcltklib.c: use StringValueCStr [ci skip]
* ext/tk/tcltklib.c (set_max_block_time, tcl_protect_core,
ip_init, ip_create_slave_core, get_obj_from_str,
ip_cancel_eval_core, lib_set_system_encoding,
alloc_invoke_arguments, lib_merge_tklist): use StringValueCStr
instead of StringValuePtr for values to be passed to... |
const char *remove_leading_path(const char *in, const char *prefix)
{
static struct strbuf buf = STRBUF_INIT;
int i = 0, j = 0;
if (!prefix || !prefix[0])
return in;
while (prefix[i]) {
if (is_dir_sep(prefix[i])) {
if (!is_dir_sep(in[j]))
return in;
while (is_dir_sep(prefix[i]))
i++;
while (is... | 0 | [
"CWE-125"
] | git | 11a9f4d807a0d71dc6eff51bb87baf4ca2cccf1d | 323,657,944,132,304,240,000,000,000,000,000,000,000 | 39 | is_ntfs_dotgit: use a size_t for traversing string
We walk through the "name" string using an int, which can
wrap to a negative value and cause us to read random memory
before our array (e.g., by creating a tree with a name >2GB,
since "int" is still 32 bits even on most 64-bit platforms).
Worse, this is easy to trigg... |
call_ufunc(
ufunc_T *ufunc,
partial_T *pt,
int argcount,
ectx_T *ectx,
isn_T *iptr,
dict_T *selfdict)
{
typval_T argvars[MAX_FUNC_ARGS];
funcexe_T funcexe;
int error;
int idx;
int did_emsg_before = did_emsg;
compiletype_T compile_type = COMPILE_TYPE(ufunc);
... | 0 | [
"CWE-416"
] | vim | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 | 116,113,668,634,084,790,000,000,000,000,000,000,000 | 68 | patch 8.2.3902: Vim9: double free with nested :def function
Problem: Vim9: double free with nested :def function.
Solution: Pass "line_to_free" from compile_def_function() and make sure
cmdlinep is valid. |
static void cluster_dnode_free(dnode_t *node,
void *context EXT2FS_ATTR((unused)))
{
struct dup_cluster *dc;
struct inode_el *p, *next;
dc = (struct dup_cluster *) dnode_get(node);
for (p = dc->inode_list; p; p = next) {
next = p->next;
free(p);
}
free(dc);
free(node);
} | 0 | [
"CWE-787"
] | e2fsprogs | 71ba13755337e19c9a826dfc874562a36e1b24d3 | 234,269,423,679,593,800,000,000,000,000,000,000,000 | 14 | e2fsck: don't try to rehash a deleted directory
If directory has been deleted in pass1[bcd] processing, then we
shouldn't try to rehash the directory in pass 3a when we try to
rehash/reoptimize directories.
Signed-off-by: Theodore Ts'o <tytso@mit.edu> |
static int sg_proc_seq_show_devstrs(struct seq_file *s, void *v)
{
struct sg_proc_deviter * it = (struct sg_proc_deviter *) v;
Sg_device *sdp;
struct scsi_device *scsidp;
unsigned long iflags;
read_lock_irqsave(&sg_index_lock, iflags);
sdp = it ? sg_lookup_dev(it->index) : NULL;
scsidp = sdp ? sdp->device : NUL... | 0 | [
"CWE-190",
"CWE-189"
] | linux | fdc81f45e9f57858da6351836507fbcf1b7583ee | 325,752,043,061,120,300,000,000,000,000,000,000,000 | 18 | sg_start_req(): use import_iovec()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size)
{
u32 align = buf->buf_align - 1, offset;
char *addr = buf->addr;
/* If IO mapped, we need to sync before access, no sharing of
* the pixmap is done
*/
if (buf->flags & FB_PIXMAP_IO) {
if (info->fbops->fb_sync && (buf->flags & ... | 0 | [
"CWE-703",
"CWE-189"
] | linux | fc9bbca8f650e5f738af8806317c0a041a48ae4a | 13,942,381,924,500,828,000,000,000,000,000,000,000 | 31 | vm: convert fb_mmap to vm_iomap_memory() helper
This is my example conversion of a few existing mmap users. The
fb_mmap() case is a good example because it is a bit more complicated
than some: fb_mmap() mmaps one of two different memory areas depending
on the page offset of the mmap (but happily there is never any mi... |
ssize_t rdbSaveAuxFieldStrStr(rio *rdb, char *key, char *val) {
return rdbSaveAuxField(rdb,key,strlen(key),val,strlen(val));
} | 0 | [
"CWE-190"
] | redis | a30d367a71b7017581cf1ca104242a3c644dec0f | 297,439,078,521,691,700,000,000,000,000,000,000,000 | 3 | Fix Integer overflow issue with intsets (CVE-2021-32687)
The vulnerability involves changing the default set-max-intset-entries
configuration parameter to a very large value and constructing specially
crafted commands to manipulate sets |
bool should_numa_migrate_memory(struct task_struct *p, struct page * page,
int src_nid, int dst_cpu)
{
struct numa_group *ng = p->numa_group;
int dst_nid = cpu_to_node(dst_cpu);
int last_cpupid, this_cpupid;
this_cpupid = cpu_pid_to_cpupid(dst_cpu, current->pid);
last_cpupid = page_cpupid_xchg_last(page, this... | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 103,489,478,898,218,490,000,000,000,000,000,000,000 | 68 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) re... |
xmlXPtrEvalXPtrPart(xmlXPathParserContextPtr ctxt, xmlChar *name) {
xmlChar *buffer, *cur;
int len;
int level;
if (name == NULL)
name = xmlXPathParseName(ctxt);
if (name == NULL)
XP_ERROR(XPATH_EXPR_ERROR);
if (CUR != '(')
XP_ERROR(XPATH_EXPR_ERROR);
NEXT;
level = 1;
len = x... | 1 | [
"CWE-189"
] | libxml2 | d8e1faeaa99c7a7c07af01c1c72de352eb590a3e | 238,359,414,167,674,230,000,000,000,000,000,000,000 | 141 | Fix an off by one pointer access
getting out of the range of memory allocated for xpointer decoding |
int Hints::getPageObjectNum(int page)
{
if ((page < 1) || (page > nPages)) {
return 0;
}
if (page - 1 > pageFirst) {
return pageObjectNum[page - 1];
} else if (page - 1 < pageFirst) {
return pageObjectNum[page];
} else {
return pageObjectNum[0];
}
} | 0 | [] | poppler | 81044c64b9ed9a10ae82a28bac753060bdfdac74 | 229,713,997,947,597,400,000,000,000,000,000,000,000 | 14 | Hints::readTables: bail out if we run out of file when reading
Fixes #1230 |
static void emitjumpto(JF, int opcode, int dest)
{
emit(J, F, opcode);
if (dest != (js_Instruction)dest)
js_syntaxerror(J, "jump address integer overflow");
emitraw(J, F, dest);
} | 0 | [
"CWE-476"
] | mujs | 5008105780c0b0182ea6eda83ad5598f225be3ee | 211,506,137,269,478,260,000,000,000,000,000,000,000 | 7 | Fix 697172: degenerate labeled break/continue statement.
A labeled break statement will look for a matching label through
its chain of parent statements. We start looking at the break statement
though, so if the label is attached to the break, we'll return the break
statement itself as a break target.
Start looking f... |
addr_policy_free(addr_policy_t *p)
{
if (p) {
if (--p->refcnt <= 0) {
if (p->is_canonical) {
policy_map_ent_t search, *found;
search.policy = p;
found = HT_REMOVE(policy_map, &policy_root, &search);
if (found) {
tor_assert(p == found->policy);
tor_free(fou... | 0 | [
"CWE-119"
] | tor | 43414eb98821d3b5c6c65181d7545ce938f82c8e | 180,959,608,737,944,850,000,000,000,000,000,000,000 | 17 | Fix bounds-checking in policy_summarize
Found by piebeer. |
int LZ4IO_setBlockMode(blockMode_t blockMode)
{
blockIndependence = (blockMode == independentBlocks);
return blockIndependence;
} | 0 | [
"CWE-20"
] | lz4 | da5373197e84ee49d75b8334d4510689731d6e90 | 307,472,075,491,683,300,000,000,000,000,000,000,000 | 5 | Fixed : issue 52 (reported by Ludwig Strigeus) |
static bool free_pcp_prepare(struct page *page)
{
return free_pages_prepare(page, 0, false);
} | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 269,592,710,297,725,750,000,000,000,000,000,000,000 | 4 | mm: don't warn about allocations which stall for too long
Commit 63f53dea0c98 ("mm: warn about allocations which stall for too
long") was a great step for reducing possibility of silent hang up
problem caused by memory allocation stalls. But this commit reverts it,
for it is possible to trigger OOM lockup and/or soft... |
struct vfsmount *clone_private_mount(const struct path *path)
{
struct mount *old_mnt = real_mount(path->mnt);
struct mount *new_mnt;
if (IS_MNT_UNBINDABLE(old_mnt))
return ERR_PTR(-EINVAL);
new_mnt = clone_mnt(old_mnt, path->dentry, CL_PRIVATE);
if (IS_ERR(new_mnt))
return ERR_CAST(new_mnt);
/* Longterm m... | 1 | [
"CWE-200"
] | linux | 427215d85e8d1476da1a86b8d67aceb485eb3631 | 94,389,509,905,056,130,000,000,000,000,000,000,000 | 17 | ovl: prevent private clone if bind mount is not allowed
Add the following checks from __do_loopback() to clone_private_mount() as
well:
- verify that the mount is in the current namespace
- verify that there are no locked children
Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de>
Fixes: c771d683a62e ("vfs: ... |
int cil_gen_portcon(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node)
{
enum cil_syntax syntax[] = {
CIL_SYN_STRING,
CIL_SYN_STRING,
CIL_SYN_STRING | CIL_SYN_LIST,
CIL_SYN_STRING | CIL_SYN_LIST,
CIL_SYN_END
};
int syntax_len = sizeof(syntax)/sizeof(*syntax);
int rc = ... | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 310,124,557,318,593,660,000,000,000,000,000,000,000 | 88 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
static int serverinfo_cli_parse_cb(SSL* s, unsigned int ext_type,
const unsigned char* in, size_t inlen,
int* al, void* arg)
{
char pem_name[100];
unsigned char ext_buf[4 + 65536];
/* Reconstruct the type/len fields prior to extension data */
ext_buf[0] = ext_type >> 8;
ext_buf[1] = ext_type & 0xF... | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 37,848,258,976,611,550,000,000,000,000,000,000,000 | 19 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
static int sctp_setsockopt_reconfig_supported(struct sock *sk,
char __user *optval,
unsigned int optlen)
{
struct sctp_assoc_value params;
struct sctp_association *asoc;
int retval = -EINVAL;
if (optlen != sizeof(params))
goto out;
if (copy_from_user(¶ms, optval, optlen)) {
retval =... | 0 | [
"CWE-416",
"CWE-787"
] | linux | df80cd9b28b9ebaa284a41df611dbf3a2d05ca74 | 25,069,200,395,161,547,000,000,000,000,000,000,000 | 32 | sctp: do not peel off an assoc from one netns to another one
Now when peeling off an association to the sock in another netns, all
transports in this assoc are not to be rehashed and keep use the old
key in hashtable.
As a transport uses sk->net as the hash key to insert into hashtable,
it would miss removing these t... |
static void *__packet_lookup_frame_in_block(struct packet_sock *po,
struct sk_buff *skb,
unsigned int len
)
{
struct tpacket_kbdq_core *pkc;
struct tpacket_block_desc *pbd;
char *curr, *end;
pkc = GET_PBDQC_FROM_RB(&po->rx_ring);
pbd = GET_CURR_PBLOCK_DESC_FROM_CORE(pkc);
/* Queue is ... | 0 | [
"CWE-787"
] | linux | acf69c946233259ab4d64f8869d4037a198c7f06 | 332,202,458,846,641,070,000,000,000,000,000,000,000 | 60 | net/packet: fix overflow in tpacket_rcv
Using tp_reserve to calculate netoff can overflow as
tp_reserve is unsigned int and netoff is unsigned short.
This may lead to macoff receving a smaller value then
sizeof(struct virtio_net_hdr), and if po->has_vnet_hdr
is set, an out-of-bounds write will occur when
calling virt... |
static void GetRootMeanSquarePixelList(PixelList *pixel_list,
MagickPixelPacket *pixel)
{
MagickRealType
sum;
SkipList
*list;
ssize_t
channel;
size_t
color;
ssize_t
count;
unsigned short
channels[ListChannels];
/*
Find the root mean square value for each of the color.
... | 0 | [] | ImageMagick6 | 072d7b10dbe74d1cf4ec0d008990c1a28c076f9e | 65,585,885,280,740,930,000,000,000,000,000,000,000 | 45 | https://github.com/ImageMagick/ImageMagick/issues/3332 |
static void hls_mvd_coding(HEVCContext *s, int x0, int y0, int log2_cb_size)
{
HEVCLocalContext *lc = &s->HEVClc;
int x = ff_hevc_abs_mvd_greater0_flag_decode(s);
int y = ff_hevc_abs_mvd_greater0_flag_decode(s);
if (x)
x += ff_hevc_abs_mvd_greater1_flag_decode(s);
if (y)
y += ff_hev... | 0 | [
"CWE-703"
] | FFmpeg | b25e84b7399bd91605596b67d761d3464dbe8a6e | 309,405,196,762,419,460,000,000,000,000,000,000,000 | 23 | hevc: check that the VCL NAL types are the same for all slice segments of a frame
Fixes possible invalid memory access for mismatching skipped/non-skipped
slice segments.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Sample-Id: 00001533-google |
DnD_TransportBufInit(DnDTransportBuffer *buf, // OUT
uint8 *msg, // IN
size_t msgSize, // IN
uint32 seqNum) // IN
{
ASSERT(buf);
ASSERT(msgSize <= DNDMSG_MAX_ARGSZ);
free(buf->buffer);
buf->buffer = Util_SafeMall... | 0 | [] | open-vm-tools | e88f91b00a715b79255de6576506d80ecfdb064c | 179,500,672,304,051,140,000,000,000,000,000,000,000 | 15 | Fix possible security issue with the permissions of the intermediate
staging directory and path
/tmp/VMwareDnD is a staging directory used for DnD and CnP. It should be
a regular directory, but malicious code or user may create the /tmp/VMwareDnD
as a symbolic link which points elsewhere on the system. This may prov... |
flush_signal_handlers(struct task_struct *t, int force_default)
{
int i;
struct k_sigaction *ka = &t->sighand->action[0];
for (i = _NSIG ; i != 0 ; i--) {
if (force_default || ka->sa.sa_handler != SIG_IGN)
ka->sa.sa_handler = SIG_DFL;
ka->sa.sa_flags = 0;
sigemptyset(&ka->sa.sa_mask);
ka++;
}
} | 1 | [
"CWE-284",
"CWE-264"
] | linux | 2ca39528c01a933f6689cd6505ce65bd6d68a530 | 192,407,786,586,283,480,000,000,000,000,000,000,000 | 12 | signal: always clear sa_restorer on execve
When the new signal handlers are set up, the location of sa_restorer is
not cleared, leaking a parent process's address space location to
children. This allows for a potential bypass of the parent's ASLR by
examining the sa_restorer value returned when calling sigaction().
... |
TIFFWriteDirectoryTagLongArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint32* value)
{
if (dir==NULL)
{
(*ndir)++;
return(1);
}
return(TIFFWriteDirectoryTagCheckedLongArray(tif,ndir,dir,tag,count,value));
} | 0 | [
"CWE-617"
] | libtiff | de144fd228e4be8aa484c3caf3d814b6fa88c6d9 | 191,038,821,318,043,700,000,000,000,000,000,000,000 | 9 | TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963 |
static void tcp_openreq_init(struct request_sock *req,
const struct tcp_options_received *rx_opt,
struct sk_buff *skb, const struct sock *sk)
{
struct inet_request_sock *ireq = inet_rsk(req);
req->rsk_rcv_wnd = 0; /* So that tcp_send_synack() knows! */
req->cookie_ts = 0;
tcp_rsk(req)->rcv_isn = T... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 307,588,607,096,542,480,000,000,000,000,000,000,000 | 27 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
ngx_mail_send(ngx_event_t *wev)
{
ngx_int_t n;
ngx_connection_t *c;
ngx_mail_session_t *s;
ngx_mail_core_srv_conf_t *cscf;
c = wev->data;
s = c->data;
if (wev->timedout) {
ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT, "client timed out");
... | 0 | [
"CWE-284",
"CWE-295"
] | nginx | 173f16f736c10eae46cd15dd861b04b82d91a37a | 194,707,750,227,652,570,000,000,000,000,000,000,000 | 69 | Mail: max_errors directive.
Similarly to smtpd_hard_error_limit in Postfix and smtp_max_unknown_commands
in Exim, specifies the number of errors after which the connection is closed. |
static char *cli_session_setup_get_principal(
TALLOC_CTX *mem_ctx, const char *spnego_principal,
const char *remote_name, const char *dest_realm)
{
char *principal = NULL;
if (!lp_client_use_spnego_principal() ||
strequal(spnego_principal, ADS_IGNORE_PRINCIPAL)) {
spnego_principal = NULL;
}
if (spnego_pri... | 0 | [
"CWE-94"
] | samba | 94295b7aa22d2544af5323bca70d3dcb97fd7c64 | 304,659,861,108,041,000,000,000,000,000,000,000,000 | 40 | CVE-2016-2019: s3:libsmb: add comment regarding smbXcli_session_is_guest() with mandatory signing
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860
Signed-off-by: Stefan Metzmacher <metze@samba.org> |
DefaultMemchunks *Downstream::get_response_buf() { return &response_buf_; } | 0 | [] | nghttp2 | 319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c | 279,809,548,791,198,070,000,000,000,000,000,000,000 | 1 | nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full. |
int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
{
struct cfs_rq *cfs_rq;
struct sched_entity *se;
struct rq *rq;
int i;
tg->cfs_rq = kzalloc(sizeof(cfs_rq) * nr_cpu_ids, GFP_KERNEL);
if (!tg->cfs_rq)
goto err;
tg->se = kzalloc(sizeof(se) * nr_cpu_ids, GFP_KERNEL);
if (!tg->se)
... | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 68,852,123,040,785,400,000,000,000,000,000,000,000 | 39 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
static int ext4_xattr_make_inode_space(handle_t *handle, struct inode *inode,
struct ext4_inode *raw_inode,
int isize_diff, size_t ifree,
size_t bfree, int *total_ino)
{
struct ext4_xattr_ibody_header *header = IHDR(inode, raw_inode);
struct ext4_xattr_entry *small_entry;
struct ext4... | 0 | [
"CWE-787"
] | linux | 8cdb5240ec5928b20490a2bb34cb87e9a5f40226 | 100,208,307,185,851,840,000,000,000,000,000,000,000 | 64 | ext4: never move the system.data xattr out of the inode body
When expanding the extra isize space, we must never move the
system.data xattr out of the inode body. For performance reasons, it
doesn't make any sense, and the inline data implementation assumes
that system.data xattr is never in the external xattr block.... |
bool is_sameN(const unsigned int size_n) const {
return _width==size_n;
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 314,754,814,004,377,960,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static void ql_display_dev_info(struct net_device *ndev)
{
struct ql3_adapter *qdev = netdev_priv(ndev);
struct pci_dev *pdev = qdev->pdev;
netdev_info(ndev,
"%s Adapter %d RevisionID %d found %s on PCI slot %d\n",
DRV_NAME, qdev->index, qdev->chip_rev_id,
qdev->device_id == QL3032_DEVICE_ID ? "Q... | 0 | [
"CWE-401"
] | linux | 1acb8f2a7a9f10543868ddd737e37424d5c36cf4 | 325,334,466,088,612,700,000,000,000,000,000,000,000 | 26 | net: qlogic: Fix memory leak in ql_alloc_large_buffers
In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb.
This skb should be released if pci_dma_mapping_error fails.
Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue... |
size_t Tensor::TotalBytes() const {
if (shape_.num_elements() == 0) return 0;
CHECK(buf_) << "null buf_ with non-zero shape size " << shape_.num_elements();
CASES(dtype(), return Helper<T>::TotalBytes(buf_, shape_.num_elements()));
return 0; // Makes compiler happy.
} | 0 | [
"CWE-345"
] | tensorflow | abcced051cb1bd8fb05046ac3b6023a7ebcc4578 | 290,675,988,516,071,900,000,000,000,000,000,000,000 | 6 | Prevent crashes when loading tensor slices with unsupported types.
Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL)
messages for the unset and unsupported types.
PiperOrigin-RevId: 392695027
Change-Id: I4beda7db950db951d273e3259a7c8534ece49354 |
ZEND_VM_HANDLER(68, ZEND_NEW, UNUSED|CLASS_FETCH|CONST|VAR, UNUSED|CACHE_SLOT, NUM)
{
USE_OPLINE
zval *result;
zend_function *constructor;
zend_class_entry *ce;
zend_execute_data *call;
SAVE_OPLINE();
if (OP1_TYPE == IS_CONST) {
ce = CACHED_PTR(opline->op2.num);
if (UNEXPECTED(ce == NULL)) {
ce = zend_fe... | 0 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 300,183,245,697,960,870,000,000,000,000,000,000,000 | 70 | Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away. |
modify_param_name(param_token *name)
{
const char *delim1 = memchr (name->b, '*', name->e - name->b);
const char *delim2 = memrchr (name->b, '*', name->e - name->b);
int result;
if(delim1 == NULL)
{
result = NOT_RFC2231;
}
else if(delim1 == delim2)
{
if ((name->e - 1) == delim1)
... | 0 | [
"CWE-200"
] | wget | a933bdd31eee9c956a3b5cc142f004ef1fa94cb3 | 249,615,495,777,976,500,000,000,000,000,000,000,000 | 30 | Keep fetched URLs in POSIX extended attributes
* configure.ac: Check for xattr availability
* src/Makefile.am: Add xattr.c
* src/ftp.c: Include xattr.h.
(getftp): Set attributes if enabled.
* src/http.c: Include xattr.h.
(gethttp): Add parameter 'original_url',
set attributes if enabled.
(http_loop): Add 'orig... |
static void dmar_fault_handler(uint32_t irq, void *data)
{
struct dmar_drhd_rt *dmar_unit = (struct dmar_drhd_rt *)data;
uint32_t fsr;
uint32_t index;
uint32_t record_reg_offset;
struct dmar_entry fault_record;
int32_t loop = 0;
dev_dbg(DBG_LEVEL_IOMMU, "%s: irq = %d", __func__, irq);
fsr = iommu_read32(dmar_... | 0 | [
"CWE-120",
"CWE-787"
] | acrn-hypervisor | 25c0e3817eb332660dd63d1d4522e63dcc94e79a | 131,326,322,428,652,270,000,000,000,000,000,000,000 | 49 | hv: validate input for dmar_free_irte function
Malicious input 'index' may trigger buffer
overflow on array 'irte_alloc_bitmap[]'.
This patch validate that 'index' shall be
less than 'CONFIG_MAX_IR_ENTRIES' and also
remove unnecessary check on 'index' in
'ptirq_free_irte()' function with this fix.
Tracked-On: ... |
static int do_get_sock_timeout(struct socket *sock, int level, int optname,
char __user *optval, int __user *optlen)
{
struct compat_timeval __user *up;
struct timeval ktime;
mm_segment_t old_fs;
int len, err;
up = (struct compat_timeval __user *) optval;
if (get_user(len, optlen))
return -EFAULT;
if (len <... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 82,249,674,462,053,620,000,000,000,000,000,000,000 | 28 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
static double mp_self_modulo(_cimg_math_parser& mp) {
double &val = _mp_arg(1);
return val = cimg::mod(val,_mp_arg(2));
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 140,541,830,368,078,130,000,000,000,000,000,000,000 | 4 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int __init parse_trust_cpu(char *arg)
{
return kstrtobool(arg, &trust_cpu);
} | 0 | [
"CWE-200",
"CWE-330"
] | linux | f227e3ec3b5cad859ad15666874405e8c1bbc1d4 | 331,532,355,275,394,700,000,000,000,000,000,000,000 | 4 | random32: update the net random state on interrupt and activity
This modifies the first 32 bits out of the 128 bits of a random CPU's
net_rand_state on interrupt or CPU activity to complicate remote
observations that could lead to guessing the network RNG's internal
state.
Note that depending on some network devices'... |
virDomainBlockStatsFlags(virDomainPtr dom,
const char *disk,
virTypedParameterPtr params,
int *nparams,
unsigned int flags)
{
virConnectPtr conn;
VIR_DOMAIN_DEBUG(dom, "disk=%s, params=%p, nparams=%d, flags=%x",... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 70,164,128,408,798,930,000,000,000,000,000,000,000 | 38 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
void set_ndpi_flow_free(void (*__ndpi_flow_free)(void *ptr)) {
_ndpi_flow_free = __ndpi_flow_free;
} | 0 | [
"CWE-416",
"CWE-787"
] | nDPI | 6a9f5e4f7c3fd5ddab3e6727b071904d76773952 | 49,429,696,836,302,100,000,000,000,000,000,000,000 | 3 | Fixed use after free caused by dangling pointer
* This fix also improved RCE Injection detection
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> |
static int solvegotos (LexState *ls, Labeldesc *lb) {
Labellist *gl = &ls->dyd->gt;
int i = ls->fs->bl->firstgoto;
int needsclose = 0;
while (i < gl->n) {
if (eqstr(gl->arr[i].name, lb->name)) {
needsclose |= gl->arr[i].close;
solvegoto(ls, i, lb); /* will remove 'i' from the list */
}
... | 0 | [
"CWE-125"
] | lua | 1f3c6f4534c6411313361697d98d1145a1f030fa | 159,230,420,557,745,550,000,000,000,000,000,000,000 | 14 | Bug: Lua can generate wrong code when _ENV is <const> |
TEST_F(QueryPlannerTest, OrNaturalHint) {
addIndex(BSON("a" << 1));
runQueryHint(fromjson("{$or: [{a:1}, {a:3}]}"), fromjson("{$natural:1}"));
assertNumSolutions(1U);
assertSolutionExists("{cscan: {dir: 1}}");
} | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 1,865,491,846,805,003,000,000,000,000,000,000,000 | 7 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
void gnra_box_del(GF_Box *s)
{
GF_GenericAudioSampleEntryBox *ptr = (GF_GenericAudioSampleEntryBox *)s;
gf_isom_sample_entry_predestroy((GF_SampleEntryBox *)ptr);
if (ptr->data) gf_free(ptr->data);
gf_free(ptr);
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 243,954,830,955,641,640,000,000,000,000,000,000,000 | 7 | fixed #1587 |
bool is_directory(const std::string& fname)
{
if(fname.empty()) {
return false;
}
if(fname[0] != '/' && !game_config::path.empty()) {
if(is_directory_internal(game_config::path + "/" + fname))
return true;
}
return is_directory_internal(fname);
} | 0 | [
"CWE-200"
] | wesnoth | af61f9fdd15cd439da9e2fe5fa39d174c923eaae | 135,272,906,688,919,930,000,000,000,000,000,000,000 | 12 | fs: Use game data path to resolve ./ in the absence of a current_dir
Fixes a file content disclosure bug (#22042) affecting functionality
relying on the get_wml_location() function and not passing a non-empty
value for the current_dir parameter.
See <https://gna.org/bugs/?22042> for details.
This is a candidate for ... |
int is_a_number(char *what) {
int i;
for (i = 0; i < (int) strlen(what); i++) {
if (!isdigit((int) what[i]))
return 0;
}
return 1;
} | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | uwsgi | cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe | 34,878,649,246,404,380,000,000,000,000,000,000,000 | 10 | improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue |
nautilus_file_invalidate_all_attributes (NautilusFile *file)
{
NautilusFileAttributes all_attributes;
all_attributes = nautilus_file_get_all_attributes ();
nautilus_file_invalidate_attributes (file, all_attributes);
} | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 156,037,564,146,198,490,000,000,000,000,000,000,000 | 7 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
decode_labeled_vpn_prefix4(netdissect_options *ndo,
const u_char *pptr, char *buf, u_int buflen)
{
struct in_addr addr;
u_int plen;
ND_TCHECK(pptr[0]);
plen = pptr[0]; /* get prefix length */
if ((24+64) > plen)
return -1;
plen-=(24+64); /* adjust prefixlen - labellength -... | 0 | [
"CWE-674",
"CWE-787"
] | tcpdump | af2cf04a9394c1a56227c2289ae8da262828294a | 244,287,881,307,574,900,000,000,000,000,000,000,000 | 37 | (for 4.9.3) CVE-2018-16300/BGP: prevent stack exhaustion
Enforce a limit on how many times bgp_attr_print() can recurse.
This fixes a stack exhaustion discovered by Include Security working
under the Mozilla SOS program in 2018 by means of code audit. |
static inline u64 get_u64(const struct canfd_frame *cp, int offset)
{
return *(u64 *)(cp->data + offset);
} | 0 | [
"CWE-362"
] | linux | d5f9023fa61ee8b94f37a93f08e94b136cf1e463 | 192,024,022,085,686,100,000,000,000,000,000,000,000 | 4 | can: bcm: delay release of struct bcm_op after synchronize_rcu()
can_rx_register() callbacks may be called concurrently to the call to
can_rx_unregister(). The callbacks and callback data, though, are
protected by RCU and the struct sock reference count.
So the callback data is really attached to the life of sk, mean... |
flatpak_run_allocate_id (int *lock_fd_out)
{
g_autofree char *user_runtime_dir = flatpak_get_real_xdg_runtime_dir ();
g_autofree char *base_dir = g_build_filename (user_runtime_dir, ".flatpak", NULL);
int count;
g_mkdir_with_parents (base_dir, 0755);
flatpak_run_gc_ids ();
for (count = 0; count < 1000; c... | 0 | [
"CWE-20"
] | flatpak | a9107feeb4b8275b78965b36bf21b92d5724699e | 50,985,489,642,306,480,000,000,000,000,000,000,000 | 50 | run: Only compare the lowest 32 ioctl arg bits for TIOCSTI
Closes #2782.
Closes: #2783
Approved by: alexlarsson |
unsigned long iov_iter_gap_alignment(const struct iov_iter *i)
{
unsigned long res = 0;
unsigned long v = 0;
size_t size = i->count;
unsigned k;
if (WARN_ON(!iter_is_iovec(i)))
return ~0U;
for (k = 0; k < i->nr_segs; k++) {
if (i->iov[k].iov_len) {
unsigned long base = (unsigned long)i->iov[k].iov_base;
... | 0 | [
"CWE-665",
"CWE-284"
] | linux | 9d2231c5d74e13b2a0546fee6737ee4446017903 | 245,684,572,172,524,530,000,000,000,000,000,000,000 | 23 | lib/iov_iter: initialize "flags" in new pipe_buffer
The functions copy_page_to_iter_pipe() and push_pipe() can both
allocate a new pipe_buffer, but the "flags" member initializer is
missing.
Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed")
To: Alexander Viro <viro@zeniv.linux.org.uk>
To: linux-fsdevel@vger.k... |
void nfs_write_prepare(struct rpc_task *task, void *calldata)
{
struct nfs_write_data *data = calldata;
int err;
err = NFS_PROTO(data->header->inode)->write_rpc_prepare(task, data);
if (err)
rpc_exit(task, err);
} | 0 | [
"CWE-20",
"CWE-200"
] | linux | 263b4509ec4d47e0da3e753f85a39ea12d1eff24 | 102,537,845,323,279,500,000,000,000,000,000,000,000 | 8 | nfs: always make sure page is up-to-date before extending a write to cover the entire page
We should always make sure the cached page is up-to-date when we're
determining whether we can extend a write to cover the full page -- even
if we've received a write delegation from the server.
Commit c7559663 added logic to s... |
static void restore_reserve_on_error(struct hstate *h,
struct vm_area_struct *vma, unsigned long address,
struct page *page)
{
if (unlikely(PagePrivate(page))) {
long rc = vma_needs_reservation(h, vma, address);
if (unlikely(rc < 0)) {
/*
* Rare out of memory condition in reserve map
* manipulati... | 0 | [
"CWE-703"
] | linux | 5af10dfd0afc559bb4b0f7e3e8227a1578333995 | 138,475,295,922,384,060,000,000,000,000,000,000,000 | 32 | userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case
huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page
before returning in case of errors.
The error returned was -EEXIST by running UFFDIO_COPY on a non-hole
offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that
t... |
png_set_pCAL(png_const_structrp png_ptr, png_inforp info_ptr,
png_const_charp purpose, png_int_32 X0, png_int_32 X1, int type,
int nparams, png_const_charp units, png_charpp params)
{
png_size_t length;
int i;
png_debug1(1, "in %s storage function", "pCAL");
if (png_ptr == NULL || info_ptr == NULL... | 0 | [
"CWE-120"
] | libpng | a901eb3ce6087e0afeef988247f1a1aa208cb54d | 96,303,133,428,084,760,000,000,000,000,000,000,000 | 101 | [libpng16] Prevent reading over-length PLTE chunk (Cosmin Truta). |
static CCPrepare gen_prepare_eflags_c(DisasContext *s, TCGv reg)
{
TCGv t0, t1;
int size, shift;
switch (s->cc_op) {
case CC_OP_SUBB ... CC_OP_SUBQ:
/* (DATA_TYPE)CC_SRCT < (DATA_TYPE)CC_SRC */
size = s->cc_op - CC_OP_SUBB;
t1 = gen_ext_tl(cpu_tmp0, cpu_cc_src, size, false);
... | 0 | [
"CWE-94"
] | qemu | 30663fd26c0307e414622c7a8607fbc04f92ec14 | 249,425,338,995,973,270,000,000,000,000,000,000,000 | 72 | tcg/i386: Check the size of instruction being translated
This fixes the bug: 'user-to-root privesc inside VM via bad translation
caching' reported by Jann Horn here:
https://bugs.chromium.org/p/project-zero/issues/detail?id=1122
Reviewed-by: Richard Henderson <rth@twiddle.net>
CC: Peter Maydell <peter.maydell@linaro.... |
static int com_property_exists(zval *object, zval *member, int check_empty, void **cache_slot)
{
DISPID dispid;
php_com_dotnet_object *obj;
obj = CDNO_FETCH(object);
if (V_VT(&obj->v) == VT_DISPATCH) {
convert_to_string_ex(member);
if (SUCCEEDED(php_com_get_id_of_name(obj, Z_STRVAL_P(member), Z_STRLEN_P(membe... | 0 | [
"CWE-502"
] | php-src | 115ee49b0be12e3df7d2c7027609fbe1a1297e42 | 197,637,390,577,202,400,000,000,000,000,000,000,000 | 19 | Fix #77177: Serializing or unserializing COM objects crashes
Firstly, we avoid returning NULL from the get_property handler, but
instead return an empty HashTable, which already prevents the crashes.
Secondly, since (de-)serialization obviously makes no sense for COM,
DOTNET and VARIANT objects (at least with the curr... |
Frame_unbounded_following_set_count(
THD *thd,
SQL_I_List<ORDER> *partition_list, SQL_I_List<ORDER> *order_list) :
Frame_unbounded_following(thd, partition_list, order_list) {} | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 244,674,265,054,073,400,000,000,000,000,000,000,000 | 4 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
static int ehci_state_writeback(EHCIQueue *q)
{
EHCIPacket *p = QTAILQ_FIRST(&q->packets);
uint32_t *qtd, addr;
int again = 0;
/* Write back the QTD from the QH area */
assert(p != NULL);
assert(p->qtdaddr == q->qtdaddr);
ehci_trace_qtd(q, NLPTR_GET(p->qtdaddr), (EHCIqtd *) &q->qh.next_qt... | 0 | [] | qemu | 791f97758e223de3290592d169f8e6339c281714 | 66,744,400,675,141,850,000,000,000,000,000,000,000 | 33 | usb: ehci: fix memory leak in ehci_init_transfer
In ehci_init_transfer function, if the 'cpage' is bigger than 4,
it doesn't free the 'p->sgl' once allocated previously thus leading
a memory leak issue. This patch avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Message-id: 5821c0f4.091c6b0a.e0c92.e811@mx.goog... |
static struct net_device *init_wifidev(struct airo_info *ai,
struct net_device *ethdev)
{
int err;
struct net_device *dev = alloc_netdev(0, "wifi%d", wifi_setup);
if (!dev)
return NULL;
dev->ml_priv = ethdev->ml_priv;
dev->irq = ethdev->irq;
dev->base_addr = ethdev->base_addr;
dev->wireless_data = ethdev-... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 307,042,625,026,267,460,000,000,000,000,000,000,000 | 20 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
static void snd_rawmidi_input_event_work(struct work_struct *work)
{
struct snd_rawmidi_runtime *runtime =
container_of(work, struct snd_rawmidi_runtime, event_work);
if (runtime->event)
runtime->event(runtime->substream);
} | 0 | [
"CWE-415"
] | linux | 39675f7a7c7e7702f7d5341f1e0d01db746543a0 | 20,984,923,564,870,523,000,000,000,000,000,000,000 | 7 | ALSA: rawmidi: Change resized buffers atomically
The SNDRV_RAWMIDI_IOCTL_PARAMS ioctl may resize the buffers and the
current code is racy. For example, the sequencer client may write to
buffer while it being resized.
As a simple workaround, let's switch to the resized buffer inside the
stream runtime lock.
Reported... |
Value ExpressionRegexMatch::evaluate(const Document& root, Variables* variables) const {
auto executionState = buildInitialState(root, variables);
// Return output of execute only if regex is not nullish.
return executionState.nullish() ? Value(false) : Value(execute(&executionState) > 0);
} | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 45,684,194,916,807,690,000,000,000,000,000,000,000 | 5 | SERVER-49404 Enforce additional checks in $arrayToObject |
tls_version_report(FILE *f)
{
fprintf(f, "Library version: OpenSSL: Compile: %s\n"
" Runtime: %s\n"
" : %s\n",
OPENSSL_VERSION_TEXT,
SSLeay_version(SSLEAY_VERSION),
SSLeay_version(SSLEAY_BUILT_ON));
/* third ... | 0 | [
"CWE-264"
] | exim | 43ba2742c700d625dcdcdaf7bbadc2f72776854a | 222,490,751,886,599,100,000,000,000,000,000,000,000 | 11 | Fix CVE-2016-1531
Add keep_environment, add_environment.
Change the working directory to "/" during the early startup
phase.
(cherry picked from commit bc3c7bb7d4aba3e563434e5627fe1f2176aa18c0)
(cherry picked from commit 2b92b67bfc33efe05e6ff2ea3852731ac2273832)
(cherry picked from commit 14b82c8b736c8ed24eda... |
static inline int step_into(struct nameidata *nd, struct path *path,
int flags, struct inode *inode, unsigned seq)
{
if (!(flags & WALK_MORE) && nd->depth)
put_link(nd);
if (likely(!d_is_symlink(path->dentry)) ||
!(flags & WALK_FOLLOW || nd->flags & LOOKUP_FOLLOW)) {
/* not a symlink or should not foll... | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 91,942,854,555,096,470,000,000,000,000,000,000,000 | 20 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
uint_t aubio_onset_set_minioi_s(aubio_onset_t * o, smpl_t minioi) {
return aubio_onset_set_minioi (o, (uint_t)ROUND(minioi * o->samplerate));
} | 0 | [] | aubio | e4e0861cffbc8d3a53dcd18f9ae85797690d67c7 | 336,009,638,757,750,450,000,000,000,000,000,000,000 | 3 | [onset] safer deletion method |
static void rom_reset(void *unused)
{
Rom *rom;
QTAILQ_FOREACH(rom, &roms, next) {
if (rom->fw_file) {
continue;
}
if (rom->data == NULL) {
continue;
}
if (rom->mr) {
void *host = memory_region_get_ram_ptr(rom->mr);
memcpy(... | 0 | [
"CWE-787"
] | qemu | 4f1c6cb2f9afafda05eab150fd2bd284edce6676 | 247,933,050,671,115,220,000,000,000,000,000,000,000 | 32 | hw/core/loader: Fix possible crash in rom_copy()
Both, "rom->addr" and "addr" are derived from the binary image
that can be loaded with the "-kernel" paramer. The code in
rom_copy() then calculates:
d = dest + (rom->addr - addr);
and uses "d" as destination in a memcpy() some lines later. Now with
bad kernel ima... |
rb_dlhandle_to_i(VALUE self)
{
struct dl_handle *dlhandle;
Data_Get_Struct(self, struct dl_handle, dlhandle);
return PTR2NUM(dlhandle);
} | 0 | [
"CWE-20",
"CWE-399"
] | ruby | 4600cf725a86ce31266153647ae5aa1197b1215b | 239,798,790,242,507,870,000,000,000,000,000,000,000 | 7 | * ext/dl/dl.c (rb_dlhandle_initialize): prohibits DL::dlopen
with a tainted name of library.
Patch by sheepman <sheepman AT sheepman.sakura.ne.jp>.
* ext/dl/dl.c (rb_dlhandle_sym): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static JSValue js_sys_file_data(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
{
const char *filename;
u8 *data;
u32 data_size;
Bool as_utf8 = GF_FALSE;
GF_Err e;
JSValue res;
if (!argc || !JS_IsString(argv[0])) return GF_JS_EXCEPTION(ctx);
filename = JS_ToCString(ctx, argv[0]);
if (!file... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 50,404,658,320,761,560,000,000,000,000,000,000,000 | 31 | fixed #2138 |
static inline void AffineQuantize(const tflite::QuantizationParams& op_params,
const RuntimeShape& input_shape,
const float* input_data,
const RuntimeShape& output_shape,
output_type* ... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 233,909,492,099,016,730,000,000,000,000,000,000,000 | 13 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
static void test_bug41078(void)
{
uint rc;
MYSQL_STMT *stmt= 0;
MYSQL_BIND param, result;
ulong cursor_type= CURSOR_TYPE_READ_ONLY;
ulong len;
char str[64];
const char param_str[]= "abcdefghijklmn";
my_bool is_null, error;
DBUG_ENTER("test_bug41078");
rc= m... | 0 | [
"CWE-416"
] | server | eef21014898d61e77890359d6546d4985d829ef6 | 238,116,208,711,997,740,000,000,000,000,000,000,000 | 58 | MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list
mysql_prune_stmt_list() was walking the list following
element->next pointers, but inside the loop it was invoking
list_add(element) that modified element->next. So, mysql_prune_stmt_list()
failed to visit and reset all elements, and some of them were left... |
static int ssl_parse_certificate_verify( ssl_context *ssl )
{
int ret;
size_t n = 0, n1, n2;
unsigned char hash[48];
int hash_id;
unsigned int hashlen;
SSL_DEBUG_MSG( 2, ( "=> parse certificate verify" ) );
if( ssl->session_negotiate->peer_cert == NULL )
{
SSL_DEBUG_MSG( 2, ( "... | 0 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 46,337,874,320,301,070,000,000,000,000,000,000,000 | 93 | RSA blinding on CRT operations to counter timing attacks |
void mnt_unref_fs(struct libmnt_fs *fs)
{
if (fs) {
fs->refcount--;
/*DBG(FS, ul_debugobj(fs, "unref=%d", fs->refcount));*/
if (fs->refcount <= 0)
mnt_free_fs(fs);
}
} | 0 | [
"CWE-552",
"CWE-703"
] | util-linux | 166e87368ae88bf31112a30e078cceae637f4cdb | 109,816,817,561,304,000,000,000,000,000,000,000,000 | 9 | libmount: remove support for deleted mount table entries
The "(deleted)" suffix has been originally used by kernel for deleted
mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3
(Dec 2014) kernel does not use this suffix for mount stuff in /proc at
all. Let's remove this support from libmount to... |
static int jp2_pclr_putdata(jp2_box_t *box, jas_stream_t *out)
{
#if 0
jp2_pclr_t *pclr = &box->data.pclr;
#endif
/* Eliminate warning about unused variable. */
box = 0;
out = 0;
return -1;
} | 1 | [
"CWE-476"
] | jasper | e96fc4fdd525fa0ede28074a7e2b1caf94b58b0d | 212,845,003,475,655,780,000,000,000,000,000,000,000 | 10 | Fixed bugs due to uninitialized data in the JP2 decoder.
Also, added some comments marking I/O stream interfaces that probably
need to be changed (in the long term) to fix integer overflow problems. |
longlong Field_decimal::val_int(void)
{
ASSERT_COLUMN_MARKED_FOR_READ;
int not_used;
if (unsigned_flag)
return my_strntoull(&my_charset_bin, (char*) ptr, field_length, 10, NULL,
¬_used);
return my_strntoll(&my_charset_bin, (char*) ptr, field_length, 10, NULL,
¬_used);
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 38,510,775,852,641,686,000,000,000,000,000,000,000 | 10 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
int read_escaped_char(
yyscan_t yyscanner,
uint8_t* escaped_char)
{
char text[4] = {0, 0, 0, 0};
text[0] = '\\';
text[1] = RE_YY_INPUT(yyscanner);
if (text[1] == EOF)
return 0;
if (text[1] == 'x')
{
text[2] = RE_YY_INPUT(yyscanner);
if (text[2] == EOF)
return 0;
text[3] =... | 1 | [
"CWE-476",
"CWE-703",
"CWE-125"
] | yara | 3119b232c9c453c98d8fa8b6ae4e37ba18117cd4 | 156,902,532,165,573,090,000,000,000,000,000,000,000 | 29 | re_lexer: Make reading escape sequences more robust (#586)
* Add test for issue #503
* re_lexer: Make reading escape sequences more robust
This commit fixes parsing incomplete escape sequences at the end of a
regular expression and parsing things like \xxy (invalid hex digits)
which before were silently turned... |
DEFINE_TEST(test_read_format_rar5_blake2)
{
const la_ssize_t proper_size = 814;
uint8_t buf[814];
PROLOGUE("test_read_format_rar5_blake2.rar");
assertA(0 == archive_read_next_header(a, &ae));
assertEqualInt(proper_size, archive_entry_size(ae));
/* Should blake2 calculation fail, we'll get a failure return
* v... | 0 | [
"CWE-20",
"CWE-125"
] | libarchive | 94821008d6eea81e315c5881cdf739202961040a | 25,751,479,504,011,867,000,000,000,000,000,000,000 | 20 | RAR5 reader: reject files that declare invalid header flags
One of the fields in RAR5's base block structure is the size of the
header. Some invalid files declare a 0 header size setting, which can
confuse the unpacker. Minimum header size for RAR5 base blocks is 7
bytes (4 bytes for CRC, and 3 bytes for the rest), so... |
void print_session_id(SSL_SESSION *sess) {
const unsigned char *session_id;
unsigned int session_id_length;
char session_id_txt[2*SSL_MAX_SSL_SESSION_ID_LENGTH+1];
session_id=SSL_SESSION_get_id(sess, &session_id_length);
bin2hexstring(session_id, session_id_length,
session_id_txt, sizeof se... | 0 | [
"CWE-295"
] | stunnel | ebad9ddc4efb2635f37174c9d800d06206f1edf9 | 83,449,208,311,398,310,000,000,000,000,000,000,000 | 10 | stunnel-5.57 |
int tcp_emu(struct socket *so, struct mbuf *m)
{
Slirp *slirp = so->slirp;
unsigned n1, n2, n3, n4, n5, n6;
char buff[257];
uint32_t laddr;
unsigned lport;
char *bptr;
DEBUG_CALL("tcp_emu");
DEBUG_ARG("so = %p", so);
DEBUG_ARG("m = %p", m);
switch (so->so_emu) {
int x, ... | 1 | [
"CWE-787"
] | libslirp | 82ebe9c370a0e2970fb5695aa19aa5214a6a1c80 | 3,407,059,051,136,669,300,000,000,000,000,000,000 | 341 | slirp: use correct size while emulating commands
While emulating services in tcp_emu(), it uses 'mbuf' size
'm->m_size' to write commands via snprintf(3). Use M_FREEROOM(m)
size to avoid possible OOB access.
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyo... |
void sc_file_clear_acl_entries(sc_file_t *file, unsigned int operation)
{
sc_acl_entry_t *e;
if (file == NULL || operation >= SC_MAX_AC_OPS) {
return;
}
e = file->acl[operation];
if (e == (sc_acl_entry_t *) 1 ||
e == (sc_acl_entry_t *) 2 ||
e == (sc_acl_entry_t *) 3) {
file->acl[operation] = NULL;
... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 183,390,128,324,306,940,000,000,000,000,000,000,000 | 23 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
void __ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, int tid,
enum nl80211_band band)
{
int ac = ieee80211_ac_from_tid(tid);
skb_reset_mac_header(skb);
skb_set_queue_mapping(skb, ac);
skb->priority = tid;
skb->dev = sdata->dev;
/*
* The other path calling ieee8... | 0 | [
"CWE-476"
] | linux | bddc0c411a45d3718ac535a070f349be8eca8d48 | 93,785,908,921,668,490,000,000,000,000,000,000,000 | 22 | mac80211: Fix NULL ptr deref for injected rate info
The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx
queue") moved the code to validate the radiotap header from
ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is
possible to share more code with the new Tx queue selecti... |
cockpit_web_response_gunzip (GBytes *bytes,
GError **error)
{
GConverter *converter;
GConverterResult result;
const guint8 *in;
gsize inl, outl, read, written;
GByteArray *out;
converter = G_CONVERTER (g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP));
in = g_bytes_ge... | 0 | [
"CWE-1021"
] | cockpit | 8d9bc10d8128aae03dfde62fd00075fe492ead10 | 93,919,542,953,777,330,000,000,000,000,000,000,000 | 42 | common: Restrict frame embedding to same origin
Declare `X-Frame-Options: sameorigin` [1] so that cockpit frames can
only be embedded into pages coming from the same origin. This is similar
to setting CORP in commit 2b38b8de92f9a (which applies to `<script>`,
`<img>`, etc.).
The main use case for embedding is to run ... |
static int queue_gso_packets(struct datapath *dp, struct sk_buff *skb,
const struct dp_upcall_info *upcall_info)
{
unsigned short gso_type = skb_shinfo(skb)->gso_type;
struct dp_upcall_info later_info;
struct sw_flow_key later_key;
struct sk_buff *segs, *nskb;
int err;
segs = __skb_gso_segment(skb, NETIF... | 0 | [
"CWE-416"
] | net | 36d5fe6a000790f56039afe26834265db0a3ad4c | 88,422,052,273,771,200,000,000,000,000,000,000,000 | 45 | core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't
orphan them. Also, it doesn't handle errors, so this patch takes care of that
as well, and modify the callers accordingly. skb_tx_error() is also added to
the caller... |
static void usb_raremono_disconnect(struct usb_interface *intf)
{
struct raremono_device *radio = to_raremono_dev(usb_get_intfdata(intf));
dev_info(&intf->dev, "Thanko's Raremono disconnected\n");
mutex_lock(&radio->lock);
usb_set_intfdata(intf, NULL);
video_unregister_device(&radio->vdev);
v4l2_device_disconne... | 0 | [
"CWE-416"
] | linux | c666355e60ddb4748ead3bdd983e3f7f2224aaf0 | 12,809,593,920,109,430,000,000,000,000,000,000,000 | 13 | media: radio-raremono: change devm_k*alloc to k*alloc
Change devm_k*alloc to k*alloc to manually allocate memory
The manual allocation and freeing of memory is necessary because when
the USB radio is disconnected, the memory associated with devm_k*alloc
is freed. Meaning if we still have unresolved references to the ... |
deallocate(void *p)
{
ffi_cif *ptr = p;
if (ptr->arg_types) xfree(ptr->arg_types);
xfree(ptr);
} | 0 | [
"CWE-264"
] | ruby | c7d7ff45f1e0d6fad28e53c02108d4b067e843c3 | 101,733,757,961,651,140,000,000,000,000,000,000,000 | 6 | * ext/dl/lib/dl/func.rb (DL::Function#call): check tainted when
$SAFE > 0.
* ext/fiddle/function.c (function_call): check tainted when $SAFE > 0.
* test/fiddle/test_func.rb (module Fiddle): add test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static int apic_set_eoi(struct kvm_lapic *apic)
{
int vector = apic_find_highest_isr(apic);
trace_kvm_eoi(apic, vector);
/*
* Not every write EOI will has corresponding ISR,
* one example is when Kernel check timer on setup_IO_APIC
*/
if (vector == -1)
return vector;
apic_clear_isr(vector, apic);
apic_... | 0 | [
"CWE-703",
"CWE-459"
] | linux | f7d8a19f9a056a05c5c509fa65af472a322abfee | 210,614,281,191,874,100,000,000,000,000,000,000,000 | 24 | Revert "KVM: x86: Open code necessary bits of kvm_lapic_set_base() at vCPU RESET"
Revert a change to open code bits of kvm_lapic_set_base() when emulating
APIC RESET to fix an apic_hw_disabled underflow bug due to arch.apic_base
and apic_hw_disabled being unsyncrhonized when the APIC is created. If
kvm_arch_vcpu_crea... |
static size_t WritePascalString(Image *image,const char *value,size_t padding)
{
size_t
count,
length;
register ssize_t
i;
/*
Max length is 255.
*/
count=0;
length=(strlen(value) > 255UL ) ? 255UL : strlen(value);
if (length == 0)
count+=WriteBlobByte(image,0);
else
{
co... | 0 | [
"CWE-787"
] | ImageMagick | d4ec73f866a7c42a2e7f301fcd696e5cb7a7d3ab | 91,253,913,798,678,740,000,000,000,000,000,000,000 | 28 | https://github.com/ImageMagick/ImageMagick/issues/350 |
umax(unsigned a, unsigned b)
{
if (a <= b) {
return b;
}
return a;
} | 0 | [
"CWE-476"
] | upx | ef336dbcc6dc8344482f8cf6c909ae96c3286317 | 124,353,806,237,988,940,000,000,000,000,000,000,000 | 7 | Protect against bad crafted input.
https://github.com/upx/upx/issues/128
modified: p_lx_elf.cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.