text stringlengths 79 3.72M |
|---|
<vulnerable_code> str2 = str2.toLowerCase()
}
const track = Array(str2.length + 1).fill(null).map(() =>
Array(str1.length + 1).fill(null));
for (let i = 0; i <= str1.length; i += 1) {
track[0][i] = i;
}
for (let j = 0; j <= str2.length; j += 1) {
track[j][0] = j;
}
for (let j = 1; j <= str2... |
<vulnerable_code>const Logger = require('../Logger')
const axios = require('axios')
const { xmlToJSON, levenshteinDistance } = require('./index')
const htmlSanitizer = require('../utils/htmlSanitizer')
}
}
module.exports.getPodcastFeed = (feedUrl, excludeEpisodeMetadata = false) => {
Logger.debug(`[podcastUtils] ... |
<vulnerable_code> }
}
else
us[j++] = caprtl_to_unicode[(int) s[i]];
}
return j;<commit_title>[PATCH] Protected against garbage in the CapRTL encoder<commit_description><fixed_code>
}
}
else
{
if ((int)s[i] < 0)
us[j++] = '?';
else
us[j++] = caprtl... |
<vulnerable_code>
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
597,
/**/<commit_title>[PATCH] patch 9.0.0598: using negative array index with negative<commit_description><fixed_code>
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
598,
... |
<vulnerable_code> if (hnc) // add next_curwin size
{
next_curwin_size -= p_wiw - (m - n);
new_size += next_curwin_size;
room -= new_size - next_curwin_size;
}
void
win_new_width(win_T *wp, int width)
{
wp->w_width = width;
wp->w_lines_valid = 0;
changed_line_abv_curs_win(wp);
... |
<vulnerable_code>
// [databind#2660]: caucho-quercus
s.add("com.caucho.config.types.ResourceRef");
DEFAULT_NO_DESER_CLASS_NAMES = Collections.unmodifiableSet(s);
}
<commit_title>[PATCH] Fix #2662, #2664, #2666<commit_description><fixed_code>
// [databind#2660]: caucho-querc... |
<vulnerable_code> }
if (local->fop == GF_FOP_SETXATTR) {
STACK_WIND(frame, dht_setxattr_mds_cbk, local->mds_subvol,
local->mds_subvol->fops->setxattr, &local->loc, local->xattr,
local->flags, local->xattr_req);
}
if (local->fop == GF_FOP_FSETXATTR) {
... |
<vulnerable_code>/*! For license information please see end_to_end_encryption-filedrop.js.LICENSE.txt */
(()=>{var e={4820:(e,t,n)=>{"use strict";n(9070),t.Z=void 0,n(9601);var r,o,i=(r=n(9669))&&r.__esModule?r:{default:r},a=n(4332);var s=i.default.create({headers:{requesttoken:null!==(o=(0,a.getRequestToken)())&&void ... |
<vulnerable_code> return encrypted.slice(encrypted.byteLength - ((128 + 7) >> 3))
}
class EncryptedFile {
/**
* @return {Promise<{content: ArrayBuffer, tag: ArrayBuffer}>}
*/
async encrypt(content) {
const encrypted = await window.crypto.subtle.encrypt(
{
name: 'AES-GCM',
iv: this.initializationVec... |
<vulnerable_code>import axios from '@nextcloud/axios'
import { generateOcsUrl } from '@nextcloud/router'
import { EncryptedFile, encryptStringAsymmetric } from './crypto.js'
/**
* @typedef {object} EncryptedFileKey
* @property {string} encrypted - Encrypted JSON payload to the currently used metadata key. Encryption... |
<vulnerable_code> filter = gf_filter_new(fsess, f_reg, args, NULL, argtype, err_code, NULL, GF_FALSE);
if (!filter) return NULL;
if (!filter->num_output_pids) {
const char *src_url = strstr(name, "src");
if (src_url && (src_url[3]==fsess->sep_name))
gf_filter_post_process_task(filter);
}
retu... |
<vulnerable_code> "video",
]
def allow_all(tag: str, name: str, value: str) -> bool:
return True
allowed_attributes = allow_all
allowed_styles = [
"color",
"background-color",<commit_title>[PATCH] Fixed HTML attribute validation<commit_description><fixed_code>
"video",
]
allowed_attributes = [
... |
<vulnerable_code> if ( options.verbose ) printf("%s %s ",arg,types[type]) ;
if ( type == typeImage ) {
time_t t = readImageTime(std::string(arg)) ;
#ifdef __APPLE__
char buffer[1024];
#else
char* buffer = NULL;
#endif<commi... |
<vulnerable_code>}
static bool anal_fcn_data (RCore *core, const char *input) {
RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, core->offset, -1);
ut32 fcn_size = r_anal_function_size_from_entry (fcn);
if (fcn) {
int i;
bool gap = false;
ut64 gap_addr = UT64_MAX;
char *bitmap = calloc (1, fcn_size);
i... |
<vulnerable_code> /* Hyperlink ends with \7 or ESC-backslash. */
if (ch == '\7')
return ANSI_END;
if (pansi->prev_esc && ch == '\\')
return ANSI_END;
pansi->prev_esc = (ch == ESC);
return ANSI_MID;
}<commit_title>[PATCH] End OSC8 hyperlink on invalid embedded escape sequence.<commit_description><fixed_c... |
<vulnerable_code> # Process the parameters.
profile_form = UserProfileForm(email=self.app.currentuser.email)
password_form = UserPasswordForm()
if action == "set_profile_info":
self._handle_set_profile_info(action, profile_form)
elif action == "set_password":
... |
<vulnerable_code> },
autolink: {
order: currOrder++,
match: inlineRegex(/^<([^ >]+:\/[^ >]+)>/),
parse: function(capture, parse, state) {
return {
type: "link",<commit_title>[PATCH] Fix ReDoS with autolink<commit_description>Patterns like <<<<<<<<<<:/:/:/:/:/:/... |
<vulnerable_code> (void) TransformImageColorspace(image,sRGBColorspace,exception);
count=GetNumberColors(image,NULL,exception);
for (bits_per_pixel=1; (one << bits_per_pixel) < count; bits_per_pixel*=2) ;
if (image_info->depth > 100)
bits_per_pixel=image_info->depth-100;
if (bits_per_pixel < 1... |
<vulnerable_code>
ScopedNativeCallFrame newFrame{
runtime, len, *fn, isConstructor, thisVal.getHermesValue()};
for (uint32_t i = 0; i < len; ++i) {
newFrame->getArgRef(i) = argArray->at(runtime, i);
}<commit_title>[PATCH] Added stack overflow check for hermes::vm::<commit_description><fixed_code>
Sco... |
<vulnerable_code> print("caught:", e.name, e.message);
}
//CHECK: caught: RangeError {{.*}}<commit_title>[PATCH] Added stack overflow check for hermes::vm::<commit_description><fixed_code>
print("caught:", e.name, e.message);
}
//CHECK: caught: RangeError {{.*}}
try {
v0 = [1.1];
function v1() {
v1(...v... |
<vulnerable_code> break;
}
title = jsonMessage.getString("message");
contexts.add(new ValidatorNuContext(jsonMessage, uri));
}<commit_title>[PATCH] Escape HTML in messages extracted from Validator NU output<commit_description>Fix XSS risk<fixed_code>
break;
}
... |
<vulnerable_code> req.session = { id: '1' };
req.session['passport'] = {};
req.session['passport'].user = '1';
req.session.regenerate = function(cb) {
req.session = { id: '2' };
process.nextTick(cb);
}
var error;
req.session = { id: '1' };
req... |
<vulnerable_code>
static void lsr_read_extend_class(GF_LASeRCodec *lsr, char **out_data, u32 *out_len, const char *name)
{
u32 len;
GF_LSR_READ_INT(lsr, len, lsr->info->cfg.extensionIDBits, "reserved");
len = lsr_read_vluimsbf5(lsr, "len");
// while (len) gf_bs_read_int(lsr->bs, 1);
gf_bs_read_long_int(lsr->bs, len... |
<vulnerable_code> The directory entry contains an offset.
*/
offset=(ssize_t) ReadProfileLong(endian,q+8);
if ((size_t) (offset+number_bytes) > length)
continue;
if (~length < number_bytes)
continue; /* prevent overflow */<commit_title>[PATCH]... |
<vulnerable_code><commit_title>[PATCH] Merge pull request from GHSA-8cf7-32gw-wr33<commit_description>* Check if node version supports asymmetricKeyDetails
* Validate algorithms for ec key type
* Rename variable
* Rename function
* Add early return for symmetric keys
* Validate algorithm for RSA key type
* Valida... |
<vulnerable_code>var jwt = require('../index');
var PS_SUPPORTED = require('../lib/psSupported');
var fs = require('fs');
var path = require('path');
var expect = require('chai').expect;
var assert = require('chai').assert;
var ms = require('ms');
function loadKey(filename) {
return fs.readFileSync(path.join(__dirn... |
<vulnerable_code><commit_title>[PATCH] Merge pull request from GHSA-8cf7-32gw-wr33<commit_description>* Check if node version supports asymmetricKeyDetails
* Validate algorithms for ec key type
* Rename variable
* Rename function
* Add early return for symmetric keys
* Validate algorithm for RSA key type
* Valida... |
<vulnerable_code>var jwt = require('../index');
var jws = require('jws');
var fs = require('fs');
var path = require('path');
var sinon = require('sinon');
var JsonWebTokenError = require('../lib/JsonWebTokenError');
var assert = require('chai').assert;
var expect = require('chai').expect;
describe('verify', function... |
<vulnerable_code> u32_t conn_offset_us;
u32_t rx_ready_delay;
u32_t ticker_status;
if (IS_ENABLED(CONFIG_BT_CTLR_CHAN_SEL_2)) {
node_rx = packet_rx_reserve_get(4);
#endif
/* Stop Advertiser */
ticker_status = ticker_stop(RADIO_TICKER_INSTANCE_ID_RADIO,
RADIO_TICKER_USER_ID_WORKER,
RADI... |
<vulnerable_code> C(TOO_MANY_PREDS, "Too many terms in predicate expression"), \
C(INVALID_FILTER, "Meaningless filter expression"), \
C(IP_FIELD_ONLY, "Only 'ip' field is supported for function trace"), \
C(INVALID_VALUE, "Invalid value (did you forget quotes)?"),
#undef C
#define C(a, b) FILT_ERR_##a
goto out_... |
<vulnerable_code>{
lockdep_assert_irqs_disabled();
if (softirq_count() == (cnt & SOFTIRQ_MASK))
trace_softirqs_on(_RET_IP_);
preempt_count_sub(cnt);
}
/*<commit_title>[PATCH 3/5] tracing: Use swap macro in update_max_tr<commit_description>Make use of the swap macro and remove unnecessary variable _buf_.
This mak... |
<vulnerable_code>void
update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu)
{
struct ring_buffer *buf;
if (tr->stop_count)
return;
arch_spin_lock(&tr->max_lock);
buf = tr->trace_buffer.buffer;
tr->trace_buffer.buffer = tr->max_buffer.buffer;
tr->max_buffer.buffer = buf;
__update_max_tr(t... |
<vulnerable_code> case MESSAGE_UPDATE: {
if (!ndo->ndo_vflag) {
ND_PRINT((ndo, " update"));
if(len < 1)
ND_PRINT((ndo, "/truncated"));
else
ND_PRINT((ndo, "%s%s%s",<commit_title>[PATCH] (for 4.9.3) CVE-2018-14470/... |
<vulnerable_code> options.mode = OSTREE_REPO_CHECKOUT_MODE_USER;
options.overwrite_mode = OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES;
options.enable_fsync = FALSE; /* We checkout to a temp dir and sync before moving it in place */
if (!ostree_repo_checkout_at (self->repo, &options,
... |
<vulnerable_code> }
else if (local_pull)
{
if (!ostree_repo_remote_get_url (flatpak_dir_get_repo (system),
arg_origin,
&url,
g_main_context_push_thread_default (main_context);
if (!flatpak_dir_pull (system, arg_ori... |
<vulnerable_code> if ((tbl->row + rowspan) >= tbl->max_rowsize)
check_row(tbl, tbl->row + rowspan);
}
if (parsedtag_get_value(tag, ATTR_COLSPAN, &colspan)) {
if ((tbl->col + colspan) >= MAXCOL) {
/* Can't expand column */
colspan = MAXCOL - tbl->col;
}
}
if (parsedtag_get_value(tag, ATTR_ALIGN, ... |
<vulnerable_code> let match = this.rules.inline.emStrong.lDelim.exec(src);
if (!match) return;
if (match[3] && prevChar.match(/[\p{L}\p{N}]/u)) return; // _ can't be be between two alphanumerics. \p{L}\p{N} includes non-english alphabet/numbers as well
const nextChar = match[1] || match[2] || '';
<comm... |
<vulnerable_code>
import tempfile, os, subprocess
file = tempfile.mktemp()
# Build ghostscript command
command = ["gs",<commit_title>[PATCH] Removed tempfile.mktemp, fixes CVE-2014-1932 CVE-2014-1933,<commit_description><fixed_code>
import tempfile, os, subprocess
out_fd, file = tempfile.mks... |
<vulnerable_code> self.readonly = 0
def _dump(self, file=None, format=None):
import tempfile
if not file:
file = tempfile.mktemp()
self.load()
if not format or format == "PPM":
self.im.save_ppm(file)
else:
file = file + "." + format... |
<vulnerable_code> self.fp.seek(offset)
# Copy image data to temporary file
outfile = tempfile.mktemp()
o = open(outfile, "wb")
if encoding == "raw":
# To simplify access to the extracted file,
# prepend a PPM header<commit_title>[PATCH] Removed tempfile.mk... |
<vulnerable_code> # ALTERNATIVE: handle JPEGs via the IJG command line utilities
import tempfile, os
file = tempfile.mktemp()
os.system("djpeg %s >%s" % (self.filename, file))
try:
self.im = Image.core.open_ppm(file)
finally:
try: os.unlink(file)
... |
<vulnerable_code> u8 *start;
u32 pck_size, remain, prev_pck_size;
u64 cts;
restart:
cts = GF_FILTER_NO_TS;
cts = GF_FILTER_NO_TS;
}
if (!ctx->in_seek) {
dst_pck = gf_filter_pck_new_alloc(ctx->opid, ctx->hdr.framesize, &output);
if (!dst_pck) return GF_OUT_OF_MEM;
if (ctx->src_pck) gf_filter_p... |
<vulnerable_code> return NULL;
}
if (!(exp->ex_layout_types & (1 << layout_type))) {
dprintk("%s: layout type %d not supported\n",
__func__, layout_type);
return NULL;<commit_title>[PATCH] nfsd: fix undefined behavior in nfsd4_layout_verify<commit_description>UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:... |
<vulnerable_code> for (i=0; i<count; i++) {
GF_AVCConfigSlot *sl = (GF_AVCConfigSlot *) gf_malloc(sizeof(GF_AVCConfigSlot));
sl->size = gf_bs_read_u16(bs);
sl->data = (char *)gf_malloc(sizeof(char) * sl->size);
gf_bs_read_data(bs, sl->data, sl->size);
gf_list_add(ptr->config->sequenceParameterSets, sl);
for ... |
<vulnerable_code> Author author,
CommitMessageDto commitMessage,
@RequestConverter(ChangesRequestConverter.class) Iterable<Change<?>> changes) {
checkMirrorLocalRepo(repository, changes);
final long commitTimeMillis = System.currentTimeMillis();
return push(co... |
<vulnerable_code>
import static com.google.common.base.MoreObjects.firstNonNull;
import static com.linecorp.centraldogma.common.Author.SYSTEM;
import static com.linecorp.centraldogma.server.internal.thrift.Converter.convert;
import static com.linecorp.centraldogma.server.storage.project.Project.isReservedRepoName;
impo... |
<vulnerable_code> }
stat(options->in_file, &filestats);
plist_entire = (char *) malloc(sizeof(char) * (filestats.st_size + 1));
read_size = fread(plist_entire, sizeof(char), filestats.st_size, iplist);
fclose(iplist);<commit_title>[PATCH] plistutil: Prevent OOB heap buffer read by checking input<com... |
<vulnerable_code> if(!scratch || data->set.crlf) {
oldscratch = scratch;
scratch = newscratch = malloc(2 * data->set.buffer_size);
if(!newscratch) {
failf(data, "Failed to alloc scratch buffer!");
return CURLE_OUT_OF_MEMORY;
}
}
/* Have we already sent part of the EOB? */
eob_sent ... |
<vulnerable_code>
return conn;
}<commit_title>[PATCH] tls: clear data after a starttls acknowledgement<commit_description>After a starttls acknowledgement message, clear the buffers of any
incoming data / commands. This will ensure that all future data is
handled securely.
Co-authored-by: Pietro Cerutti <gahr@gahr.... |
<vulnerable_code>{
int rc;
rc = cmd_start(adata, cmdstr, flags);
if (rc < 0)
{
do
{
rc = imap_cmd_step(adata);
} while (rc == IMAP_RES_CONTINUE);
mutt_sig_allow_interrupt(false);
<commit_title>[PATCH] tls: clear data after a starttls acknowledgement<commit_description>After a starttls acknowledgeme... |
<vulnerable_code> }
if (ans == MUTT_YES)
{
enum ImapExecResult rc = imap_exec(adata, "STARTTLS", IMAP_CMD_NO_FLAGS);
if (rc == IMAP_EXEC_FATAL)
goto bail;
if (rc != IMAP_EXEC_ERROR)<commit_title>[PATCH] tls: clear data after a starttls acknowledgement<commit_descriptio... |
<vulnerable_code> {
return nntp_connect_error(adata);
}
if (!mutt_str_startswith(buf, "382", CASE_MATCH))
{
adata->use_tls = 0;<commit_title>[PATCH] tls: clear data after a starttls acknowledgement<commit_description>After a starttls acknowledgement message, clear the buffers of a... |
<vulnerable_code> {
mutt_str_strfcpy(buf, "STLS\r\n", sizeof(buf));
rc = pop_query(adata, buf, sizeof(buf));
if (rc == -1)
goto err_conn;
if (rc != 0)<commit_title>[PATCH] tls: clear data after a starttls acknowledgement<commit_description>After a starttls acknowledgement message, cle... |
<vulnerable_code> if (mutt_socket_send(conn, "STARTTLS\r\n") < 0)
return SMTP_ERR_WRITE;
rc = smtp_get_resp(conn);
if (rc != 0)
return rc;
<commit_title>[PATCH] tls: clear data after a starttls acknowledgement<commit_description>After a starttls acknowledgement message, clear the buffers of any
i... |
<vulnerable_code> * if a user is not allowed to login. is this an
* issue? -markus
*/
debug_f("options.pubkey_disable_pk_check %d", options.pubkey_disable_pk_check);
if (options.pubkey_disable_pk_check)
goto done;
if (PRIVSEP(user_key_allowed(ssh, pw, key, 0, NULL))) {
if ((r = sshpkt_start(ssh, SSH... |
<vulnerable_code> PyPDF2._utils.deprecate_no_replacement("foo")
error_msg = "foo is deprecated and will be removed in PyPDF2 3.0.0."
assert exc.value.args[0] == error_msg
read_block_backwards(s, to_read)
@pytest.mark.parametrize(
("dat", "pos", "expected", "expected_pos"),
(b"abc\nd... |
<vulnerable_code>
static char *skip_white(char *s)
{
while(*s)
{
if(*s == '\n' || *s == '\r') return NULL;
if(isspace(*s)) { ++s; continue; }
return s;
}
return NULL;
}
static void read_pnm_header(FILE *reader, struct pnm_header *ph)
{
int format, have_wh, end, ttype;
ch... |
<vulnerable_code> q->state = state;
if (q->question_utf8 && state == DNS_TRANSACTION_SUCCESS && set_size(q->manager->varlink_subscription) > 0)
(void) send_dns_notification(q->manager, q->answer, dns_question_first_name(q->question_utf8));
dns_query_stop(q);
if (q->compl... |
<vulnerable_code> return sendmsg_loop(fd, &mh, 0);
}
int send_dns_notification(Manager *m, DnsAnswer *answer, const char *query_name) {
_cleanup_free_ char *normalized = NULL;
DnsResourceRecord *rr;
int ifindex, r;<commit_title>[PATCH] =?UTF-8?q?resolved:=20rename=20'notification'=20=E2=... |
<vulnerable_code> return 1;
}
static int varlink_notification_server_init(Manager *m) {
_cleanup_(varlink_server_unrefp) VarlinkServer *server = NULL;
int r;
assert(m);
if (!m->enable_varlink_notifications || m->varlink_notification_server)
return 0;
r ... |
<vulnerable_code> key = (hfs_btree_key_cat *) & node[rec_off];
keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len);
if ((keylen) > nodesize) {
tsk_error_set_errno(TSK_ERR_FS_GENFS);
tsk_error_set_errstr
... |
<vulnerable_code> tsk_error_set_errno(TSK_ERR_FS_GENFS);
tsk_error_set_errstr
("hfs_cat_traverse: length of key %d in index node %d too large (%d vs %"
PRIu16 ")", rec, cur_node, keylen, nodesize);
free(node);
... |
<vulnerable_code>
keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len);
if (keylen > nodesize - rec_off) {
tsk_error_set_errno(TSK_ERR_FS_GENFS);
tsk_error_set_errstr
("hfs_cat_traverse: length of key %... |
<vulnerable_code> {
if(verbose)
D (debug_file, "Match user/token as %s/%s", username, otp_id);
return AUTH_FOUND;
}
}<commit_title>[PATCH] util: make sure to close the authfile before returning<commit_description><fixed_code>
{
if(verbose)
D (debug_file, "Match user/token as %s/%s"... |
<vulnerable_code> AP4_UI32 cts_offset = 0;
AP4_UI64 dts = 0;
AP4_UI32 duration = 0;
result = m_SttsAtom->GetDts(index, dts, &duration);
if (AP4_FAILED(result)) return result;
sample.SetDuration(duration);
sample.SetDts(dts);
if (m_CttsAtom == NULL) {<commit_title>[PATCH] fix for ... |
<vulnerable_code> parsedtag_get_value(tag, ATTR_FID, &form_id);
parsedtag_get_value(tag, ATTR_TOP_MARGIN, &top);
parsedtag_get_value(tag, ATTR_BOTTOM_MARGIN, &bottom);
if (form_id < 0 || form_id > form_max || forms == NULL)
break; /* outside of <form>..</form> */
form = forms[form_id];
if (hseq ... |
<vulnerable_code> interpolationTest1: 'added __toAdd__',
interpolationTest5: 'added __toAddHTML__',
interpolationTest6: 'added __child.oneHTML__',
interpolationTest7: 'added __toAddHTML__ __toAdd__'
}
}
};
expect(i18n.t('interpolationTest6', { child: { one: '<1>'}})).to.b... |
<vulnerable_code> , unEscapingSuffix = 'HTML'+suffix;
var hash = replacementHash.replace && typeof replacementHash.replace === 'object' ? replacementHash.replace : replacementHash;
f.each(hash, function(key, value) {
var nextKey = nestedKey ? nestedKey + o.keyseparator + key : key;
if (typ... |
<vulnerable_code> this.value = value;
}
/**
* Create bin with an object value. This is the slowest of the Bin constructors because the type
* must be determined using multiple "instanceof" checks. If the object type is unrecognized,
* the default java serializer is used.
* <p>
* To disable this constructo... |
<vulnerable_code> */
package com.aerospike.client;
import java.io.ByteArrayOutputStream;
import java.io.ObjectOutputStream;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.List;
*/
public static boolean UseBoolBin = true;
/**
* Should default object serializer be disabled. If true, an exce... |
<vulnerable_code> */
package com.aerospike.client.command;
import java.io.ByteArrayInputStream;
import java.io.ObjectInputStream;
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
case ParticleType.BLOB:
return Arrays.copyOfRange(buf, offset, offset+len);
case Part... |
<vulnerable_code>/*
* Copyright 2012-2021 Aerospike, Inc.
*
* Portions may be licensed to Aerospike, Inc. under one or more contributor
* license agreements WHICH ARE COMPATIBLE WITH THE APACHE LICENSE, VERSION 2.0.
package com.aerospike.client.command;
/**
* Bin type for byte[] values.
*/
public final class Par... |
<vulnerable_code>/*
* Copyright 2012-2021 Aerospike, Inc.
*
* Portions may be licensed to Aerospike, Inc. under one or more contributor
* license agreements WHICH ARE COMPATIBLE WITH THE APACHE LICENSE, VERSION 2.0.
System.arraycopy(buf, offset, blob, 0, len);
return new LuaBytes(this, blob);
case Particle... |
<vulnerable_code>/*
* Copyright 2012-2021 Aerospike, Inc.
*
* Portions may be licensed to Aerospike, Inc. under one or more contributor
* license agreements WHICH ARE COMPATIBLE WITH THE APACHE LICENSE, VERSION 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file e... |
<vulnerable_code>/*
* Copyright 2012-2021 Aerospike, Inc.
*
* Portions may be licensed to Aerospike, Inc. under one or more contributor
* license agreements WHICH ARE COMPATIBLE WITH THE APACHE LICENSE, VERSION 2.0.
return new LuaList(instance, value);
}
@Override
protected LuaValue getJavaBlob(Object value) ... |
<vulnerable_code>
import com.aerospike.client.AerospikeException;
import com.aerospike.client.Value;
import com.aerospike.client.Value.BlobValue;
import com.aerospike.client.cdt.MapOrder;
import com.aerospike.client.command.Buffer;
import com.aerospike.client.command.ParticleType;
packByteArray(b, offset, length);
}... |
<vulnerable_code> */
package com.aerospike.client.util;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.nio.ByteBuffer;
import java.util.AbstractMap;
import java.util.ArrayList;
val = getString(Buffer.utf8ToString(buffer, offset, count));
break;
c... |
<vulnerable_code> "Prepend",
"Batch",
"Generation",
"Serialize",
"Expire",
"Touch",
"StoreKey",<commit_title>[PATCH] CVE-2023-36480 CLIENT-2252 Remove all code that used java<commit_description><fixed_code>
"Prepend",
"Batch",
"Generation",
"Expire",
"Touch",
"StoreKey", |
<vulnerable_code> client.delete(params.writePolicy, key);
List<Value> l1 = new ArrayList<Value>();
l1.add(Value.get(new GregorianCalendar(2018, 1, 1).getTime()));
l1.add(Value.get(1));
List<Value> l2 = new ArrayList<Value>();
l2.add(Value.get(new GregorianCalendar(2018, 1, 2).getTime()));
l2.add(Value.ge... |
<vulnerable_code>/*
* Copyright 2012-2023 Aerospike, Inc.
*
* Portions may be licensed to Aerospike, Inc. under one or more contributor
* license agreements WHICH ARE COMPATIBLE WITH THE APACHE LICENSE, VERSION 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file e... |
<vulnerable_code>import com.aerospike.test.sync.basic.TestPutGet;
import com.aerospike.test.sync.basic.TestReplace;
import com.aerospike.test.sync.basic.TestScan;
import com.aerospike.test.sync.basic.TestSerialize;
import com.aerospike.test.sync.basic.TestServerInfo;
import com.aerospike.test.sync.basic.TestTouch;
impo... |
<vulnerable_code>import com.aerospike.client.Operation;
import com.aerospike.client.Record;
import com.aerospike.client.ResultCode;
import com.aerospike.client.util.Version;
import com.aerospike.test.sync.TestSync;
// Delete record if it already exists.
client.delete(null, key);
Bin bin = new Bin(binName, (Long... |
<vulnerable_code>/*
* Copyright 2012-2023 Aerospike, Inc.
*
* Portions may be licensed to Aerospike, Inc. under one or more contributor
* license agreements WHICH ARE COMPATIBLE WITH THE APACHE LICENSE, VERSION 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file e... |
<vulnerable_code>import org.bouncycastle.crypto.DataLengthException;
import org.bouncycastle.crypto.OutputLengthException;
import org.bouncycastle.crypto.params.KeyParameter;
import org.bouncycastle.util.Pack;
/**
private int C0, C1, C2, C3;
private boolean forEncryption;
private static final ... |
<vulnerable_code> throw new NullPointerException("y value cannot be null");
}
if (dhParams.getQ() != null)
{
if (ONE.equals(y.modPow(dhParams.getQ(), dhParams.getP())))
}
else
{
// TLS check
if (y.compareTo(TWO) < 0 || y.com... |
<vulnerable_code>import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo;
import org.bouncycastle.asn1.x9.DHDomainParameters;
import org.bouncycastle.asn1.x9.DomainParameters;
import org.bouncycastle.asn1.x9.X... |
<vulnerable_code> {
if (keySpec instanceof DHPublicKeySpec)
{
return new BCDHPublicKey((DHPublicKeySpec)keySpec);
}
return super.engineGeneratePublic(keySpec);<commit_title>[PATCH] added better support for DH domain parameters added s box<commit_description><fixed_code>
... |
<vulnerable_code>import org.bouncycastle.crypto.KeyEncoder;
import org.bouncycastle.crypto.agreement.ECDHBasicAgreement;
import org.bouncycastle.crypto.digests.SHA1Digest;
import org.bouncycastle.crypto.engines.AESFastEngine;
import org.bouncycastle.crypto.engines.DESedeEngine;
import org.bouncycastle.crypto.engines.IE... |
<vulnerable_code>import org.bouncycastle.crypto.params.DHParameters;
import org.bouncycastle.crypto.params.DHPrivateKeyParameters;
import org.bouncycastle.crypto.params.DHPublicKeyParameters;
/**
* utility class for converting jce/jca DH objects
PublicKey key)
throws InvalidKeyException
{
... |
<vulnerable_code>import org.bouncycastle.crypto.DataLengthException;
import org.bouncycastle.crypto.InvalidCipherTextException;
import org.bouncycastle.crypto.Mac;
import org.bouncycastle.crypto.engines.AESFastEngine;
import org.bouncycastle.crypto.engines.AESWrapEngine;
import org.bouncycastle.crypto.engines.RFC3211Wr... |
<vulnerable_code>import java.math.BigInteger;
import java.security.AlgorithmParameterGenerator;
import java.security.AlgorithmParameters;
import java.security.Key;
import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.PublicKey;
import java.security.S... |
<vulnerable_code> int indent, // indent for inside conditionals
int clear_ccline) // clear ccline first
{
int c;
int i;
int j;
int cmdline_type;
int wild_type;
if (ccline.cmdbuff != NULL)
{
// Being called recursively. Since ccline is global, we need to save
if (init_cc... |
<vulnerable_code>
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4974,
/**/<commit_title>[PATCH] patch 8.2.4975: recursive command line loop may cause a crash<commit_description>Problem: Recursive command line loop may cause a crash.
Solution: Limit recursion of getcmdline(... |
<vulnerable_code>}
function addClient() {
var ip = $("#select").val().trim();
var comment = utils.escapeHtml($("#new_comment").val());
utils.disableAll();
function deleteClient() {
var tr = $(this).closest("tr");
var id = tr.attr("data-id");
var ip = tr.find("#ip_" + id).text();
var name = utils.escapeH... |
<vulnerable_code><commit_title>[PATCH 8/8] Update gcp.rst (#33420)<commit_description>* Update gcp.rst
three options to connect to GCP not the initial specified two
* Update docs/apache-airflow-providers-google/connections/gcp.rst<fixed_code>
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more co... |
<vulnerable_code><commit_title>[PATCH 8/8] Update gcp.rst (#33420)<commit_description>* Update gcp.rst
three options to connect to GCP not the initial specified two
* Update docs/apache-airflow-providers-google/connections/gcp.rst<fixed_code>
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more co... |
<vulnerable_code><commit_title>[PATCH 8/8] Update gcp.rst (#33420)<commit_description>* Update gcp.rst
three options to connect to GCP not the initial specified two
* Update docs/apache-airflow-providers-google/connections/gcp.rst<fixed_code>
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more co... |
<vulnerable_code># under the License.
from __future__ import annotations
from functools import cached_property
from flask import flash, g
from flask_appbuilder.const import AUTH_DB, AUTH_LDAP, AUTH_OAUTH, AUTH_OID, AUTH_REMOTE_USER
from flask_babel import lazy_gettext
from flask_jwt_extended import JWTManager
from fl... |
<vulnerable_code># mypy: disable-error-code=var-annotated
from __future__ import annotations
import base64
import datetime
import json
import logging
from typing import Any
from uuid import uuid4
from flask_appbuilder.const import (
AUTH_DB,
AUTH_LDAP,
AUTH_OAUTH,
AUTH_OID,
LOGMSG_ERR_SEC_ADD_REGIS... |
<vulnerable_code>from __future__ import annotations
import logging
import uuid
from flask_appbuilder import const as c
from flask_appbuilder.models.sqla import Base
from flask_appbuilder.models.sqla.interface import SQLAInterface
from sqlalchemy import and_, func, inspect, literal
from sqlalchemy.orm.exc import Multi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.