text stringlengths 79 3.72M |
|---|
<vulnerable_code> attach_accept->esm_message_container.length = esmbuf->len;
ogs_debug(" %s GUTI[G:%d,C:%d,M_TMSI:0x%x] IMSI:[%s]",
mme_ue->guti_present ? "[V]" : "[N]",
mme_ue->guti.mme_gid, mme_ue->guti.mme_code,
mme_ue->guti.m_tmsi, mme_ue->imsi_bcd);
if (mme_ue->gu... |
<vulnerable_code> ? mme_ue->imsi_bcd : "Unknown");
break;
default:
ogs_warn("Not implemented[%d]",
eps_mobile_identity->imsi.type);
return OGS_OK;
}<commit_title>[PATCH 1/7] mask mongo credentials when logging (#827)<commit_description><fixed_... |
<vulnerable_code> break;
case OGS_NAS_EPS_ATTACH_REQUEST:
ogs_info("Attach request");
rv = emm_handle_attach_request(
mme_ue, &message->emm.attach_request, e->pkbuf);
if (rv != OGS_OK) {
if (!ACTIVE_EPS_BEARERS_IS_AVAIABLE(mme_ue))... |
<vulnerable_code> return ogs_pool_cycle(&enb_ue_pool, enb_ue);
}
static int mme_ue_new_guti(mme_ue_t *mme_ue)
{
served_gummei_t *served_gummei = NULL;
ogs_hash_set(self.guti_ue_hash,
&mme_ue->guti, sizeof(ogs_nas_eps_guti_t), mme_ue);
return OGS_OK;
}
static bool compare_ue_info(mme_sgw_t... |
<vulnerable_code>
switch (type) {
case OGS_GTP_DELETE_SESSION_REQUEST_TYPE:
enb_ue = enb_ue_cycle(mme_ue->enb_ue);
if (enb_ue) {
s1ap_send_ue_context_release_command(enb_ue,<commit_title>[PATCH 1/7] mask mongo credentials when logging (#827)<commit_description><fixed_code>
switc... |
<vulnerable_code> test_ue_remove(test_ue);
}
abts_suite *test_guti(abts_suite *suite)
{
suite = ADD_SUITE(suite)
abts_run_test(suite, test1_func, NULL);
return suite;
}<commit_title>[PATCH 1/7] mask mongo credentials when logging (#827)<commit_description><fixed_code>
test_ue_remove(test_ue);
}
s... |
<vulnerable_code>
/* Send TAU Request */
memset(&test_ue->tau_request_param, 0, sizeof(test_ue->tau_request_param));
test_ue->tau_request_param.ciphered = 1;
test_ue->tau_request_param.ue_network_capability = 1;
test_ue->tau_request_param.last_visited_registered_tai = 1;
/* Send TAU Request */
... |
<vulnerable_code> return test_nas_eps_security_encode(test_ue, &message);
}
ogs_pkbuf_t *testemm_build_detach_request(test_ue_t *test_ue, bool switch_off)
{
ogs_nas_eps_message_t message;
ogs_assert(test_ue);
memset(&message, 0, sizeof(message));
if (test_ue->tau_request_param.ciphered) {
m... |
<vulnerable_code>
testemm_send_to_esm(test_ue, &attach_accept->esm_message_container);
}<commit_title>[PATCH 1/7] mask mongo credentials when logging (#827)<commit_description><fixed_code>
testemm_send_to_esm(test_ue, &attach_accept->esm_message_container);
}
void testemm_handle_tau_accept(test_ue_t *test_ue,... |
<vulnerable_code> case OGS_NAS_EPS_SERVICE_REJECT:
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT:
break;
case OGS_NAS_EPS_EMM_INFORMATION:
break;<commit_title>[PATCH 1/7] mask mongo credentials when logging (#827)<commit_description><fixed_code>
case OGS_NAS_EPS_SERVICE_REJE... |
<vulnerable_code>
/* Send TAU Request */
memset(&test_ue->tau_request_param, 0, sizeof(test_ue->tau_request_param));
test_ue->tau_request_param.ue_network_capability = 1;
test_ue->tau_request_param.last_visited_registered_tai = 1;
test_ue->tau_request_param.drx_parameter = 1;<commit_title>[PATCH 1/7... |
<vulnerable_code> rv = testgnb_ngap_send(ngap, sendbuf);
ABTS_INT_EQUAL(tc, OGS_OK, rv);
/* GUTI Not Present
* SKIP Send Registration complete */
/* SKIP Receive Configuration update command */
/* Send PDU session establishment request */
sess = test_sess_add_by_dnn_and_psi(test_ue, "inter... |
<vulnerable_code> ];
var typesColumns = [
{text: t("key"), sortable: true, dataIndex: 'key', flex: 1, editable: false, filter: 'string'},
{text: t("type"), sortable: true, dataIndex: 'type', width: 100, editor: new Ext.form.ComboBox({
triggerAction: 'all',
... |
<vulnerable_code> List<String> list = Arrays.asList(strings);
BaseProperty prop = newProperty();
fromList(prop, list, true);
return prop;
}
/**
* @param value a group string reference
* @param context the XWiki context<commit_title>[PATCH] XWIKI-15776: The groups displ... |
<vulnerable_code>package com.xpn.xwiki.objects.classes;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.apache.ecs.xhtml.input;
import org.apache.ecs.xhtml.option;
import org.apache... |
<vulnerable_code><commit_title>[PATCH] XWIKI-15776: The groups displayer store values with a coma at<commit_description><fixed_code>
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* ... |
<vulnerable_code>import com.xpn.xwiki.XWikiException;
import com.xpn.xwiki.objects.BaseCollection;
import com.xpn.xwiki.objects.BaseProperty;
import com.xpn.xwiki.user.api.XWikiRightService;
import com.xpn.xwiki.web.XWikiRequest;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mo... |
<vulnerable_code>package com.xpn.xwiki.objects.classes;
import java.util.Arrays;
import java.util.Map;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* Unit tests for {@link ListClass}.
assertEquals(Arrays.asList("a", "b", "", "c", ""), ListClass.getList... |
<vulnerable_code>import java.util.List;
import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
import org.xwiki.model.reference.DocumentReferenceResolver;
import org.xwiki.model.reference.EntityReferenceResolver;
import org.xwiki.model.reference.EntityReferenceSerializer;
import org.xwiki.test.mockito.Moc... |
<vulnerable_code> }
while (true) {
key = keys[t];
if (banPrototypeModifications && key == '__proto__') {
throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag ... |
<vulnerable_code> var oldVal = mirror[key];
if (helpers_js_1.hasOwnProperty(obj, key) && !(obj[key] === undefined && oldVal !== undefined && Array.isArray(obj) === false)) {
var newVal = obj[key];
if (typeof oldVal == "object" && oldVal != null && typeof newVal == "object" && newV... |
<vulnerable_code> if (out_packet->capabilities & TRILOGY_CAPABILITIES_SECURE_CONNECTION && auth_data_len > 8) {
uint8_t remaining_auth_data_len = auth_data_len - 8;
if (remaining_auth_data_len > 13) {
remaining_auth_data_len = 13;
}
CHECKED(trilogy_reader_copy_buffer(&re... |
<vulnerable_code> this._dashes = 0;
this._parts = 0;
this._finished = false;
this._realFinish = false;
this._isPreamble = true;
this._justMatched = false;
this._firstWrite = true;
inherits(Dicer, WritableStream);
Dicer.prototype.emit = function(ev) {
if (ev === 'finish' && !this._realFinish) {
if (!... |
<vulnerable_code> # If there are more documents available?
return self.check_node()
def get_data(self):
# Construct and return the next document.
if self.check_node():
SafeConstructor.construct_undefined)
class FullConstructor(SafeConstructor):
def construct_python_str(... |
<vulnerable_code> struct archive_write_disk *a = (struct archive_write_disk *)_a;
struct fixup_entry *next, *p;
struct stat st;
int fd, ret;
archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
while (p != NULL) {
fd = -1;
a->pst = NULL; /* Mark stat cache as out-of-date. */
if (p->fixup &
(TODO... |
<vulnerable_code> /*
* Create a file
*/
assertMakeFile("victim", 0600, "a");
/*
* Create a directory and a symlink with the same name
*/
/* Directory: dir */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "dir");
archive_entry_set_mode(ae, AE_IFDIR | 060... |
<vulnerable_code>
//then get the break
i = 0;
while ( (tmpName[i] != 0) && (i < to_read) ) {
i++;
}
//check the data is consistent<commit_title>[PATCH] fixed 2 possible heap overflows (inc. #1088)<commit_description><fixed_code>
//then get the break
i = 0;
while ( (i < to_read) && (tmpName[i] != 0) ) {
i++... |
<vulnerable_code>{
GF_HandlerBox *p = (GF_HandlerBox *)a;
gf_isom_box_dump_start(a, "HandlerBox", trace);
if (p->nameUTF8 && (u32) p->nameUTF8[0] == strlen(p->nameUTF8+1)) {
fprintf(trace, "hdlrType=\"%s\" Name=\"%s\" ", gf_4cc_to_str(p->handlerType), p->nameUTF8+1);
} else {
fprintf(trace, "hdlrType=\"%s\" Nam... |
<vulnerable_code> from: 'Daemon <deamon@kreata.ee>',
to: 'mailer@kreata.ee, Mailer <mailer2@kreata.ee>'
},
text: 'Test\n 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ö\r\nsage',
newline: '\r\n'
};
<commit_title>[PATCH] v6.6.1<commit_... |
<vulnerable_code> address.address = this._normalizeAddress(address.address);
if (!address.name) {
values.push(address.address);
} else if (address.name) {
values.push(this._encodeAddressName(address.name) + ' <' + address.address + ... |
<vulnerable_code># https://pythonhosted.org/Flask-Mail/
# https://github.com/mattupstate/flask-mail/blob/1709c70d839a7cc7b1f7eeb97333b71cd420fe32/flask_mail.py#L239
from flask_mail import Mail, Message
app = Flask(__name__)<commit_title>[PATCH] Move tests and qlref to test/<commit_description><fixed_code>
# https://p... |
<vulnerable_code><commit_title>[PATCH] Move tests and qlref to test/<commit_description><fixed_code>
|
<vulnerable_code>};
function ctorName(val) {
return val.constructor ? val.constructor.name : null;
}
function isArray(val) {<commit_title>[PATCH] fix type checking vul in ctorName<commit_description><fixed_code>
};
function ctorName(val) {
return val.constructor && typeof val.constructor === 'function' ? val.con... |
<vulnerable_code>from threading import Thread
from unittest.mock import patch
import pytest
from airflow.config_templates import airflow_local_settings
from airflow.jobs.triggerer_job import TriggererJob, TriggerRunner, setup_queue_listener
from airflow.logging_config import configure_logging
from airflow.models impo... |
<vulnerable_code>}
#endif
static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
char
page_geometry[MaxTextExtent];
MagickOffsetType
offset;
MngInfo
*mng_info;
MngBox
default_fb,
fb,
default_fb.left=0;
default_fb.right=0;
/* Open image file. */
asser... |
<vulnerable_code> for (i = 0; i < (int)section->num_pages; i++)
{
r2007_section_page *section_page = section->pages[i];
page = get_page (pages_map, section_page->id);
if (page == NULL)
{
LOG_TRACE ("\n")
section->type = dwg_section_wtype (section->name);
if (section->nu... |
<vulnerable_code> def substitute(self, txt):
return Template(txt).safe_substitute(self.template_substitutions)
def format_details(self, replace=False):
env = self.environment
<commit_title>[PATCH] framework: get rid of commands.getstatusoutput()<commit_description><fixed_code>
def substitute... |
<vulnerable_code> struct pxa3xx_gcu_batch *buffer;
struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file);
int words = count / 4;
/* Does not need to be atomic. There's a lock in user space,
* but anyhow, this is just for statistics. */<commit_title>[PATCH] video: fbdev: pxa3xx-gcu: Fix integer overflow in<comm... |
<vulnerable_code> * Read or set the default keyring in which request_key() will cache keys and
* return the old setting.
*
* If a process keyring is specified then this will be created if it doesn't
* yet exist. The old setting will be returned if successful.
*/
long keyctl_set_reqkey_keyring(int reqkey_defl)
{
... |
<vulnerable_code>}
/*
* Install a fresh thread keyring directly to new credentials. This keyring is
* allowed to overrun the quota.
*/
int install_thread_keyring_to_cred(struct cred *new)
{
struct key *keyring;
keyring = keyring_alloc("_tid", new->uid, new->gid, new,
KEY_POS_ALL | KEY_USR_VIEW,
KEY_ALLO... |
<vulnerable_code> if (!url.startsWith('data:image/')) {
url = url.slice(0, -1);
}
popupHtml = '<it class="fa fa-spin fa-spinner" style="font-size: xx-large; color: white; position: fixed; left: 50%; top: 50%;"></it>'
popupHtml += '<img class="screenshot_box-content hidden" src="' + url + '" id="s... |
<vulnerable_code> "WebComponent: Vaadin.EmailFieldElement#2.3.0-alpha8",
"Flow#1.3-SNAPSHOT" })
@Tag("vaadin-email-field")
@NpmPackage(value = "@vaadin/vaadin-text-field", version = "2.8.1")
@JsModule("@vaadin/vaadin-text-field/src/vaadin-email-field.js")
public abstract class GeneratedVaadinEmailField<R... |
<vulnerable_code> "WebComponent: Vaadin.NumberFieldElement#2.3.0-alpha8",
"Flow#1.3-SNAPSHOT" })
@Tag("vaadin-number-field")
@NpmPackage(value = "@vaadin/vaadin-text-field", version = "2.8.1")
@JsModule("@vaadin/vaadin-text-field/src/vaadin-number-field.js")
public abstract class GeneratedVaadinNumberFie... |
<vulnerable_code> "WebComponent: Vaadin.PasswordFieldElement#2.3.0-alpha8",
"Flow#1.3-SNAPSHOT" })
@Tag("vaadin-password-field")
@NpmPackage(value = "@vaadin/vaadin-text-field", version = "2.8.1")
@JsModule("@vaadin/vaadin-text-field/src/vaadin-password-field.js")
public abstract class GeneratedVaadinPas... |
<vulnerable_code> "WebComponent: Vaadin.TextAreaElement#2.3.0-alpha8",
"Flow#1.3-SNAPSHOT" })
@Tag("vaadin-text-area")
@NpmPackage(value = "@vaadin/vaadin-text-field", version = "2.8.1")
@JsModule("@vaadin/vaadin-text-field/src/vaadin-text-area.js")
public abstract class GeneratedVaadinTextArea<R extends... |
<vulnerable_code> "WebComponent: Vaadin.TextFieldElement#2.3.0-alpha8",
"Flow#1.3-SNAPSHOT" })
@Tag("vaadin-text-field")
@NpmPackage(value = "@vaadin/vaadin-text-field", version = "2.8.1")
@JsModule("@vaadin/vaadin-text-field/src/vaadin-text-field.js")
public abstract class GeneratedVaadinTextField<R ext... |
<vulnerable_code>package com.vaadin.flow.component.checkbox.tests;
import com.vaadin.flow.component.checkbox.CheckboxGroup;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.router.Route;
group.select("bar");
group.setItemEnabledProvider(item -> !"bar".equals(item))... |
<vulnerable_code> Assert.assertEquals(Boolean.TRUE.toString(),
checkboxes.get(1).getAttribute("checked"));
}
}<commit_title>[PATCH] add regression tests<commit_description><fixed_code>
Assert.assertEquals(Boolean.TRUE.toString(),
checkboxes.get(1).getAttribute("checked... |
<vulnerable_code>import typing
import flask
app = flask.Flask("xmpp-http-upload")
app.config.from_envvar("XMPP_HTTP_UPLOAD_CONFIG")
CORS(app)
def sanitized_join(path: str, root: pathlib.Path) -> pathlib.Path:
result = (root / path).absolute()
if not str(result).startswith(str(root) + "/"):
raise... |
<vulnerable_code>#ifdef HAVE_GETSPNAM
struct spwd *usersp;
#endif
// This call is needed to get the uid
if ((user = getpwnam(username)) == NULL)
user_password = user->pw_passwd;
#endif
if (strcmp(user_password, (char *) crypt(password, user_password)) != 0)
{
pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE, "Authentic... |
<vulnerable_code>#include "utils.h"
#include "network.h"
static void usage(char *me, bool fail)
{
fprintf(stderr, "Usage: %s lxcpath name pid type bridge nicname\n", me);
}
#define VETH_DEF_NAME "eth%d"
static int rename_in_ns(int pid, char *oldname, char **newnamep)
{
int fd = -1, ofd = -1, ret, ifindex = -1;
bo... |
<vulnerable_code> }
}
if (dialect == "postgres") {
// http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS
val = val.replace(/'/g, "''");
} else {
val = val.replace(/[\0\n\r\b\t\\\'\"\x1a]/g, function(s) {<commit_title>[PATCH] Fix string escaping for sqlite<commit_d... |
<vulnerable_code> return C_OK;
}
int is_write_command = (c->cmd->flags & CMD_WRITE) ||
(c->cmd->proc == execCommand && (c->mstate.cmd_flags & CMD_WRITE));
int is_denyoom_command = (c->cmd->flags & CMD_DENYOOM) ||
c->cmd->proc != discardCommand &&
c->cmd... |
<vulnerable_code>#define IDLE_THRESHOLD 0 // Number of idle codewords allowed in data section
#define CAPCODES_INDEX 0
#define DEMOD_TIMEOUT 100 // Maximum number of periods with no zero crossings before we decide that the system is not longer within a Timing lock.
#define PHASE... |
<vulnerable_code> appbuilder_parent_dir = os.path.join(
os.path.dirname(os.path.abspath(__file__)), os.pardir
)
appbuilder_translations_path = os.path.join(appbuilder_parent_dir, "translations")
if "BABEL_TRANSLATION_DIRECTORIES" in app.config:
current_translation_... |
<vulnerable_code>
self.base_template = app.config.get("FAB_BASE_TEMPLATE", self.base_template)
self.static_folder = app.config.get("FAB_STATIC_FOLDER", self.static_folder)
self.static_url_path = app.config.get("FAB_STATIC_URL_PATH", self.static_url_path)
_index_view = app.config.get("FAB... |
<vulnerable_code>} );
function delete_api(id, name, item)
{
var delAPI = 'delete/'+id;
swal.queue([{
title: 'Are you sure you want to delete '+ jsEscape(name) +'?',
text: "You won't be able to revert this!",
type: 'warning',
showCancelButton: true,<commit_title>[PATCH] Fixed #4... |
<vulnerable_code> continue;
}
if (literal_pool_flags != SCANNER_LITERAL_POOL_FUNCTION)
{
scanner_raise_error (context_p);
}<commit_title>[PATCH] Fix async identifier parsing in class field position<commit_description>This patch fixes #4927
JerryScript-DCO... |
<vulnerable_code><commit_title>[PATCH] fix(gatsby): don't serve codeframes for files outside of<commit_description><fixed_code>
const cwd = Cypress.config(`projectRoot`)
describe(`overlay handlers don't serve unrelated files`, () => {
it(`__file-code-frame`, () => {
cy.request(
`__file-code-frame?filePath=... |
<vulnerable_code>
nla_for_each_nested(nla, info->attrs[NLBL_CIPSOV4_A_TAGLST], nla_rem)
if (nla->nla_type == NLBL_CIPSOV4_A_TAG) {
if (iter > CIPSO_V4_TAG_MAXCNT)
return -EINVAL;
doi_def->tags[iter++] = nla_get_u8(nla);
}
if (iter < CIPSO_V4_TAG_MAXCNT)
doi_def->tags[iter] = CIPSO_V4_TAG_INVALID;
re... |
<vulnerable_code>rfbEncryptBytes(char *bytes, char *passwd)
{
char key[24];
char passwd_hash[20];
char passwd_hash_text[40];
void *des;
void *sha1;
int len;
int passwd_bytes;
/* create password hash from password */
(tui8)passwd_hash[2], (tui8)passwd_hash[3]);
passwd_... |
<vulnerable_code> self->mod->mod_set_param(self->mod, "hostname", name);
g_snprintf(text, 255, "%d", self->wm->session->client_info->keylayout);
self->mod->mod_set_param(self->mod, "keylayout", text);
self->mod->mod_set_param(self->mod, "guid", (char*)guid);
for (i = 0; i < self-... |
<vulnerable_code> /*
Probe hash table.
*/
index=(IndexPacket) ((size_t) GetPixelIndex(indexes+x) & 0xff);
p++;
k=(ssize_t) (((size_t) index << (MaxGIFBits-8))+waiting_code);
if (k >= MaxHashTable)
k-=MaxHashTable;
next_pixel=MagickFalse;
displacement=1;
... |
<vulnerable_code> progress=0;
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static) shared(progress,status) \
magick_number_threads(images,complex_images,images->rows,1L)
#endif
for (y=0; y < (ssize_t) images->rows; y++)
{
register const PixelPacket
*magick_restrict Ai,
... |
<vulnerable_code> * @param {object} [options]
* @param {number} [options.saltLength=8] The string length of the salt
* @param {number} [options.secretLength=18] The byte length of the secret key
* @public
*/
<commit_title>[PATCH] Added docs for validity<commit_description><fixed_code>
* @param {object} [options]
... |
<vulnerable_code> "allocated %zu\n",
(size_t)data->size, (size_t)data->allocated);
rc = TPM_RC_SIZE;
}
}
<commit_title>[PATCH] tpm2: Reset TPM2B buffer sizes after test fails for valid<commit_description><fixed_code>
... |
<vulnerable_code> if (rc == TPM_RC_SUCCESS) {
if (target->size > targetSize) {
rc = TPM_RC_SIZE;
}
}
if (rc == TPM_RC_SUCCESS) {
if ((target->sizeofSelect < PCR_SELECT_MIN) ||
(target->sizeofSelect > PCR_SELECT_MAX)) {
rc = TPM_RC_VALUE;
}
}
if (rc == TPM_RC_SUCCESS) {
if (rc =... |
<vulnerable_code> return;
bool is_int = false;
int idx = argv[0].toInt(&is_int);
if (is_int && idx <= area->evidence().size() && idx >= 0) {
area->deleteEvidence(idx);
}
sendEvidenceList(area);
bool is_int = false;
int idx = argv[0].toInt(&is_int);
AreaData::Evidence evi =... |
<vulnerable_code> try:
if request.method == 'GET':
MD5=request.GET['md5']
m=re.match('[0-9a-f]{32}',MD5)
if m:
URLS = getListOfURLS(MD5,False)
if (len(URLS)) == 0:
return HttpResponseRedirect('/error/')
elif request.m... |
<vulnerable_code> if re.findall(";|\$\(|\|\||&&",PKG) or re.findall(";|\$\(|\|\||&&",LNCH):
print "[ATTACK] Possible RCE"
return HttpResponseRedirect('/error/')
m=re.match('[0-9a-f]{32}',MD5)
if m:
# Delete ScreenCast Cache
... |
<vulnerable_code> try:
MD5=request.GET['md5']
TYP=request.GET['type']
m=re.match('[0-9a-f]{32}',MD5)
if m:
if (TYP=='APK' or TYP=='ANDZIP'):
DB=StaticAnalyzerAndroid.objects.filter(MD5=MD5)
pass
def Java(request):
try:
m=re.match('[0-9a-... |
<vulnerable_code> s.add("org.apache.log4j.receivers.db.DriverManagerConnectionSource");
s.add("org.apache.log4j.receivers.db.JNDIConnectionSource");
DEFAULT_NO_DESER_CLASS_NAMES = Collections.unmodifiableSet(s);
}
<commit_title>[PATCH] Fix #2526<commit_description><fixed_code>
s.add(... |
<vulnerable_code> path.append(location.getPort());
path.append(File.separatorChar);
}
path.append(location.getPath().replace('/', File.separatorChar));
if (location.getQuery() != null && !location.getQuery().trim().isEmpty()) {
path.append(".").append(location.... |
<vulnerable_code> */
public static void createParentDir(File f, String eMsg) throws IOException {
File parent = f.getParentFile();
if (!parent.isDirectory() && !parent.mkdirs()) {
throw new IOException("Cant create directory " + (eMsg == null ? parent : eMsg));
}<commit_title... |
<vulnerable_code> final File expected = new File("/tmp/https/example.com/5050/applet/e4f3cf11f86f5aa33f424bc3efe3df7a9d20837a6f1a5bbbc60c1f57f3780a4");
Assert.assertEquals(expected, CacheUtil.urlToPath(u, "/tmp"));
}
@Test<commit_title>[PATCH] Fixed bug when relative path (..) could lea... |
<vulnerable_code> */
package net.sourceforge.jnlp.runtime;
import net.adoptopenjdk.icedteaweb.client.parts.dialogs.security.appletextendedsecurity.AppletSecurityLevel;
import net.adoptopenjdk.icedteaweb.client.parts.dialogs.security.appletextendedsecurity.AppletStartupSecuritySettings;
import net.adoptopenjdk.icedteaw... |
<vulnerable_code> const unsigned char *isodirrec)
{
struct iso9660 *iso9660;
struct file_info *file;
size_t name_len;
const unsigned char *rr_start, *rr_end;
const unsigned char *p;
size_t dr_len;
uint64_t fsize;
int32_t location;
int flags;
return (NULL);
}
/* Create a new file entry and copy data fr... |
<vulnerable_code> for( i = 0; i < MAX_LBRR_DELAY; i++ ) {
totBytes += nBytesPerPacket[ i + 1 ];
}
SKP_memmove( payload, &payload[ nBytesPerPacket[ 0 ] ], totBytes * sizeof( SKP_uint8 ) );
payloadEnd -= nBytesPerPacket[ 0 ];
SKP_memmove( nBytesPerPacket, &nBytesPerPacke... |
<vulnerable_code>}
static void hash_object_body(const struct git_hash_algo *algo, git_hash_ctx *c,
const void *buf, unsigned long len,
struct object_id *oid,
char *hdr, size_t *hdrlen)
{
/* Generate the header */
*hdrlen = format_object_header(hdr, *hdrlen, type, len);
/* Sha1.. */
hash_ob... |
<vulnerable_code>/*
* Same as SHA1DCUpdate, but adjust types to match git's usual interface.
*/
void git_SHA1DCUpdate(SHA1_CTX *ctx, const void *vdata, unsigned long len)
{
const char *data = vdata;
/* We expect an unsigned long, but sha1dc only takes an int */
while (len > INT_MAX) {
SHA1DCUpdate(ctx, data, INT... |
<vulnerable_code> });
});
it('works with _ContentType', done => {
request({
method: 'POST',
url: 'http://localhost:8378/1/files/file',
body: JSON.stringify({
_ContentType: 'text/html',
base64: 'PGh0bWw+PC9odG1sPgo=',
}),
}).then(response => {... |
<vulnerable_code> } else if (typeof fileUpload.enableForAuthenticatedUser !== 'boolean') {
throw 'fileUpload.enableForAuthenticatedUser must be a boolean value.';
}
}
static validateMasterKeyIps(masterKeyIps) {<commit_title>[PATCH] fix lts<commit_description><fixed_code>
} else if (typeof fileUpl... |
<vulnerable_code>Do not edit manually, but update Options/index.js
*/
var parsers = require('./parsers');
module.exports.SchemaOptions = {
afterMigration: {
env: 'PARSE_SERVER_SCHEMA_AFTER_MIGRATION',
action: parsers.booleanParser,
default: false,
},
};
module.exports.DatabaseOptions = {
enableSchema... |
<vulnerable_code> * @property {Boolean} enableForAnonymousUser Is true if file upload should be allowed for anonymous users.
* @property {Boolean} enableForAuthenticatedUser Is true if file upload should be allowed for authenticated users.
* @property {Boolean} enableForPublic Is true if file upload should be allowed... |
<vulnerable_code>}
export interface FileUploadOptions {
/* Is true if file upload should be allowed for anonymous users.
:DEFAULT: false */
enableForAnonymousUser: ?boolean;<commit_title>[PATCH] fix lts<commit_description><fixed_code>
}
export interface FileUploadOptions {
/* Sets the allowed file extension... |
<vulnerable_code> return;
}
const base64 = req.body.toString('base64');
const file = new Parse.File(filename, { base64 }, contentType);
const { metadata = {}, tags = {} } = req.fileData || {};<commit_title>[PATCH] fix lts<commit_description><fixed_code>
return;
}
const fileExtensio... |
<vulnerable_code> rtlpriv->hw = hw;
rtlpriv->usb_data = kcalloc(RTL_USB_MAX_RX_COUNT, sizeof(u32),
GFP_KERNEL);
if (!rtlpriv->usb_data)
return -ENOMEM;
/* this spin lock must be initialized early */
spin_lock_init(&rtlpriv->locks.usb_lock);
_rtl_usb_io_handler_release(hw);
usb_put_dev(udev);
complete(... |
<vulnerable_code> mono_g_hash_table_insert (image->generic_def_objects, imethod, rmethod);
mono_loader_unlock ();
}
return mono_method_get_object (mono_object_domain (rmethod), inflated, NULL);
}<commit_title>[PATCH] Handle invalid instantiation of generic methods.<commit_description>* verify.c: Add new function... |
<vulnerable_code> return mono_class_is_valid_generic_instantiation (NULL, class);
}
#else
gboolean
return TRUE;
}
#endif<commit_title>[PATCH] Handle invalid instantiation of generic methods.<commit_description>* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (... |
<vulnerable_code>export const setBubbleText = bubbleText => {
if (isExpandedView(window.$chatwoot.type)) {
const textNode = document.getElementById('woot-widget--expanded__text');
textNode.innerHTML = bubbleText;
}
};
if (isExpandedView(window.$chatwoot.type)) {
const textNode = document.createElemen... |
<vulnerable_code>
static int mp_get_count(struct sb_uart_state *state, struct serial_icounter_struct *icnt)
{
struct serial_icounter_struct icount;
struct sb_uart_icount cnow;
struct sb_uart_port *port = state->port;
<commit_title>[PATCH] Staging: sb105x: info leak in mp_get_count()<commit_description>The icount.res... |
<vulnerable_code>import com.google.common.base.Strings;
import com.google.common.collect.Sets;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import net.opentsdb.core.Const;
import net.opentsdb.core.DataPoint;
import net.opentsdb.core.DataPoints;
import net.opentsdb.core.Query;
import net.opentsdb.core.TSDB... |
<vulnerable_code> assertPlotParam("yrange", "[-10.1e-5:]");
assertPlotParam("yrange", "[-10.1e-5:-10.1e-6]");
assertInvalidPlotParam("yrange", "[33:system('touch /tmp/poc.txt')]");
}
@Test
assertPlotParam("key", "horiz");
assertPlotParam("key", "box");
assertPlotParam("key", "bottom");
a... |
<vulnerable_code> '<i class="mdi mdi-information-outline"></i> '
'<a href="https://www.markdownguide.org/cheat-sheet/#basic-syntax" rel="noopener noreferrer">Markdown</a> '
'syntax is supported, as well as <a href="{}#render_markdown">a limited subset of HTML</a>.',
static... |
<vulnerable_code>
static void register_hooks(apr_pool_t *p)
{
ap_hook_access_checker(am_auth_mellon_user, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_check_user_id(am_check_uid, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_post_config(am_global_init, NULL, NULL, APR_HOOK_MIDDLE);
* Therefore this hook must run befo... |
<vulnerable_code>
@PreAuthorize("hasRole('ROLE_USER')")
@RequestMapping("/oauth/confirm_access")
public String confimAccess(Map<String, Object> model, @ModelAttribute("authorizationRequest") AuthorizationRequest authRequest,
Principal p) {
// Check the "prompt" parameter to see if we need to do special process... |
<vulnerable_code>
spin_unlock_bh(&socket_client->lock);
error = copy_to_user(buf, &socket_packet->icmp_packet,
socket_packet->icmp_len);
packet_len = socket_packet->icmp_len;
kfree(socket_packet);
if (error)<commit_title>[PATCH] batman-adv: Only write requested number of byte to user<commit_description>... |
<vulnerable_code>from flask import has_request_context, request, session
from flask_babel import Babel
from .views import LocaleView
from ..basemanager import BaseManager
class BabelManager(BaseManager):<commit_title>[PATCH] add tests<commit_description><fixed_code>
from flask import has_request_context, request, se... |
<vulnerable_code>
from . import __version__
from .api.manager import OpenApiManager
from .babel.manager import BabelManager
from .const import (
LOGMSG_ERR_FAB_ADD_PERMISSION_MENU,
LOGMSG_ERR_FAB_ADD_PERMISSION_VIEW,<commit_title>[PATCH] add tests<commit_description><fixed_code>
from . import __version__
from ... |
<vulnerable_code> )
self.db.session.delete(user)
self.db.session.commit()<commit_title>[PATCH] add tests<commit_description><fixed_code>
)
self.db.session.delete(user)
self.db.session.commit()
def test_edit_user(self):
"""
Test edit user
"""
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.