func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
explicit DenseBincountOp(OpKernelConstruction* ctx) : OpKernel(ctx) {
OP_REQUIRES_OK(ctx, ctx->GetAttr("binary_output", &binary_output_));
} | 0 | [
"CWE-703",
"CWE-787"
] | tensorflow | eebb96c2830d48597d055d247c0e9aebaea94cd5 | 195,419,556,119,225,240,000,000,000,000,000,000,000 | 3 | Fix an invalid address vulnerability in `tf.raw_ops.RaggedBincount`.
PiperOrigin-RevId: 368293153
Change-Id: I4b4e493d3fd05e7dc55a55de3a041a80a4f275c3 |
int kvm_emulate_rdpmc(struct kvm_vcpu *vcpu)
{
u32 ecx = kvm_rcx_read(vcpu);
u64 data;
if (kvm_pmu_rdpmc(vcpu, ecx, &data)) {
kvm_inject_gp(vcpu, 0);
return 1;
}
kvm_rax_write(vcpu, (u32)data);
kvm_rdx_write(vcpu, data >> 32);
return kvm_skip_emulated_instruction(vcpu);
} | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 65,099,445,777,315,660,000,000,000,000,000,000,000 | 14 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
static inline int parse_value_and_bound(const string &input, long *output, const long lower_bound, const long upper_bound, const long default_val)
{
if (!input.empty()) {
char *endptr;
*output = strtol(input.c_str(), &endptr, 10);
if (endptr) {
if (endptr == input.c_str()) return -EINVAL;
whil... | 1 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 251,944,757,709,071,580,000,000,000,000,000,000,000 | 25 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
asn1_read_value_type (asn1_node root, const char *name, void *ivalue,
int *len, unsigned int *etype)
{
asn1_node node, p, p2;
int len2, len3, result;
int value_size = *len;
unsigned char *value = ivalue;
unsigned type;
node = asn1_find_node (root, name);
if (node == NULL)
return ASN1_ELEMENT_... | 1 | [
"CWE-476"
] | libtasn1 | 3d6a02f19ff15a38dae9686033e37499b3968256 | 308,983,020,211,298,400,000,000,000,000,000,000,000 | 174 | safer usage of memcpy(). |
int parse_sequence_header(davs2_mgr_t *mgr, davs2_seq_t *seq, davs2_bs_t *bs)
{
rps_t *p_rps = NULL;
int i, j;
int num_of_rps;
bs->i_bit_pos += 32; /* skip start code */
memset(seq, 0, sizeof(davs2_seq_t)); // reset all value
seq->head.profile_id = u_v(bs, 8, "profile_id");
seq->h... | 0 | [
"CWE-787"
] | davs2 | b41cf117452e2d73d827f02d3e30aa20f1c721ac | 314,120,873,273,976,670,000,000,000,000,000,000,000 | 161 | Add checking for `frame_rate_code`.
Signed-off-by: luofl <falei.luo@gmail.com> |
static void ahci_restart_dma(IDEDMA *dma)
{
/* Nothing to do, ahci_start_dma already resets s->io_buffer_offset. */
} | 0 | [
"CWE-772",
"CWE-401"
] | qemu | d68f0f778e7f4fbd674627274267f269e40f0b04 | 325,574,066,246,187,800,000,000,000,000,000,000,000 | 4 | ide: ahci: call cleanup function in ahci unit
This can avoid memory leak when hotunplug the ahci device.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Message-id: 1488449293-80280-4-git-send-email-liqiang6-s@360.cn
Signed-off-by: John Snow <jsnow@redhat.com> |
par_read_pipe(int poffset, BOOL eop)
{
host_item *h;
pardata *p = parlist + poffset;
address_item *addrlist = p->addrlist;
address_item *addr = p->addr;
pid_t pid = p->pid;
int fd = p->fd;
uschar *msg = p->msg;
BOOL done = p->done;
/* Loop through all items, reading from the pipe when necessary. The pipe
used to be n... | 0 | [
"CWE-78"
] | exim | 7ea1237c783e380d7bdb86c90b13d8203c7ecf26 | 154,549,479,104,980,490,000,000,000,000,000,000,000 | 431 | Events: raise msg:fail:internal & msg:complete for -Mrm. Bug 2310 |
static void vmsvga_reset(DeviceState *dev)
{
struct pci_vmsvga_state_s *pci = VMWARE_SVGA(dev);
struct vmsvga_state_s *s = &pci->chip;
s->index = 0;
s->enable = 0;
s->config = 0;
s->svgaid = SVGA_ID;
s->cursor.on = 0;
s->redraw_fifo_first = 0;
s->redraw_fifo_last = 0;
s->syncing... | 0 | [] | qemu | fa892e9abb728e76afcf27323ab29c57fb0fe7aa | 156,384,732,070,331,630,000,000,000,000,000,000,000 | 16 | ui/cursor: fix integer overflow in cursor_alloc (CVE-2021-4206)
Prevent potential integer overflow by limiting 'width' and 'height' to
512x512. Also change 'datasize' type to size_t. Refer to security
advisory https://starlabs.sg/advisories/22-4206/ for more information.
Fixes: CVE-2021-4206
Signed-off-by: Mauro Matt... |
skiptodigit(char_u *q)
{
char_u *p = q;
while (*p != NUL && !VIM_ISDIGIT(*p)) // skip to next digit
++p;
return p;
} | 0 | [
"CWE-125",
"CWE-787"
] | vim | 94f3192b03ed27474db80b4d3a409e107140738b | 252,152,406,629,787,360,000,000,000,000,000,000,000 | 8 | patch 8.2.3950: going beyond the end of the line with /\%V
Problem: Going beyond the end of the line with /\%V.
Solution: Check for valid column in getvcol(). |
compute_U_UE_value_V5(std::string const& user_password,
std::string const& encryption_key,
QPDF::EncryptionData const& data,
std::string& U, std::string& UE)
{
// Algorithm 3.8 from the PDF 1.7 extension level 3
char k[16];
QUtil::initializeW... | 0 | [
"CWE-125"
] | qpdf | dea704f0ab7f625e1e7b3f9a1110b45b63157317 | 120,736,003,531,181,950,000,000,000,000,000,000,000 | 16 | Pad keys to avoid memory errors (fixes #147) |
ftp_expected_bytes (const char *s)
{
wgint res;
while (1)
{
while (*s && *s != '(')
++s;
if (!*s)
return 0;
++s; /* skip the '(' */
res = str_to_wgint (s, (char **) &s, 10);
if (!*s)
return 0;
while (*s && c_isspace (*s))
... | 0 | [] | wget | 075d7556964f5a871a73c22ac4b69f5361295099 | 38,852,916,732,567,830,000,000,000,000,000,000,000 | 27 | Fix IP address exposure in FTP code
* src/ftp.c (getftp): Do not use PORT when PASV fails.
* tests/FTPServer.px: Add pasv_not_supported server flag.
* tests/Makefile.am: Add Test-ftp-pasv-not-supported.px
* tests/Test-ftp-pasv-not-supported.px: New test
Fix IP address exposure when automatically falling back from
pas... |
gst_asf_demux_activate_stream (GstASFDemux * demux, AsfStream * stream)
{
if (!stream->active) {
GstEvent *event;
gchar *stream_id;
GST_INFO_OBJECT (demux, "Activating stream %2u, pad %s, caps %"
GST_PTR_FORMAT, stream->id, GST_PAD_NAME (stream->pad), stream->caps);
gst_pad_set_active (stream... | 0 | [
"CWE-125",
"CWE-787"
] | gst-plugins-ugly | d21017b52a585f145e8d62781bcc1c5fefc7ee37 | 217,687,594,967,931,600,000,000,000,000,000,000,000 | 40 | asfdemux: Check that we have enough data available before parsing bool/uint extended content descriptors
https://bugzilla.gnome.org/show_bug.cgi?id=777955 |
HandleFunctionRequest(StringInfo msgBuf)
{
Oid fid;
AclResult aclresult;
FunctionCallInfoData fcinfo;
int16 rformat;
Datum retval;
struct fp_info my_fp;
struct fp_info *fip;
bool callit;
bool was_logged = false;
char msec_str[32];
/*
* Read message contents if not already done.
*/
if (PG_PROTOCO... | 1 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 136,326,244,096,421,720,000,000,000,000,000,000,000 | 169 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
message_add_destination_header (SoupMessage *msg,
SoupURI *uri)
{
char *string;
string = soup_uri_to_string (uri, FALSE);
soup_message_headers_append (msg->request_headers,
"Destination",
string);
g_free (string);... | 0 | [] | gvfs | f81ff2108ab3b6e370f20dcadd8708d23f499184 | 142,158,288,844,648,410,000,000,000,000,000,000,000 | 11 | dav: don't unescape the uri twice
path_equal tries to unescape path before comparing. Unfortunately
this function is used also for already unescaped paths. Therefore
unescaping can fail. This commit reverts changes which was done in
commit 50af53d and unescape just uris, which aren't unescaped yet.
https://bugzilla.g... |
gostdsa_vko (const struct ecc_scalar *priv,
const struct ecc_point *pub,
size_t ukm_length, const uint8_t *ukm,
uint8_t *out)
{
const struct ecc_curve *ecc = priv->ecc;
unsigned bsize = (ecc_bit_size (ecc) + 7) / 8;
mp_size_t size = ecc->p.size;
mp_size_t itch = 4*size + ecc->mul_itch;
mp_limb_t *scratc... | 0 | [
"CWE-787"
] | nettle | 63f222c60b03470c0005aa9bc4296fbf585f68b9 | 147,230,464,051,627,620,000,000,000,000,000,000,000 | 40 | Fix canonical reduction in gostdsa_vko.
* gostdsa-vko.c (gostdsa_vko): Use ecc_mod_mul_canonical to
compute the scalar used for ecc multiplication.
(cherry picked from commit b30e0ca6d2b41579a5b6a010fc54065d790e8d55) |
static void iwl_fw_error_dump(struct iwl_fw_runtime *fwrt)
{
struct iwl_fw_dump_ptrs fw_error_dump = {};
struct iwl_fw_error_dump_file *dump_file;
struct scatterlist *sg_dump_data;
u32 file_len;
u32 dump_mask = fwrt->fw->dbg.dump_mask;
dump_file = iwl_fw_error_dump_file(fwrt, &fw_error_dump);
if (!dump_file)
... | 0 | [
"CWE-400",
"CWE-401"
] | linux | b4b814fec1a5a849383f7b3886b654a13abbda7d | 23,649,973,990,696,727,000,000,000,000,000,000,000 | 45 | iwlwifi: dbg_ini: fix memory leak in alloc_sgtable
In alloc_sgtable if alloc_page fails, the alocated table should be
released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com> |
pk_transaction_details_cb (PkBackendJob *job,
PkDetails *item,
PkTransaction *transaction)
{
GVariantBuilder builder;
PkGroupEnum group;
const gchar *tmp;
guint64 size;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
/* add to results */
pk_re... | 0 | [
"CWE-287"
] | PackageKit | 7e8a7905ea9abbd1f384f05f36a4458682cd4697 | 80,741,832,802,290,350,000,000,000,000,000,000,000 | 53 | Do not set JUST_REINSTALL on any kind of auth failure
If we try to continue the auth queue when it has been cancelled (or failed)
then we fall upon the obscure JUST_REINSTALL transaction flag which only the
DNF backend actually verifies.
Many thanks to Matthias Gerstner <mgerstner@suse.de> for spotting the problem. |
PGTYPESinterval_from_asc(char *str, char **endptr)
{
interval *result = NULL;
fsec_t fsec;
struct tm tt,
*tm = &tt;
int dtype;
int nf;
char *field[MAXDATEFIELDS];
int ftype[MAXDATEFIELDS];
char lowstr[MAXDATELEN + MAXDATEFIELDS];
char *realptr;
char **ptr = (endptr != NULL) ? endptr : ... | 1 | [
"CWE-416",
"CWE-119"
] | postgres | 4318daecc959886d001a6e79c6ea853e8b1dfb4b | 149,551,951,396,418,070,000,000,000,000,000,000,000 | 57 | Fix handling of wide datetime input/output.
Many server functions use the MAXDATELEN constant to size a buffer for
parsing or displaying a datetime value. It was much too small for the
longest possible interval output and slightly too small for certain
valid timestamp input, particularly input with a long timezone na... |
GF_Err gf_isom_get_pixel_aspect_ratio(GF_ISOFile *movie, u32 trackNumber, u32 StreamDescriptionIndex, u32 *hSpacing, u32 *vSpacing)
{
GF_TrackBox *trak;
GF_VisualSampleEntryBox *entry;
GF_SampleDescriptionBox *stsd;
trak = gf_isom_get_track_from_file(movie, trackNumber);
if (!trak || !hSpacing || !vSpacing) retur... | 0 | [
"CWE-787"
] | gpac | f0a41d178a2dc5ac185506d9fa0b0a58356b16f7 | 295,941,661,514,095,200,000,000,000,000,000,000,000 | 31 | fixed #2120 |
int load_aout(const char *filename, hwaddr addr, int max_sz,
int bswap_needed, hwaddr target_page_size)
{
int fd;
ssize_t size, ret;
struct exec e;
uint32_t magic;
fd = open(filename, O_RDONLY | O_BINARY);
if (fd < 0)
return -1;
size = read(fd, &e, sizeof(e));
if ... | 0 | [
"CWE-787"
] | qemu | e423455c4f23a1a828901c78fe6d03b7dde79319 | 314,929,620,537,720,170,000,000,000,000,000,000,000 | 54 | 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... |
child_func (void * const arg)
{
xclose (sockfd[0]);
const int sock = sockfd[1];
char ch;
TEST_VERIFY_EXIT (read (sock, &ch, 1) == 1);
TEST_VERIFY_EXIT (ch == '1');
if (mount ("/", MOUNT_NAME, NULL, MS_BIND | MS_REC, NULL))
FAIL_EXIT1 ("mount failed: %m\n");
const int fd = xopen ("mpoint",
O_RDONL... | 0 | [
"CWE-284"
] | glibc | 23e0e8f5f1fb5ed150253d986ecccdc90c2dcd5e | 241,806,151,480,382,350,000,000,000,000,000,000,000 | 23 | getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999)
No valid path returned by getcwd would fit into 1 byte, so reject the
size early and return NULL with errno set to ERANGE. This change is
prompted by CVE-2021-3999, which describes a single byte buffer
underflow and overflow when all of the following condition... |
static int compressLogFile(const char *name, const struct logInfo *log, const struct stat *sb)
{
char *compressedName;
int inFile;
int outFile;
int status;
int compressPipe[2];
char *prevCtx;
pid_t pid;
message(MESS_DEBUG, "compressing log with: %s\n", log->compress_prog);
if (debug... | 0 | [
"CWE-732"
] | logrotate | 1f76a381e2caa0603ae3dbc51ed0f1aa0d6658b9 | 196,692,111,964,677,560,000,000,000,000,000,000,000 | 182 | skip locking if state file is world-readable
Fixes: CVE-2022-1348 - potential DoS from unprivileged users via the state file
Bug: https://bugzilla.redhat.com/CVE-2022-1348 |
TEST_F(RouterTest, AddCookieNoDuplicate) {
ON_CALL(callbacks_.route_->route_entry_, hashPolicy())
.WillByDefault(Return(&callbacks_.route_->route_entry_.hash_policy_));
NiceMock<Http::MockRequestEncoder> encoder;
Http::ResponseDecoder* response_decoder = nullptr;
EXPECT_CALL(cm_.thread_local_cluster_.con... | 0 | [
"CWE-703"
] | envoy | 18871dbfb168d3512a10c78dd267ff7c03f564c6 | 149,100,170,379,054,540,000,000,000,000,000,000,000 | 51 | [1.18] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
u8 dcb_ieee_getapp_mask(struct net_device *dev, struct dcb_app *app)
{
struct dcb_app_type *itr;
u8 prio = 0;
spin_lock(&dcb_lock);
if ((itr = dcb_app_lookup(app, dev->ifindex, 0)))
prio |= 1 << itr->app.priority;
spin_unlock(&dcb_lock);
return prio;
} | 0 | [
"CWE-399"
] | linux-2.6 | 29cd8ae0e1a39e239a3a7b67da1986add1199fc0 | 14,956,232,220,344,058,000,000,000,000,000,000,000 | 12 | dcbnl: fix various netlink info leaks
The dcb netlink interface leaks stack memory in various places:
* perm_addr[] buffer is only filled at max with 12 of the 32 bytes but
copied completely,
* no in-kernel driver fills all fields of an IEEE 802.1Qaz subcommand,
so we're leaking up to 58 bytes for ieee_ets structs... |
static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
char
format;
double
quantum_scale;
Image
*image;
MagickBooleanType
status;
QuantumAny
max_value;
QuantumInfo
*quantum_info;
QuantumType
quantum_type;
size_t
depth,
extent,
pa... | 1 | [
"CWE-190"
] | ImageMagick | c1cf4802653970c050d175a6496fa1f11b7c089e | 320,097,360,478,707,780,000,000,000,000,000,000,000 | 1,159 | Earlier check for EOF |
static int oidc_handle_session_management_iframe_rp(request_rec *r, oidc_cfg *c,
oidc_session_t *session, const char *client_id,
const char *check_session_iframe) {
oidc_debug(r, "enter");
const char *java_script =
" <script type=\"text/javascript\">\n"
" var targetOrigin = '%s';\n"
" var... | 0 | [
"CWE-20"
] | mod_auth_openidc | 612e309bfffd6f9b8ad7cdccda3019fc0865f3b4 | 134,967,768,864,928,750,000,000,000,000,000,000,000 | 74 | don't echo query params on invalid requests to redirect URI; closes #212
thanks @LukasReschke; I'm sure there's some OWASP guideline that warns
against this |
flush_text_buffer(gx_device_pdf *pdev)
{
pdf_text_state_t *pts = pdev->text->text_state;
stream *s = pdev->strm;
if (pts->buffer.count_chars != 0) {
pdf_font_resource_t *pdfont = pts->in.pdfont;
int code = pdf_assign_font_object_id(pdev, pdfont);
if (code < 0)
return co... | 0 | [
"CWE-119"
] | ghostpdl | 39b1e54b2968620723bf32e96764c88797714879 | 167,907,796,156,534,000,000,000,000,000,000,000,000 | 41 | pdfwrite - Guard against trying to output an infinite number
Bug #699255 " Buffer overflow on pprintg1 due to mishandle postscript file data to pdf"
The file uses an enormous parameter to xyxhow, causing an overflow in
the calculation of text positioning (value > 1e39).
Since this is basically a nonsense value, and ... |
static int nr_accept(struct socket *sock, struct socket *newsock, int flags)
{
struct sk_buff *skb;
struct sock *newsk;
DEFINE_WAIT(wait);
struct sock *sk;
int err = 0;
if ((sk = sock->sk) == NULL)
return -EINVAL;
lock_sock(sk);
if (sk->sk_type != SOCK_SEQPACKET) {
err = -EOPNOTSUPP;
goto out_release;
... | 0 | [
"CWE-200"
] | linux-2.6 | f6b97b29513950bfbf621a83d85b6f86b39ec8db | 99,886,422,093,964,590,000,000,000,000,000,000,000 | 61 | netrom: Fix nr_getname() leak
nr_getname() can leak kernel memory to user.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
isdn_timer_funct(ulong dummy)
{
int tf = dev->tflags;
if (tf & ISDN_TIMER_FAST) {
if (tf & ISDN_TIMER_MODEMREAD)
isdn_tty_readmodem();
if (tf & ISDN_TIMER_MODEMPLUS)
isdn_tty_modem_escape();
if (tf & ISDN_TIMER_MODEMXMIT)
isdn_tty_modem_xmit();
}
if (tf & ISDN_TIMER_SLOW) {
if (++isdn_timer_cnt1 >=... | 0 | [
"CWE-119"
] | linux | 9f5af546e6acc30f075828cb58c7f09665033967 | 5,203,083,345,871,619,500,000,000,000,000,000,000 | 33 | isdn/i4l: fix buffer overflow
This fixes a potential buffer overflow in isdn_net.c caused by an
unbounded strcpy.
[ ISDN seems to be effectively unmaintained, and the I4L driver in
particular is long deprecated, but in case somebody uses this..
- Linus ]
Signed-off-by: Jiten Thakkar <jitenmt@gmail.com>
Signed-... |
static int chap_got_response(
struct iscsi_conn *conn,
struct iscsi_node_auth *auth,
char *nr_in_ptr,
char *nr_out_ptr,
unsigned int *nr_out_len)
{
struct iscsi_chap *chap = conn->auth_protocol;
switch (chap->digest_type) {
case CHAP_DIGEST_MD5:
if (chap_server_compute_md5(conn, auth, nr_in_ptr,
nr_out_p... | 0 | [] | linux | 1816494330a83f2a064499d8ed2797045641f92c | 320,612,972,448,865,900,000,000,000,000,000,000,000 | 21 | scsi: target: iscsi: Use hex2bin instead of a re-implementation
This change has the following effects, in order of descreasing importance:
1) Prevent a stack buffer overflow
2) Do not append an unnecessary NULL to an anyway binary buffer, which
is writing one byte past client_digest when caller is:
chap_string... |
writen (int fd, const void *buf, size_t nbytes)
{
size_t nleft = nbytes;
int nwritten;
/* log_printhex (" writen:", buf, nbytes); */
while (nleft > 0)
{
#ifdef USE_NPTH
nwritten = npth_write (fd, buf, nleft);
#else
nwritten = write (fd, buf, nleft);
#endif
if (nwritten < 0 && errno == EI... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 105,869,764,719,622,470,000,000,000,000,000,000,000 | 23 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
void xen_hvm_evtchn_do_upcall(void)
{
__xen_evtchn_do_upcall();
} | 0 | [
"CWE-400",
"CWE-703"
] | linux | e99502f76271d6bc4e374fe368c50c67a1fd3070 | 338,004,225,964,842,470,000,000,000,000,000,000,000 | 4 | xen/events: defer eoi in case of excessive number of events
In case rogue guests are sending events at high frequency it might
happen that xen_evtchn_do_upcall() won't stop processing events in
dom0. As this is done in irq handling a crash might be the result.
In order to avoid that, delay further inter-domain events... |
static int slabstats_open(struct inode *inode, struct file *file)
{
unsigned long *n;
n = __seq_open_private(file, &slabstats_op, PAGE_SIZE);
if (!n)
return -ENOMEM;
*n = PAGE_SIZE / (2 * sizeof(unsigned long));
return 0;
} | 0 | [
"CWE-703"
] | linux | c4e490cf148e85ead0d1b1c2caaba833f1d5b29f | 175,026,020,420,957,500,000,000,000,000,000,000,000 | 12 | mm/slab.c: fix SLAB freelist randomization duplicate entries
This patch fixes a bug in the freelist randomization code. When a high
random number is used, the freelist will contain duplicate entries. It
will result in different allocations sharing the same chunk.
It will result in odd behaviours and crashes. It sh... |
static int snd_interval_refine_max(struct snd_interval *i, unsigned int max, int openmax)
{
int changed = 0;
if (i->max > max) {
i->max = max;
i->openmax = openmax;
changed = 1;
} else if (i->max == max && !i->openmax && openmax) {
i->openmax = 1;
changed = 1;
}
if (i->integer) {
if (i->openmax) {
i... | 0 | [
"CWE-362"
] | linux | 8423f0b6d513b259fdab9c9bf4aaa6188d054c2d | 49,106,765,047,127,820,000,000,000,000,000,000,000 | 23 | ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC
There is a small race window at snd_pcm_oss_sync() that is called from
OSS PCM SNDCTL_DSP_SYNC ioctl; namely the function calls
snd_pcm_oss_make_ready() at first, then takes the params_lock mutex
for the rest. When the stream is set up again by another thread
between them, ... |
DisplayLine(oml, ml, y, from, to)
struct mline *oml, *ml;
int from, to, y;
{
register int x;
int last2flag = 0, delete_lp = 0;
ASSERT(display);
ASSERT(y >= 0 && y < D_height);
ASSERT(from >= 0 && from < D_width);
ASSERT(to >= 0 && to < D_width);
if (!D_CLP && y == D_bot && to == D_width - 1)
{
... | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 230,915,029,650,712,450,000,000,000,000,000,000,000 | 98 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
static void *php_ap_memstr(char *haystack, int haystacklen, char *needle, int needlen, int partial)
{
int len = haystacklen;
char *ptr = haystack;
/* iterate through first character matches */
while( (ptr = memchr(ptr, needle[0], len)) ) {
/* calculate length after match */
len = haystacklen - (ptr - (char *)... | 0 | [
"CWE-399"
] | php-src | 4605d536d23b00813d11cc906bb48d39bdcf5f25 | 223,461,628,967,189,970,000,000,000,000,000,000,000 | 22 | Fixed bug #69364 - use smart_str to assemble strings |
rb_str_tr_s(VALUE str, VALUE src, VALUE repl)
{
str = rb_str_dup(str);
tr_trans(str, src, repl, 1);
return str;
} | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 202,234,617,812,392,900,000,000,000,000,000,000,000 | 6 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
ElectronBrowserClient::GetPlatformNotificationService(
content::BrowserContext* browser_context) {
if (!notification_service_) {
notification_service_ = std::make_unique<PlatformNotificationService>(this);
}
return notification_service_.get();
} | 0 | [] | electron | 6d9f3a494596d6b3e30938af9deb2c79f1c7f797 | 15,417,967,367,159,365,000,000,000,000,000,000,000 | 7 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#34191)
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33367)
* Make ElectronBrowser mojo interface frame associated. (#32815)
Co-authored-by: Marek Haranczyk <marek@openfin.co>
* fix: e... |
static GF_Err gf_sm_setup_bifsenc(GF_SceneEngine *seng, GF_StreamContext *sc, GF_ESD *esd)
{
u8 *data;
u32 data_len;
u32 nbb;
Bool encode_names, delete_bcfg;
GF_BIFSConfig *bcfg;
if (!esd->decoderConfig || (esd->decoderConfig->streamType != GF_STREAM_SCENE)) return GF_BAD_PARAM;
if (!seng->bifsenc)
seng->bif... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 336,097,694,312,704,350,000,000,000,000,000,000,000 | 72 | fixed #2138 |
connection_read_operation(Connection *conn, Operation *op, ber_tag_t *tag, int *remaining_data)
{
ber_len_t len = 0;
int ret = 0;
int32_t waits_done = 0;
ber_int_t msgid;
int new_operation = 1; /* Are we doing the first I/O read for a new operation ? */
char *buffer = conn->c_private->c_buffer;
... | 0 | [
"CWE-415"
] | 389-ds-base | a3c298f8140d3e4fa1bd5a670f1bb965a21a9b7b | 138,905,993,688,628,500,000,000,000,000,000,000,000 | 209 | Issue 5218 - double-free of the virtual attribute context in persistent search (#5219)
description:
A search is processed by a worker using a private pblock.
If the search is persistent, the worker spawn a thread
and kind of duplicate its private pblock so that the spawn
thread continue to process the p... |
void fmtutil_get_bmp_compression_name(u32 code, char *s, size_t s_len,
int is_os2v2)
{
const char *name1 = "?";
switch(code) {
case 0: name1 = "BI_RGB, uncompressed"; break;
case 1: name1 = "BI_RLE8"; break;
case 2: name1 = "BI_RLE4"; break;
case 3:
if(is_os2v2)
name1 = "Huffman 1D";
else
name1 = "BI_B... | 0 | [
"CWE-369"
] | deark | 62acb7753b0e3c0d3ab3c15057b0a65222313334 | 213,168,494,979,678,470,000,000,000,000,000,000,000 | 24 | pict,macrsrc: Fixed a bug that could cause division by 0
Found by F. Çelik. |
static void trace_module_add_evals(struct module *mod)
{
if (!mod->num_trace_evals)
return;
/*
* Modules with bad taint do not have events created, do
* not bother with enums either.
*/
if (trace_module_has_bad_taint(mod))
return;
trace_insert_eval_map(mod, mod->trace_evals, mod->num_trace_evals);
} | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 31,605,630,910,683,394,000,000,000,000,000,000,000 | 14 | tracing: Fix possible double free on failure of allocating trace buffer
Jing Xia and Chunyan Zhang reported that on failing to allocate part of the
tracing buffer, memory is freed, but the pointers that point to them are not
initialized back to NULL, and later paths may try to free the freed memory
again. Jing and Chu... |
static uint8_t last_seg(uint8_t len)
{
if (len <= START_PAYLOAD_MAX) {
return 0;
}
len -= START_PAYLOAD_MAX;
return 1 + (len / CONT_PAYLOAD_MAX);
} | 1 | [
"CWE-787"
] | zephyr | 6ec31c852049641095f2cdf25591f2e1bff86774 | 314,963,114,676,754,800,000,000,000,000,000,000,000 | 10 | Bluetooth: Mesh: Check SegN when receiving Transaction Start PDU
When receiving Transaction Start PDU, assure that number of segments
needed to send a Provisioning PDU with TotalLength size is equal to SegN
value provided in the Transaction Start PDU.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
(cher... |
static int i8042_enable_aux_port(void)
{
i8042_ctr &= ~I8042_CTR_AUXDIS;
i8042_ctr |= I8042_CTR_AUXINT;
if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
i8042_ctr &= ~I8042_CTR_AUXINT;
i8042_ctr |= I8042_CTR_AUXDIS;
pr_err("Failed to enable AUX port\n");
return -EIO;
}
return 0;
} | 0 | [
"CWE-476"
] | linux | 340d394a789518018f834ff70f7534fc463d3226 | 308,647,699,391,697,620,000,000,000,000,000,000,000 | 14 | Input: i8042 - fix crash at boot time
The driver checks port->exists twice in i8042_interrupt(), first when
trying to assign temporary "serio" variable, and second time when deciding
whether it should call serio_interrupt(). The value of port->exists may
change between the 2 checks, and we may end up calling serio_int... |
handle_log_close(int handle, char *emsg)
{
if (handle_is_ok(handle, HANDLE_FILE)) {
logit("%s%sclose \"%s\" bytes read %llu written %llu",
emsg == NULL ? "" : emsg, emsg == NULL ? "" : " ",
handle_to_name(handle),
(unsigned long long)handle_bytes_read(handle),
(unsigned long long)handle_bytes... | 0 | [
"CWE-732",
"CWE-703",
"CWE-269"
] | src | a6981567e8e215acc1ef690c8dbb30f2d9b00a19 | 166,201,125,971,708,780,000,000,000,000,000,000,000 | 14 | disallow creation (of empty files) in read-only mode; reported by
Michal Zalewski, feedback & ok deraadt@ |
static int read_xattr_entry(struct xattr_list *xattr,
struct squashfs_xattr_entry *entry, void *name)
{
int i, len, type = entry->type & XATTR_PREFIX_MASK;
for(i = 0; prefix_table[i].type != -1; i++)
if(prefix_table[i].type == type)
break;
if(prefix_table[i].type == -1) {
ERROR("Unrecognised type in read_x... | 0 | [
"CWE-20",
"CWE-190"
] | squashfs-tools | f95864afe8833fe3ad782d714b41378e860977b1 | 103,752,146,334,015,220,000,000,000,000,000,000,000 | 28 | unsquashfs-4: Add more sanity checks + fix CVE-2015-4645/6
Add more filesystem table sanity checks to Unsquashfs-4 and
also properly fix CVE-2015-4645 and CVE-2015-4646.
The CVEs were raised due to Unsquashfs having variable
oveflow and stack overflow in a number of vulnerable
functions.
The suggested patch only "fi... |
static int uncompress_file(struct archive_read* a) {
int ret;
while(1) {
/* Sometimes the uncompression function will return a
* 'retry' signal. If this will happen, we have to retry
* the function. */
ret = do_uncompress_file(a);
if(ret != ARCHIVE_RETRY)
return ret;
}
} | 0 | [
"CWE-20",
"CWE-125"
] | libarchive | 94821008d6eea81e315c5881cdf739202961040a | 3,991,428,996,473,476,300,000,000,000,000,000,000 | 12 | 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... |
static int dvb_frontend_clear_cache(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
int i;
u32 delsys;
delsys = c->delivery_system;
memset(c, 0, offsetof(struct dtv_frontend_properties, strength));
c->delivery_system = delsys;
dev_dbg(fe->dvb->device, "%s: Clearing cache... | 0 | [
"CWE-416"
] | linux | b1cb7372fa822af6c06c8045963571d13ad6348b | 258,834,860,565,808,970,000,000,000,000,000,000,000 | 65 | 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... |
boost::optional<SaplingNotePlaintext> SaplingNotePlaintext::decrypt(
const SaplingEncCiphertext &ciphertext,
const uint256 &ivk,
const uint256 &epk,
const uint256 &cmu
)
{
auto pt = AttemptSaplingEncDecryption(ciphertext, ivk, epk);
if (!pt) {
return boost::none;
}
// Deserializ... | 1 | [
"CWE-755",
"CWE-787"
] | zcash | c1fbf8ab5d73cff5e1f45236995857c75ba4128d | 214,912,159,039,154,170,000,000,000,000,000,000,000 | 44 | Ignore exceptions when deserializing note plaintexts |
void CLua::remove_shutdown_listener(lua_shutdown_listener *listener)
{
erase_val(shutdown_listeners, listener);
} | 0 | [
"CWE-434"
] | crawl | fc522ff6eb1bbb85e3de60c60a45762571e48c28 | 125,822,390,226,617,730,000,000,000,000,000,000,000 | 4 | Disable lua load(), loadstring() bytcode loading |
void JOIN::cache_const_exprs()
{
bool cache_flag= FALSE;
bool *analyzer_arg= &cache_flag;
/* No need in cache if all tables are constant. */
if (const_tables == table_count)
return;
if (conds)
conds->compile(thd, &Item::cache_const_expr_analyzer, (uchar **)&analyzer_arg,
&Item::cac... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 306,661,747,668,693,060,000,000,000,000,000,000,000 | 30 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
static NTSTATUS dcesrv_lsa_GetUserName(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct lsa_GetUserName *r)
{
enum dcerpc_transport_t transport =
dcerpc_binding_get_transport(dce_call->conn->endpoint->ep_description);
struct auth_session_info *session_info =
dcesrv_call_session_info(dce_call);
... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 233,557,329,355,838,340,000,000,000,000,000,000,000 | 55 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
static bool __decode_op_hdr(struct xdr_stream *xdr, enum nfs_opnum4 expected,
int *nfs_retval)
{
__be32 *p;
uint32_t opnum;
int32_t nfserr;
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))
goto out_overflow;
opnum = be32_to_cpup(p++);
if (unlikely(opnum != expected))
goto out_bad_operation;
if (unlikely(... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 36,246,652,736,100,226,000,000,000,000,000,000,000 | 32 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
R_API bool r_io_bank_use(RIO *io, ut32 bankid) {
RIOBank *bank = r_io_bank_get (io, bankid);
if (bank) {
io->bank = bankid;
return true;
}
return false;
} | 0 | [
"CWE-416"
] | radare2 | b5cb90b28ec71fda3504da04e3cc94a362807f5e | 205,567,817,574,656,700,000,000,000,000,000,000,000 | 8 | Prefer memleak over usaf in io.bank's rbtree bug ##crash
* That's a workaround, proper fix will come later
* Reproducer: bins/fuzzed/iobank-crash
* Reported by Akyne Choi via huntr.dev |
nautilus_file_set_owner (NautilusFile *file,
const char *user_name_or_id,
NautilusFileOperationCallback callback,
gpointer callback_data)
{
GError *error;
GFileInfo *info;
uid_t new_id;
if (!nautilus_file_can_set_owner (file)) {
/* Claim that something changed even if the permission
* change fail... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 220,390,576,811,269,500,000,000,000,000,000,000,000 | 55 | 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-... |
static const char* primary_order_string(UINT32 orderType)
{
const char* orders[] = { "[0x%02" PRIx8 "] DstBlt",
"[0x%02" PRIx8 "] PatBlt",
"[0x%02" PRIx8 "] ScrBlt",
"[0x%02" PRIx8 "] UNUSED",
"[0x%02" PRIx8 "] UNUSED",
... | 0 | [
"CWE-415"
] | FreeRDP | 67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8 | 315,658,747,243,957,640,000,000,000,000,000,000,000 | 39 | Fixed #6013: Check new length is > 0 |
projid_t from_kprojid(struct user_namespace *targ, kprojid_t kprojid)
{
/* Map the uid from a global kernel uid */
return map_id_up(&targ->projid_map, __kprojid_val(kprojid));
} | 0 | [
"CWE-20",
"CWE-862",
"CWE-863"
] | linux | d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd | 94,533,107,687,073,630,000,000,000,000,000,000,000 | 5 | userns: also map extents in the reverse map to kernel IDs
The current logic first clones the extent array and sorts both copies, then
maps the lower IDs of the forward mapping into the lower namespace, but
doesn't map the lower IDs of the reverse mapping.
This means that code in a nested user namespace with >5 extent... |
safe_delay_store(struct mddev *mddev, const char *cbuf, size_t len)
{
unsigned long msec;
if (strict_strtoul_scaled(cbuf, &msec, 3) < 0)
return -EINVAL;
if (msec == 0)
mddev->safemode_delay = 0;
else {
unsigned long old_delay = mddev->safemode_delay;
unsigned long new_delay = (msec*HZ)/1000;
if (new_del... | 0 | [
"CWE-200"
] | linux | b6878d9e03043695dbf3fa1caa6dfc09db225b16 | 286,945,597,438,817,550,000,000,000,000,000,000,000 | 20 | md: use kzalloc() when bitmap is disabled
In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
mdu_bitmap_file_t called "file".
5769 file = kmalloc(sizeof(*file), GFP_NOIO);
5770 if (!file)
5771 return -ENOMEM;
This structure is copied to user space at the end of the fun... |
size_t parse_core(const char *s, size_t n, SemanticValues &sv, Context &c,
any &dt) const override {
const auto &rule = *ope_;
auto len = rule.parse(s, n, sv, c, dt);
if (success(len) && match_action_) { match_action_(s, len, c); }
return len;
} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 118,470,682,162,653,000,000,000,000,000,000,000,000 | 7 | Fix #122 |
vim_regsub(
regmatch_T *rmp,
char_u *source,
typval_T *expr,
char_u *dest,
int copy,
int magic,
int backslash)
{
int result;
regexec_T rex_save;
int rex_in_use_save = rex_in_use;
if (rex_in_use)
// Being called recursively, save the state.
rex_save = rex;
rex_in_u... | 0 | [
"CWE-416"
] | vim | 4c13e5e6763c6eb36a343a2b8235ea227202e952 | 140,480,574,581,619,600,000,000,000,000,000,000,000 | 31 | patch 8.2.3949: using freed memory with /\%V
Problem: Using freed memory with /\%V.
Solution: Get the line again after getvvcol(). |
intrusive_ptr<ExpressionFieldPath> ExpressionFieldPath::parse(
const boost::intrusive_ptr<ExpressionContext>& expCtx,
const string& raw,
const VariablesParseState& vps) {
uassert(16873,
str::stream() << "FieldPath '" << raw << "' doesn't start with $",
raw.c_str()[0] == '$'); //... | 0 | [
"CWE-190"
] | mongo | 21d8699ed6c517b45e1613e20231cd8eba894985 | 9,450,515,374,872,587,000,000,000,000,000,000,000 | 25 | SERVER-43699 $mod should not overflow for large negative values |
static const char *external_diff_attr(const char *name)
{
struct git_attr_check attr_diff_check;
if (!name)
return NULL;
setup_diff_attr_check(&attr_diff_check);
if (!git_checkattr(name, 1, &attr_diff_check)) {
const char *value = attr_diff_check.value;
if (!ATTR_TRUE(value) &&
!ATTR_FALSE(value) &&
... | 0 | [
"CWE-119"
] | git | fd55a19eb1d49ae54008d932a65f79cd6fda45c9 | 259,958,133,818,712,400,000,000,000,000,000,000,000 | 22 | Fix buffer overflow in git diff
If PATH_MAX on your system is smaller than a path stored, it may cause
buffer overflow and stack corruption in diff_addremove() and diff_change()
functions when running git-diff
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com> |
Returns the Olson database version number.
*/
PHP_FUNCTION(timezone_version_get)
{
const timelib_tzdb *tzdb;
tzdb = DATE_TIMEZONEDB; | 0 | [] | php-src | bb057498f7457e8b2eba98332a3bad434de4cf12 | 334,206,466,115,166,060,000,000,000,000,000,000,000 | 7 | Fix #70277: new DateTimeZone($foo) is ignoring text after null byte
The DateTimeZone constructors are not binary safe. They're parsing the timezone
as string, but discard the length when calling timezone_initialize(). This
patch adds a tz_len parameter and a respective check to timezone_initialize(). |
static ssize_t prevent_suspend_time_ms_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct wakeup_source *ws = dev_get_drvdata(dev);
ktime_t prevent_sleep_time = ws->prevent_sleep_time;
if (ws->active && ws->autosleep_enabled) {
prevent_sleep_time = ktime_add(prevent_slee... | 1 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 204,991,377,026,640,380,000,000,000,000,000,000,000 | 13 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
int capacity() const { return buffer_len_; } | 0 | [] | envoy | 3b5acb2f43548862dadb243de7cf3994986a8e04 | 250,466,825,714,811,670,000,000,000,000,000,000,000 | 1 | http, url: Bring back chromium_url and http_parser_parse_url (#198)
* Revert GURL as HTTP URL parser utility
This reverts:
1. commit c9c4709c844b90b9bb2935d784a428d667c9df7d
2. commit d828958b591a6d79f4b5fa608ece9962b7afbe32
3. commit 2d69e30c51f2418faf267aaa6c1126fce9948c62
Signed-off-by: Dhi Aurrahman <dio@tetrat... |
BGD_DECLARE(void) gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
{
int i;
int j;
int index;
int y;
int miny, maxy, pmaxy;
int x1, y1;
int x2, y2;
int ind1, ind2;
int ints;
int fill_color;
if (n <= 0) {
return;
}
if (c == gdAntiAliased) {
fill_color = im->AA_color;
} else {
fill_co... | 0 | [
"CWE-119",
"CWE-787"
] | libgd | 77f619d48259383628c3ec4654b1ad578e9eb40e | 148,583,475,471,692,680,000,000,000,000,000,000,000 | 127 | fix #215 gdImageFillToBorder stack-overflow when invalid color is used |
void MSG_WriteAngle16( msg_t *sb, float f ) {
MSG_WriteShort (sb, ANGLE2SHORT(f));
} | 0 | [
"CWE-119"
] | ioq3 | d2b1d124d4055c2fcbe5126863487c52fd58cca1 | 94,228,695,013,104,570,000,000,000,000,000,000,000 | 3 | Fix/improve buffer overflow in MSG_ReadBits/MSG_WriteBits
Prevent reading past end of message in MSG_ReadBits. If read past
end of msg->data buffer (16348 bytes) the engine could SEGFAULT.
Make MSG_WriteBits use an exact buffer overflow check instead of
possibly failing with a few bytes left. |
pkcs11dh_fromdns(dst_key_t *key, isc_buffer_t *data) {
pk11_object_t *dh = NULL;
isc_region_t r;
uint16_t plen, glen, plen_, glen_, publen;
CK_BYTE *prime = NULL, *base = NULL, *pub = NULL;
CK_ATTRIBUTE *attr;
int special = 0;
unsigned int bits;
isc_result_t result;
isc_buffer_remainingregion(data, &r);
if (... | 0 | [
"CWE-617"
] | bind9 | 8d807cc21655eaa6e6a08afafeec3682c0f3f2ab | 307,847,696,554,778,860,000,000,000,000,000,000,000 | 183 | Fix crash in pk11_numbits() when native-pkcs11 is used
When pk11_numbits() is passed a user provided input that contains all
zeroes (via crafted DNS message), it would crash with assertion
failure. Fix that by properly handling such input. |
void CServer::SendRconLineAuthed(const char *pLine, void *pUser, bool Highlighted)
{
CServer *pThis = (CServer *)pUser;
static volatile int ReentryGuard = 0;
int i;
if(ReentryGuard) return;
ReentryGuard++;
for(i = 0; i < MAX_CLIENTS; i++)
{
if(pThis->m_aClients[i].m_State != CClient::STATE_EMPTY && pThis->m_... | 0 | [
"CWE-20",
"CWE-703",
"CWE-400"
] | teeworlds | c68402fa7e279d42886d5951d1ea8ac2facc1ea5 | 17,947,087,909,141,610,000,000,000,000,000,000,000 | 17 | changed a check |
statusline_row(win_T *wp)
{
#if defined(FEAT_PROP_POPUP)
// If the window is really zero height the winbar isn't displayed.
if (wp->w_frame->fr_height == wp->w_status_height && !popup_is_popup(wp))
return wp->w_winrow;
#endif
return W_WINROW(wp) + wp->w_height;
} | 0 | [
"CWE-122"
] | vim | 826bfe4bbd7594188e3d74d2539d9707b1c6a14b | 252,500,506,951,639,500,000,000,000,000,000,000,000 | 9 | patch 8.2.3487: illegal memory access if buffer name is very long
Problem: Illegal memory access if buffer name is very long.
Solution: Make sure not to go over the end of the buffer. |
int XMLRPC_GetValueInt(XMLRPC_VALUE value) {
return ((value && value->type == xmlrpc_int) ? value->i : 0);
} | 0 | [
"CWE-119"
] | php-src | 88412772d295ebf7dd34409534507dc9bcac726e | 187,463,148,136,868,200,000,000,000,000,000,000,000 | 3 | Fix bug #68027 - fix date parsing in XMLRPC lib |
ip_allow_ruby_exit_p(self)
VALUE self;
{
struct tcltkip *ptr = get_ip(self);
/* ip is deleted? */
if (deleted_ip(ptr)) {
rb_raise(rb_eRuntimeError, "interpreter is deleted");
}
if (ptr->allow_ruby_exit) {
return Qtrue;
} else {
return Qfalse;
}
} | 0 | [] | tk | ebd0fc80d62eeb7b8556522256f8d035e013eb65 | 171,335,013,239,654,750,000,000,000,000,000,000,000 | 16 | tcltklib.c: check argument
* ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and
length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
void Http2Session::Http2Ping::Send(uint8_t* payload) {
uint8_t data[8];
if (payload == nullptr) {
memcpy(&data, &startTime_, arraysize(data));
payload = data;
}
Http2Scope h2scope(session_);
CHECK_EQ(nghttp2_submit_ping(**session_, NGHTTP2_FLAG_NONE, payload), 0);
} | 0 | [] | node | ce22d6f9178507c7a41b04ac4097b9ea902049e3 | 114,070,511,244,737,240,000,000,000,000,000,000,000 | 9 | http2: add altsvc support
Add support for sending and receiving ALTSVC frames.
PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com> |
ufmt_getArrayLength(const UFormattable* fmt, UErrorCode *status) {
const Formattable *obj = Formattable::fromUFormattable(fmt);
int32_t count;
(void)obj->getArray(count, *status);
return count;
} | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 41,238,622,131,255,865,000,000,000,000,000,000,000 | 7 | ICU-20246 Fixing another integer overflow in number parsing. |
std::unique_ptr<Pipeline, PipelineDeleter> buildPipelineFromViewDefinition(
const boost::intrusive_ptr<ExpressionContext>& expCtx,
ExpressionContext::ResolvedNamespace resolvedNs,
std::vector<BSONObj> currentPipeline) {
auto validatorCallback = [](const Pipeline& pipeline) {
const auto& sources... | 0 | [] | mongo | 6518b22420c5bbd92c42caf907671c3a2b140bb6 | 224,561,466,650,746,830,000,000,000,000,000,000,000 | 32 | SERVER-58203 factor out logging statements into helper functions |
dup_point_weierstrass (mpi_point_t result, mpi_point_t point, mpi_ec_t ctx)
{
#define x3 (result->x)
#define y3 (result->y)
#define z3 (result->z)
#define t1 (ctx->t.scratch[0])
#define t2 (ctx->t.scratch[1])
#define t3 (ctx->t.scratch[2])
#define l1 (ctx->t.scratch[3])
#define l2 (ctx->t.scratch[4])
#define l3 (ctx->t... | 0 | [
"CWE-200"
] | libgcrypt | 88e1358962e902ff1cbec8d53ba3eee46407851a | 144,336,693,279,900,340,000,000,000,000,000,000,000 | 79 | ecc: Constant-time multiplication for Weierstrass curve.
* mpi/ec.c (_gcry_mpi_ec_mul_point): Use simple left-to-right binary
method for Weierstrass curve when SCALAR is secure. |
static GF_Err gf_media_export_filters(GF_MediaExporter *dumper)
{
char *args, szSubArgs[1024], szExt[30];
GF_Filter *file_out, *reframer, *remux=NULL, *src_filter;
GF_FilterSession *fsess;
GF_Err e = GF_OK;
u32 codec_id=0;
u32 sample_count=0;
Bool skip_write_filter = GF_FALSE;
Bool ext_forced = GF_FALSE;
Bool ... | 1 | [
"CWE-476"
] | gpac | 00194f5fe462123f70b0bae7987317b52898b868 | 122,365,100,762,076,860,000,000,000,000,000,000,000 | 370 | fixed #1769 (fuzz) |
static int bpf_link(struct dentry *old_dentry, struct inode *dir,
struct dentry *new_dentry)
{
if (bpf_dname_reserved(new_dentry))
return -EPERM;
return simple_link(old_dentry, dir, new_dentry);
} | 0 | [
"CWE-703"
] | linux | 92117d8443bc5afacc8d5ba82e541946310f106e | 122,334,389,552,404,530,000,000,000,000,000,000,000 | 8 | bpf: fix refcnt overflow
On a system with >32Gbyte of phyiscal memory and infinite RLIMIT_MEMLOCK,
the malicious application may overflow 32-bit bpf program refcnt.
It's also possible to overflow map refcnt on 1Tb system.
Impose 32k hard limit which means that the same bpf program or
map cannot be shared by more than ... |
static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data)
{
struct super_block *sb = NULL;
struct inode *inode = NULL;
struct dentry *root = NULL;
struct v9fs_session_info *v9ses = NULL;
umode_t mode = S_IRWXUGO | S_ISVTX;
struct p9_fid *fid;
int ret... | 1 | [
"CWE-835"
] | linux | 5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f | 271,130,939,973,776,050,000,000,000,000,000,000,000 | 99 | 9p: use inode->i_lock to protect i_size_write() under 32-bit
Use inode->i_lock to protect i_size_write(), else i_size_read() in
generic_fillattr() may loop infinitely in read_seqcount_begin() when
multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl()
simultaneously under 32-bit SMP environment, and a... |
static inline int qeth_get_mtu_outof_framesize(int framesize)
{
switch (framesize) {
case 0x4000:
return 8192;
case 0x6000:
return 16384;
case 0xa000:
return 32768;
case 0xffff:
return 57344;
default:
return 0;
}
} | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 164,123,386,224,562,420,000,000,000,000,000,000,000 | 15 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
bool poll_only)
__must_hold(&ctx->completion_lock)
{
struct hlist_head *list;
struct io_kiocb *req;
list = &ctx->cancel_hash[hash_long(sqe_addr, ctx->cancel_hash_bits)];
hlist_for_each_entry(req, list, hash_node) {
if (sqe_addr != req->user_data)
continue;
if (poll_only && req->opcode != IORING_OP... | 1 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 48,054,547,585,683,310,000,000,000,000,000,000,000 | 15 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
int fpm_unix_resolve_socket_premissions(struct fpm_worker_pool_s *wp) /* {{{ */
{
struct fpm_worker_pool_config_s *c = wp->config;
/* uninitialized */
wp->socket_uid = -1;
wp->socket_gid = -1;
wp->socket_mode = 0666;
if (!c) {
return 0;
}
if (c->listen_owner && *c->listen_owner) {
struct passwd *pwd;
... | 1 | [
"CWE-284",
"CWE-264",
"CWE-269"
] | php-src | 35ceea928b12373a3b1e3eecdc32ed323223a40d | 10,732,911,479,000,754,000,000,000,000,000,000,000 | 42 | Fix bug #67060: use default mode of 660 |
static int tipc_sk_sock_err(struct socket *sock, long *timeout)
{
struct sock *sk = sock->sk;
int err = sock_error(sk);
int typ = sock->type;
if (err)
return err;
if (typ == SOCK_STREAM || typ == SOCK_SEQPACKET) {
if (sk->sk_state == TIPC_DISCONNECTING)
return -EPIPE;
else if (!tipc_sk_connected(sk))
... | 0 | [
"CWE-200",
"CWE-909"
] | linux | d6d86830705f173fca6087a3e67ceaf68db80523 | 197,259,671,360,174,700,000,000,000,000,000,000,000 | 21 | net ticp:fix a kernel-infoleak in __tipc_sendmsg()
struct tipc_socket_addr.ref has a 4-byte hole,and __tipc_getname() currently
copying it to user space,causing kernel-infoleak.
BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline]
BUG: KMSAN: kernel-infoleak in instrument_c... |
S_invlist_iternext(SV* invlist, UV* start, UV* end)
{
/* An C<invlist_iterinit> call on <invlist> must be used to set this up.
* This call sets in <*start> and <*end>, the next range in <invlist>.
* Returns <TRUE> if successful and the next call will return the next
* range; <FALSE> if was already at... | 0 | [
"CWE-125"
] | perl5 | 43b2f4ef399e2fd7240b4eeb0658686ad95f8e62 | 321,460,848,771,281,640,000,000,000,000,000,000,000 | 33 | regcomp.c: Convert some strchr to memchr
This allows things to work properly in the face of embedded NULs.
See the branch merge message for more information. |
GF_Err gp_rtp_builder_do_avc(GP_RTPPacketizer *builder, u8 *nalu, u32 nalu_size, u8 IsAUEnd, u32 FullAUSize)
{
u32 do_flush, bytesLeft, size, nal_type;
char shdr[2];
char stap_hdr;
do_flush = 0;
if (!nalu) do_flush = 1;
/*we only do STAP or SINGLE modes*/
else if (builder->sl_header.accessUnitStartFlag) do_flus... | 1 | [
"CWE-787"
] | gpac | 1773b7a34bc08734aee7d3f5dfe65d06389fe15a | 62,874,655,692,997,670,000,000,000,000,000,000,000 | 135 | fixed #2173 |
bool IsSupported(const NodeDef* node) const override {
return IsAggregate(*node) && HasRegularInputs(*node) &&
GetDataTypeFromAttr(*node, "T") !=
DT_VARIANT; // TODO(b/119787146): Enable for variants.
} | 0 | [
"CWE-476"
] | tensorflow | e6340f0665d53716ef3197ada88936c2a5f7a2d3 | 270,930,208,668,854,780,000,000,000,000,000,000,000 | 5 | Handle a special grappler case resulting in crash.
It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault.
PiperOrigin-RevId: 369242852
Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13... |
PHP_FUNCTION(openssl_pkey_export_to_file)
{
struct php_x509_request req;
zval * zpkey, * args = NULL;
char * passphrase = NULL;
size_t passphrase_len = 0;
char * filename = NULL;
size_t filename_len = 0;
zend_resource *key_resource = NULL;
int pem_write = 0;
EVP_PKEY * key;
BIO * bio_out = NULL;
const EVP_CI... | 0 | [
"CWE-326"
] | php-src | 0216630ea2815a5789a24279a1211ac398d4de79 | 201,586,404,322,853,670,000,000,000,000,000,000,000 | 84 | Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV) |
static int selectExpander(Walker *pWalker, Select *p){
Parse *pParse = pWalker->pParse;
int i, j, k;
SrcList *pTabList;
ExprList *pEList;
struct SrcList_item *pFrom;
sqlite3 *db = pParse->db;
Expr *pE, *pRight, *pExpr;
u16 selFlags = p->selFlags;
u32 elistFlags = 0;
p->selFlags |= SF_Expanded;
if... | 0 | [
"CWE-787"
] | sqlite | 0990c415f65d2556a5e4122cbe5727d500411aeb | 122,260,449,153,361,050,000,000,000,000,000,000,000 | 286 | Fix a problem with ALTER TABLE for views that have a nested FROM clause.
Ticket [f50af3e8a565776b].
FossilOrigin-Name: c431b3fd8fd0f6a6974bba3e9366b0430ec003d570e7ce70ceefbcff5fe4b6fa |
static int kvp_file_init(void)
{
int fd;
FILE *filep;
size_t records_read;
char *fname;
struct kvp_record *record;
struct kvp_record *readp;
int num_blocks;
int i;
int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK;
if (access("/var/opt/hyperv", F_OK)) {
if (mkdir("/var/opt/hyperv", S_IRUSR | ... | 0 | [] | char-misc | 95a69adab9acfc3981c504737a2b6578e4d846ef | 51,373,946,000,562,560,000,000,000,000,000,000,000 | 76 | tools: hv: Netlink source address validation allows DoS
The source code without this patch caused hypervkvpd to exit when it processed
a spoofed Netlink packet which has been sent from an untrusted local user.
Now Netlink messages with a non-zero nl_pid source address are ignored
and a warning is printed into the sysl... |
mrb_proc_new(mrb_state *mrb, const mrb_irep *irep)
{
struct RProc *p;
mrb_callinfo *ci = mrb->c->ci;
p = MRB_OBJ_ALLOC(mrb, MRB_TT_PROC, mrb->proc_class);
if (ci) {
struct RClass *tc = NULL;
if (ci->proc) {
if (ci->proc->color != MRB_GC_RED) {
tc = MRB_PROC_TARGET_CLASS(ci->proc);
... | 0 | [
"CWE-476",
"CWE-190"
] | mruby | f5e10c5a79a17939af763b1dcf5232ce47e24a34 | 190,871,520,730,908,430,000,000,000,000,000,000 | 33 | proc.c: add `mrb_state` argument to `mrb_proc_copy()`.
The function may invoke the garbage collection and it requires
`mrb_state` to run. |
ofpacts_check_consistency(struct ofpact ofpacts[], size_t ofpacts_len,
struct flow *flow, ofp_port_t max_ports,
uint8_t table_id, uint8_t n_tables,
enum ofputil_protocol usable_protocols)
{
enum ofputil_protocol p = usable_protocols;
... | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 315,326,199,181,001,850,000,000,000,000,000,000,000 | 14 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
void kvm_arch_flush_shadow_memslot(struct kvm *kvm,
struct kvm_memory_slot *slot)
{
kvm_arch_flush_shadow_all(kvm);
} | 0 | [] | linux | 6d1068b3a98519247d8ba4ec85cd40ac136dbdf9 | 293,796,858,239,260,100,000,000,000,000,000,000,000 | 5 | KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461)
On hosts without the XSAVE support unprivileged local user can trigger
oops similar to the one below by setting X86_CR4_OSXSAVE bit in guest
cr4 register using KVM_SET_SREGS ioctl and later issuing KVM_RUN
ioctl.
invalid opcode: 0000 [#2]... |
static void pq_set_src(struct ioat_raw_descriptor *descs[2],
dma_addr_t addr, u32 offset, u8 coef, int idx)
{
struct ioat_pq_descriptor *pq = (struct ioat_pq_descriptor *) descs[0];
struct ioat_raw_descriptor *raw = descs[pq_idx_to_desc >> idx & 1];
raw->field[pq_idx_to_field[idx]] = addr + offset;
pq->co... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 281,385,706,448,001,540,000,000,000,000,000,000,000 | 9 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static inline int pages_identical(struct page *page1, struct page *page2)
{
return !memcmp_pages(page1, page2);
} | 0 | [
"CWE-362",
"CWE-125"
] | linux | 2b472611a32a72f4a118c069c2d62a1a3f087afd | 86,701,493,858,400,300,000,000,000,000,000,000,000 | 4 | ksm: fix NULL pointer dereference in scan_get_next_rmap_item()
Andrea Righi reported a case where an exiting task can race against
ksmd::scan_get_next_rmap_item (http://lkml.org/lkml/2011/6/1/742) easily
triggering a NULL pointer dereference in ksmd.
ksm_scan.mm_slot == &ksm_mm_head with only one registered mm
CPU 1... |
void jswrap_graphics_setPixel(JsVar *parent, int x, int y, JsVar *color) {
JsGraphics gfx; if (!graphicsGetFromVar(&gfx, parent)) return;
unsigned int col = gfx.data.fgColor;
if (!jsvIsUndefined(color))
col = (unsigned int)jsvGetInteger(color);
graphicsSetPixel(&gfx, (short)x, (short)y, col);
gfx.data.cur... | 0 | [
"CWE-125"
] | Espruino | 8a44b04b584b3d3ab1cb68fed410f7ecb165e50e | 204,846,333,373,743,700,000,000,000,000,000,000,000 | 10 | Add height check for Graphics.createArrayBuffer(...vertical_byte:true) (fix #1421) |
termcap_length(const char *src)
{
static const char pattern[] = ":\\\n\t:";
int len = 0;
const char *const t = src + strlen(src);
while (*src != '\0') {
IGNORE_SEP_TRAIL(src, t, pattern);
src++;
len++;
}
return len;
} | 0 | [
"CWE-125"
] | ncurses | b025434573f466efe27862656a6a9d41dd2bd609 | 246,830,966,755,312,350,000,000,000,000,000,000,000 | 14 | ncurses 6.1 - patch 20191012
+ amend recent changes to ncurses*-config and pc-files to filter out
Debian linker-flags (report by Sven Joachim, cf: 20150516).
+ clarify relationship between tic, infocmp and captoinfo in manpage.
+ check for invalid hashcode in _nc_find_type_entry and
_nc_find_name_entry.
> fix seve... |
pdf14_recreate_device(gs_memory_t *mem, gs_gstate * pgs,
gx_device * dev, const gs_pdf14trans_t * pdf14pct)
{
pdf14_device * pdev = (pdf14_device *)dev;
gx_device * target = pdev->target;
pdf14_device * dev_proto;
pdf14_device temp_dev_proto;
bool has_tags = dev->graphics_type_tag & ... | 0 | [
"CWE-416"
] | ghostpdl | 90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb | 34,759,875,351,927,764,000,000,000,000,000,000,000 | 35 | Bug 697456. Dont create new ctx when pdf14 device reenabled
This bug had yet another weird case where the user created a
file that pushed the pdf14 device twice. We were in that case,
creating a new ctx and blowing away the original one with out
proper clean up. To avoid, only create a new one when we need it. |
long keyctl_chown_key(key_serial_t id, uid_t uid, gid_t gid)
{
struct key_user *newowner, *zapowner = NULL;
struct key *key;
key_ref_t key_ref;
long ret;
ret = 0;
if (uid == (uid_t) -1 && gid == (gid_t) -1)
goto error;
key_ref = lookup_user_key(id, 1, 1, KEY_SETATTR);
if (IS_ERR(key_ref)) {
ret = PTR_ERR(... | 0 | [
"CWE-399"
] | linux-2.6 | 0d54ee1c7850a954026deec4cd4885f331da35cc | 314,565,854,135,313,800,000,000,000,000,000,000,000 | 99 | security: introduce missing kfree
Plug this leak.
Acked-by: David Howells <dhowells@redhat.com>
Cc: James Morris <jmorris@namei.org>
Cc: <stable@kernel.org>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
copy_loclist_entries(qf_list_T *from_qfl, qf_list_T *to_qfl)
{
int i;
qfline_T *from_qfp;
qfline_T *prevp;
// copy all the location entries in this list
FOR_ALL_QFL_ITEMS(from_qfl, from_qfp, i)
{
if (qf_add_entry(to_qfl,
NULL,
NULL,
from_qfp->qf_module,
0,
... | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 270,992,613,270,133,670,000,000,000,000,000,000,000 | 38 | patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any. |
prevwin_curwin(void)
{
return
#ifdef FEAT_CMDWIN
// In cmdwin, the alternative buffer should be used.
is_in_cmdwin() && prevwin != NULL ? prevwin :
#endif
curwin;
} | 0 | [
"CWE-476"
] | vim | 0f6e28f686dbb59ab3b562408ab9b2234797b9b1 | 215,337,807,574,505,130,000,000,000,000,000,000,000 | 9 | patch 8.2.4428: crash when switching tabpage while in the cmdline window
Problem: Crash when switching tabpage while in the cmdline window.
Solution: Disallow switching tabpage when in the cmdline window. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.