text stringlengths 79 3.72M |
|---|
<vulnerable_code>#include "config.h"
#endif
#include <assert.h>
#include "ntlm.h"
#include "../sspi.h"
#include <winpr/crt.h>
#include <winpr/print.h>
#include <winpr/sysinfo.h>
#include <winpr/tchar.h>
return "MsvAvSingleHost";
case MsvAvTargetName:
return "MsvAvTargetName";
case MsvChannelBindings:
re... |
<vulnerable_code>#include "config.h"
#endif
#include <assert.h>
#include "ntlm.h"
#include "../sspi.h"
#include "../../log.h"
#define TAG WINPR_TAG("sspi.NTLM")
const char LM_MAGIC[] = "KGS!@#$%";
static const char NTLM_CLIENT_SIGN_MAGIC[] =
"session key to client-to-server signing key magic constant";
static c... |
<vulnerable_code>#include "../sspi.h"
#include <winpr/crt.h>
#include <winpr/print.h>
#include <winpr/stream.h>
#include <winpr/sysinfo.h>
#include "ntlm_message.h"
#include "../log.h"
#define TAG WINPR_TAG("sspi.NTLM")
static const char NTLM_SIGNATURE[8] = { 'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0' };
#ifdef WITH_... |
<vulnerable_code> free(ntlm);
}
int TestNTLM(int argc, char* argv[])
{
int status;
int rc = -1;
PSecBuffer pSecBuffer;
TEST_NTLM_CLIENT* client = NULL;
TEST_NTLM_SERVER* server = NULL;
BOOL DynamicTest = TRUE;
WINPR_UNUSED(argc);
WINPR_UNUSED(argv);
/**
* Client Initialization
*/
goto fail;
}
rc = ... |
<vulnerable_code> i=0;
has_quote = 0;
while (go) {
if (parser->line_buffer[parser->line_pos + i] == '\"') {
if (!has_quote) has_quote = 1;
else has_quote = 0;
parser->line_pos += 1;
if (parser->line_pos+i==parser->line_size) break;
continue;
}
if (!has_quote) {<commit_title>[PATCH] fixed #2589<c... |
<vulnerable_code> * 2 of the Licence, or (at your option) any later version.
*/
#include <linux/init.h>
#include <linux/seq_file.h>
#include <linux/file.h>
*/
static int __init big_key_init(void)
{
return register_key_type(&key_type_big_key);
}
/*
* Initialize big_key crypto and RNG algorithms
*/
static int __in... |
<vulnerable_code>
@validate_blueprint.route('/offlinerefill', methods=['POST'])
@event("validate_offlinerefill", request, g)
def offlinerefill():
"""<commit_title>[PATCH] Add tests for user and serial input<commit_description>Fixes #1227<fixed_code>
@validate_blueprint.route('/offlinerefill', methods=['POST'])
@... |
<vulnerable_code> def __call__(self, func):
@functools.wraps(func)
def check_user_or_serial_in_request_wrapper(*args, **kwds):
user = self.request.all_data.get("user")
serial = self.request.all_data.get("serial")
if not serial and not user:
raise Pa... |
<vulnerable_code>#endif
box.length = (uint32_t) (io_->size() - io_->tell() + 8);
}
if (box.length == 1)
{
// FIXME. Special case. the real box size is given in another place.
}
// Read whole box : Box header + Box data (not fix... |
<vulnerable_code> }
//check for empty key
if (key != null && key.equals(Userview.USERVIEW_KEY_EMPTY_VALUE)) {
key = "";
}
<commit_title>[PATCH] Fixed: wflow-core - Userview - Fixed XSS issue on key<commit_description><fixed_code>
}
//c... |
<vulnerable_code> requestParameters.put("embed", Boolean.toString(embed));
requestParameters.put("appId", appDef.getAppId());
requestParameters.put("appVersion", appDef.getVersion().toString());
String appId = appDef.getId();
String appVersion = appDef.getVersion().toString();<co... |
<vulnerable_code> String serviceWorkerUrl = data.get("context_path") + "/web/userview/" + appId + "/" + userviewId + "/"+key+"/serviceworker";
jsCssLink += "<script>$(function() {"
+ "var initPwaUtil = function(){"
+ "PwaUtil.contextPath = '... |
<vulnerable_code>
from .. import DEFAULT_VERSION, mgr
from ..api.doc import Schema, SchemaInput, SchemaType
from . import ENDPOINT_MAP, BaseController, Controller, Endpoint, allow_empty_body
NO_DESCRIPTION_AVAILABLE = "*No description available*"
def api_all_json(self):
return self._gen_spec(True, "/")
... |
<vulnerable_code>
// A simple way to check for HTML strings
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
// Match a standalone tag
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,<commit_title>[PATCH] Adjust jQuery('html') detection to only m... |
<vulnerable_code> div = jQuery("<div/><hr/><code/><b/>"),
exec = false,
lng = "",
expected = 26,
attrObj = {
"click": function() { ok( exec, "Click executed." ); },
"text": "test",
// manually clean up detached elements
elem.remove();
equal( jQuery(" <div/> ").length, 1, "Make sure whitespace is trim... |
<vulnerable_code> ok( jQuery("#length").length, "<input name=\"length\"> cannot be found under IE, see #945" );
ok( jQuery("#lengthtest input").length, "<input name=\"length\"> cannot be found under IE, see #945" );
//#7533
equal( jQuery("<div id=\"A'B~C.D[E]\"><p>foo</p></div>").find("p").length, 1, "Find where co... |
<vulnerable_code> "<p id='posp'><a class='firsta' href='#'><em>first</em></a><a class='seconda' href='#'><b>test</b></a><em></em></p>"
).appendTo( "body" ),
isit = function(sel, match, expect) {
equal( jQuery( sel ).is( match ), expect, "jQuery( " + sel + " ).is( " + match + " )" );
};
isit( "#posp", "#p... |
<vulnerable_code> InfoReply response;
fmt::memory_buffer errors;
std::vector<decltype(vm_instances)::key_type> instances_for_info;
if (request->instance_names().instance_name().empty())
mount_info->set_longest_path_len(0);
for (const auto& mount : vm_specs.mounts)
{
... |
<vulnerable_code> unsigned const imagesize = ih.imagesize;
unsigned const entry = ih.entry;
unsigned const relocsize = ih.relocsize;
if (!imagesize || file_size <= imagesize || file_size <= entry || file_size <= relocsize) {
printWarn(getName(), "bad header; imagesize=%#x entry=%#x relocsize=%#... |
<vulnerable_code> break;
}
}
}
if (it != NULL) {<commit_title>[PATCH] backport from 1.9 (rev #9980) fixed temporary GRUU bug that<commit_description><fixed_code>
break;
}
}
it=it->next;
}
if (it != NULL) { |
<vulnerable_code> k = pow(((double) (t - t1)) / delta_t, accel);
}
p = args[cnt].start;
p = parse_tags(render_priv, p, args[cnt].end, k); // maybe k*pwr ? no, specs forbid nested \t's
} else if (complex_tag("clip")) {
if (nargs == 4) {
... |
<vulnerable_code> da->array.units[i] = 0;
gf_free(v);
}
gf_list_del(l);
val->value = da;
}
return;
}
break;<commit_title>[PATCH] fixed #2026<commit_description><fixed_code>
da->array.units[i] = 0;
gf_free(v);
}
}
gf_list_del(l);
val->value = da;
return;
}
bre... |
<vulnerable_code>
CSRF_TRUSTED_ORIGINS = [urlparse(SITE_URL).scheme + '://' + urlparse(SITE_URL).hostname]
TRUST_X_FORWARDED_FOR = config.get('pretix', 'trust_x_forwarded_for', fallback=False)
USE_X_FORWARDED_HOST = config.get('pretix', 'trust_x_forwarded_host', fallback=False)
REQUEST_ID_HEADER = config.get('pretix... |
<vulnerable_code> {SCMP_SYS (umount), EPERM},
{SCMP_SYS (umount2), EPERM},
{SCMP_SYS (pivot_root), EPERM},
#if defined(__s390__) || defined(__s390x__) || defined(__CRIS__)
/* Architectures with CONFIG_CLONE_BACKWARDS2: the child stack
* and flags arguments are reversed so the flags come second */<co... |
<vulnerable_code> reslevel->log2_prec_height) -
(reslevel->coord[1][0] >> reslevel->log2_prec_height);
reslevel->band = av_malloc_array(reslevel->nbands, sizeof(*reslevel->band));
if (!reslevel->band)
return AVERROR(ENOMEM);
... |
<vulnerable_code>#include "resolved-dns-stream.h"
#include "resolved-dnstls.h"
#if GNUTLS_VERSION_NUMBER >= 0x030600
#define PRIORTY_STRING "NORMAL:-VERS-ALL:+VERS-TLS1.3:+VERS-TLS1.2"
#else
#define PRIORTY_STRING "NORMAL:-VERS-ALL:+VERS-TLS1.2"
#endif
DEFINE_TRIVIAL_CLEANUP_FUNC(gnutls_session_t, gnutls_deinit);
sta... |
<vulnerable_code> /android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i, // Xiaomi Hongmi
/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,
// Xiaomi M... |
<vulnerable_code> */
assert(resize_filter != (ResizeFilter *) NULL);
assert(resize_filter->signature == MagickCoreSignature);
x_blur=fabs((double) x)/resize_filter->blur; /* X offset with blur scaling */
if ((resize_filter->window_support < MagickEpsilon) ||
(resize_filter->window == Box))
scale=1.0... |
<vulnerable_code>/**
* @overview Contains integration tests for `shescape.escapeAll` for the Windows
* Command Prompt.
* @license MIT
*/
const runTest = constants.isWindows ? test : test.skip;
const shells = [
constants.binCmd,
constants.binCmdCapsExt,
constants.binCmdNoExt,
];
for (const shell of shells)... |
<vulnerable_code><commit_title>[PATCH] Split alternative name test for cmd.exe and powershell.exe<commit_description>Also drop `.EXE` variants in favor of just no-extension since that
evaluates to `.EXE` anyway.<fixed_code>
/**
* @overview Contains integration tests for `shescape.escapeAll` for the Windows
* Command ... |
<vulnerable_code>/**
* @overview Contains integration tests for `shescape.escapeAll` for Windows
* PowerShell.
* @license MIT
*/
const runTest = constants.isWindows ? test : test.skip;
const shells = [
constants.binPowerShell,
constants.binPowerShellCapsExt,
constants.binPowerShellNoExt,
];
for (const she... |
<vulnerable_code><commit_title>[PATCH] Split alternative name test for cmd.exe and powershell.exe<commit_description>Also drop `.EXE` variants in favor of just no-extension since that
evaluates to `.EXE` anyway.<fixed_code>
/**
* @overview Contains integration tests for `shescape.escape` for the Windows
* Command Pro... |
<vulnerable_code>/**
* @overview Contains integration tests for `shescape.escape` for Windows
* PowerShell.
* @license MIT
*/
const runTest = constants.isWindows ? test : test.skip;
const shells = [
constants.binPowerShell,
constants.binPowerShellCapsExt,
constants.binPowerShellNoExt,
];
for (const shell ... |
<vulnerable_code><commit_title>[PATCH] Split alternative name test for cmd.exe and powershell.exe<commit_description>Also drop `.EXE` variants in favor of just no-extension since that
evaluates to `.EXE` anyway.<fixed_code>
/**
* @overview Contains integration tests for `shescape.quoteAll` for the Windows
* Command P... |
<vulnerable_code><commit_title>[PATCH] Split alternative name test for cmd.exe and powershell.exe<commit_description>Also drop `.EXE` variants in favor of just no-extension since that
evaluates to `.EXE` anyway.<fixed_code>
/**
* @overview Contains integration tests for `shescape.quoteAll` for Windows
* PowerShell (w... |
<vulnerable_code><commit_title>[PATCH] Split alternative name test for cmd.exe and powershell.exe<commit_description>Also drop `.EXE` variants in favor of just no-extension since that
evaluates to `.EXE` anyway.<fixed_code>
/**
* @overview Contains integration tests for `shescape.quote` for the Windows
* Command Prom... |
<vulnerable_code>/**
* @overview Contains integration tests for `shescape.quote` for Windows
* PowerShell.
* @license MIT
*/
const runTest = constants.isWindows ? test : test.skip;
const shells = [
constants.binPowerShell,
constants.binPowerShellCapsExt,
constants.binPowerShellNoExt,
];
for (const shell o... |
<vulnerable_code><commit_title>[PATCH] Split alternative name test for cmd.exe and powershell.exe<commit_description>Also drop `.EXE` variants in favor of just no-extension since that
evaluates to `.EXE` anyway.<fixed_code>
/**
* @overview Contains integration tests for `shescape.quote` for Windows
* PowerShell (with... |
<vulnerable_code> memset(sub_layer_profile_space, 0, sizeof(sub_layer_profile_space));
}
void HevcUnitWithProfile::profile_tier_level(int subLayers)
{
int profile_space = m_reader.getBits(2);
int tier_flag = m_reader.getBit();
profile_idc = m_reader.getBits(5);
m_reader.skipBits(32); // general_pro... |
<vulnerable_code>
VvcUnitWithProfile::VvcUnitWithProfile() : profile_idc(0), level_idc(0) {}
void VvcUnitWithProfile::profile_tier_level(bool profileTierPresentFlag, int MaxNumSubLayersMinus1)
{
if (profileTierPresentFlag)
{
profile_idc = m_reader.getBits(7);
bool tier_flag = m_reader.getBit();... |
<vulnerable_code>"""
@pytest.mark.requires("wasm_exec")
def test_python_repl() -> None:
"""Test functionality when globals/locals are not provided."""
repl = PythonREPL()
# Run a simple initial command.
repl.run("foo = 1")
assert repl.locals is not None
@pytest.mark.requires("wasm_exec")
def tes... |
<vulnerable_code><commit_title>[PATCH] correct tests<commit_description><fixed_code>
"""Test functionality of Python REPL."""
import sys
import pytest
from langchain_experimental.tools.python.tool import PythonAstREPLTool, PythonREPLTool
from langchain_experimental.utilities.python import PythonREPL
_SAMPLE_CODE = "... |
<vulnerable_code> if (setregid(0, 0))
errExit("setregid");
if (!cfg.shell)
cfg.shell = guess_shell();
if (!cfg.shell) {
fprintf(stderr, "Error: no POSIX shell found, please use --shell command line option\n");
exit(1);
}
char *arg[4];
arg[0] = cfg.shell;
arg[1] = "-c";
arg[2] = cmd;
arg[3] = NULL;<com... |
<vulnerable_code> addr_text[0] = '\0';
const char *protoname = "?";
unsigned short port = 0;
switch (af) {
case AF_INET:
break;
case AF_UNIX:
strncpy(addr_text,
((struct sockaddr_un *)sock_addr)->sun_path,
sizeof(addr_text)... |
<vulnerable_code> help='replace every raster pixel with its complementary color')
parser.add_argument(
'-u', '--unsafe', action='store_true',
help='resolve XML entities and allow very large files '
'(WARNING: vulnerable to XXE attacks and various DoS)')
parser.add_argument(
... |
<vulnerable_code> tree = ElementTree.fromstring(
bytestring, forbid_entities=not unsafe,
forbid_external=not unsafe)
self.xml_tree = tree
root = cssselect2.ElementWrapper.from_xml_root(tree)
style = parent.style if parent else css.parse_stylesheets(self... |
<vulnerable_code> :param parent_width: The width of the parent container in pixels.
:param parent_height: The height of the parent container in pixels.
:param scale: The ouptut scaling factor.
:param unsafe: A boolean allowing XML entities and very large files
(WARN... |
<vulnerable_code> goto trunc;
}
/* units of 4 secs */
ND_PRINT((ndo, "(refresh: %u)",
EXTRACT_16BITS(&bp[i+2]) << 2));
break;<commit_title>[PATCH] CVE-2017-13023/IPv6 mobility: Add a bounds check before<commit_description><fixed_code>
goto trunc;
}
/* units of 4 secs */
ND_TCHECK_16BITS(... |
<vulnerable_code> showSpinner();
$('#subnetScanResult').slideUp('fast');
var subnetId = $(this).attr('data-subnetId');
var type = $('select[name=type]').find(":selected").val();
if($('input[name=debug]').is(':checked')) { var debug = 1; }
else { var debug = 0; }
var port = $('input[name=telnetports... |
<vulnerable_code> */
public static final int MAX_QUERY_TOKENS = 15_000;
/**
* Another graphql hacking vector is to send large amounts of whitespace in queries that burn lots of parsing CPU time and burn
* memory representing a document. Whitespace token processing in ANTLR is 2 order of magnitude... |
<vulnerable_code> if ((sun_info.type != RT_ENCODED) && (sun_info.depth >= 8) &&
((number_pixels*((sun_info.depth+7)/8)) > sun_info.length))
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
sun_data=(unsigned char *) AcquireQuantumMemory((size_t) sun_info.length,
sizeof(*sun_data... |
<vulnerable_code>_TCHAR_SPECIALS: Final[str] = re.escape("!#$%&'*+-.^_`|~")
TOKENRE: Final[Pattern[str]] = re.compile(f"[0-9A-Za-z{_TCHAR_SPECIALS}]+")
VERSRE: Final[Pattern[str]] = re.compile(r"HTTP/(\d)\.(\d)", re.ASCII)
DIGIT: Final[Pattern[str]] = re.compile(r"\d+", re.ASCII)
HEXDIGIT: Final[Pattern[bytes]] = re.co... |
<vulnerable_code><commit_title>[PATCH] Better XSS protection<commit_description>* Add HTMLPurifier library (LGPL)
* Add helper functions to html helper
* Set default encoding header to UTF-8
* Make sure the doctype is the same everywhere (admin/members/frontend)
* Remove use of strip_tags() and htmlspecialchars()
* Rep... |
<vulnerable_code> AP4_UI08 version,
AP4_UI32 flags,
AP4_ByteStream& stream) :
AP4_Atom(AP4_ATOM_TYPE_STSZ, size, version, flags)
{
stream.ReadUI32(m_SampleSize);
stream.ReadUI32(m_SampleCount);
if (m_SampleSize... |
<vulnerable_code> AP4_UI08 version,
AP4_UI32 flags,
AP4_ByteStream& stream) :
AP4_Atom(AP4_ATOM_TYPE_STZ2, size, version, flags)
{
AP4_UI08 reserved;
stream.ReadUI08(reserved);
stream.ReadUI08(reserved);
st... |
<vulnerable_code> } else {
return req.method === 'POST' ? errors.errorForbidden(res) : errors.errorNotFound(res)
}
try {
const count = await models.Note.count({
where: {
alias: req.alias
}
})
if (count > 0) {
return errors.errorConflict(res)
}
... |
<vulnerable_code> * report anything.
*/
ivi.spoofchk = -1;
if (dev->netdev_ops->ndo_get_vf_config(dev, i, &ivi))
break;
vf_mac.vf =<commit_title>[PATCH] rtnl: fix info leak on RTM_GETLINK request for VF devices<commit_description>Initialize the mac address buffer with 0 as the driver specific functi... |
<vulnerable_code> if (msg.sender != local_user.to_string())
return;
auto secret_name = request_id_to_secret_name.find(e->content.request_id);
if (secret_name != request_id_to_secret_name.end()) {
nhlog::crypto()->info("Received sec... |
<vulnerable_code>var debug = require('debug')('launchpad:local:instance');
var rimraf = require('rimraf');
var getProcessId = function (name, callback) {
var commands = {
darwin: "ps -clx | grep '" + name + "$' | awk '{print $2}' | head -1",
linux: "ps -ax | grep '" + name + "$' | awk '{print $2}' | head -1... |
<vulnerable_code> });
}
app.stop = async () => {
await config.chrome.kill();
};
<commit_title>[PATCH] chore(lint): fix small linting issues<commit_description><fixed_code>
});
}
app.stop = async() => {
await config.chrome.kill();
};
|
<vulnerable_code>const testBase = 'http://localhost:1234/';
process.env.NODE_ENV = 'development';
test.before(async t => {
await app.listen(1234);
});
test.after.always(async t => {
for (let app of appInstances) {
app.stop();
}<commit_title>[PATCH] chore(lint): fix small linting issues<commit_description><f... |
<vulnerable_code> return callback(err);
}
let query_template = 'SELECT %s AS data, COUNT(*) AS cnt FROM `subscription__%d` JOIN `campaign_tracker__%d` ON `campaign_tracker__%d`.`list`=%d AND `campaign_tracker__%d`.`subscriber`=`subscription__%d`.`id` AND `campaign_tracker__%d`.`link`=%d GRO... |
<vulnerable_code>Component.register('sw-admin', {
template,
metaInfo() {
return {
title: this.$tc('global.sw-admin-menu.textShopwareAdmin'),
return Shopware.Service('loginService').isLoggedIn();
},
},
});<commit_title>[PATCH] NEXT-24677 - Limit admin session time<com... |
<vulnerable_code>Component.register('sw-progress-bar', {
template,
props: {
value: {
type: Number,
};
},
},
});<commit_title>[PATCH] NEXT-24677 - Limit admin session time<commit_description><fixed_code>
Component.register('sw-progress-bar', {
template,
injec... |
<vulnerable_code> Shopware.State.commit('context/addAppValue', { key, value });
});
return Shopware.Context.app;
}<commit_title>[PATCH] NEXT-24677 - Limit admin session time<commit_description><fixed_code>
Shopware.State.commit('context/addAppValue', { key, value });
});
// set initial ... |
<vulnerable_code> const assetPath = getAssetPath();
router.beforeEach((to, from, next) => {
setModuleFavicon(to, assetPath);
const loggedIn = LoginService.isLoggedIn();
const tokenHandler = new Shopware.Helper.RefreshTokenHelper();<commit_title>[PATCH] NEXT-24677 - Li... |
<vulnerable_code> });
beforeEach(() => {
window.localStorage.removeItem('redirectFromLogin');
document.cookie = '';
});
it('should start auto refresh the token after login', async () => {
jest.useFakeTimers();
const { loginService, clientMock } = loginServiceFactory();
... |
<vulnerable_code> stubs: {
'sw-extension-rating-stars': true,
'sw-progress-bar': await Shopware.Component.build('sw-progress-bar')
}
});
}
<commit_title>[PATCH] NEXT-24677 - Limit admin session time<commit_description><fixed_code>
stubs: {
... |
<vulnerable_code>GetTypeBufSize(matvar_t *matvar, size_t *size)
{
int err;
size_t nBytes = 0, data_bytes;
size_t tag_size = 8;
size_t nelems = 1;
size_t rank_size, field_size, field_buf_size;
*size = 0;
return 1;
if ( matvar->rank % 2 )
nBytes += tag_size + 4;
else
... |
<vulnerable_code> if (new_page)
__free_page(new_page);
}
return NULL;
}
alloc_size = min_t(int, size, PAGE_SIZE);<commit_title>[PATCH] iwlwifi: dbg_ini: fix memory leak in alloc_sgtable<commit_description>In alloc_sgtable if alloc_page fails, the alocated table should be
released.
Signed-off-by: Navi... |
<vulnerable_code>
module.exports = function killport(port) {
return (new Promise(function(resolve, reject) {
var cmd = 'lsof -i:' + port;
cp.exec(cmd, function(err, stdout, stderr){
// do not check `err`, if no process found<commit_title>[PATCH] fix a vulnerability issue if a provided port is not a num... |
<vulnerable_code> dds_info->pitchOrLinearSize = ReadBlobLSBLong(image);
dds_info->depth = ReadBlobLSBLong(image);
dds_info->mipmapcount = ReadBlobLSBLong(image);
if (dds_info->mipmapcount > GetBlobSize(image))
return MagickFalse;
(void) SeekBlob(image, 44, SEEK_CUR); /* reserved region of 11 DWORDs */... |
<vulnerable_code>
// on load, establish global delegations for now and future
$(document).ready(function() {
var tab = '[% task.tag %]'
var target = '#' + tab + '_pane';
// get all devices on device input focus<commit_title>[PATCH] Enforce escaping on all template content<commit_description><fixed_code... |
<vulnerable_code> // search tabs
[% FOREACH tab IN settings._search_tabs %]
$('[% "#${tab.tag}_form" %]').submit(function (event) {
var pgtitle = update_page_title('[% tab.tag %]');
copy_navbar_to_sidebar('[% tab.tag %]');
update_browser_history('[% tab.tag %]', pgtitle, '');
update_c... |
<vulnerable_code>
// on load, establish global delegations for now and future
$(document).ready(function() {
var tab = '[% tab.tag %]'
var target = '#' + tab + '_pane';
var portfilter = $('#ports_form').find("input[name=f]");
<commit_title>[PATCH] Enforce escaping on all template content<commit_descript... |
<vulnerable_code> // on load, check initial Report Options form state,
// and on each change to the form fields
$(document).ready(function() {
var tab = '[% report.tag %]'
var target = '#' + tab + '_pane';
// sidebar form fields should change colour and have trash icon<commit_title>[PATCH] Enforce esc... |
<vulnerable_code>void
Mat_VarFree(matvar_t *matvar)
{
int err;
size_t nelems = 0;
if ( NULL == matvar )
return;
if ( NULL != matvar->dims ) {
nelems = 1;
err = SafeMulDims(matvar, &nelems);
free(matvar->dims);
if ( err ) {
/* Result will be zero, so f... |
<vulnerable_code> data_needs_confirm = false;
}
// contract function may be recognized even though contract is not, e.g., gnosis safe execTransaction
if (msg->to.size && ethereum_cFuncHandled(msg)) {
// confirm contract address
char addr[43] = "0x";
ethereum_address_checksum(msg->to.bytes, addr + ... |
<vulnerable_code>
#include "keepkey/firmware/ethereum_contracts.h"
#include "keepkey/firmware/ethereum_contracts/confuncs.h"
#include "keepkey/firmware/ethereum_contracts/saproxy.h"
#include "keepkey/firmware/ethereum_contracts/thortx.h"
#include "keepkey/firmware/ethereum_contracts/zxappliquid.h"
#include "keepkey/fi... |
<vulnerable_code>/*
* This file is part of the KeepKey project.
*
* Copyright (C) 2022 markrypto
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, ... |
<vulnerable_code>{
uint32_t fcc;
int64_t chunk_size;
*data_length = 0;
TRY_IO(pcm_skip(&reader->io, 4)); /* mFileVersion, mFileFlags */
while ((fcc = caf_next_chunk(reader, &chunk_size)) != 0) {
if (fcc == M4AF_FOURCC('d','e','s','c'))
TRY_IO(caf_desc(reader, chunk_size));
... |
<vulnerable_code>int wav_parse(wav_reader_t *reader, int64_t *data_length)
{
uint32_t container, fcc, chunk_size;
*data_length = 0;
container = riff_next_chunk(reader, &chunk_size);
riff_ds64(reader, data_length);
while ((fcc = riff_next_chunk(reader, &chunk_size)) != 0) {
if (fcc == RI... |
<vulnerable_code> streamID min_id = {0, 0}, max_id = {UINT64_MAX, UINT64_MAX};
*edge_id = first ? max_id : min_id;
}
}
/* Adds a new item into the stream 's' having the specified number of<commit_title>[PATCH] Fix memory leak in streamGetEdgeID (#10753)<commit_description>si is initialized by strea... |
<vulnerable_code> IO.shrink = 0;
S.raw_pitch = S.width*8;
// allocate image as temporary buffer, size
imgdata.rawdata.raw_alloc = calloc(S.iwidth*S.iheight,sizeof(*imgdata.image));
imgdata.image = (ushort (*)[4]) imgdata.rawdata.raw_alloc;
... |
<vulnerable_code> return nullptr;
}
const FieldID& activeUnionMemberId(const void* object, ptrdiff_t offset) {
return *reinterpret_cast<const FieldID*>(
offset + static_cast<const char*>(object));
}
const bool& fieldIsSet(const void* object, ptrdiff_t offset) {
readState.readStructEnd(iprot);
ret... |
<vulnerable_code> u.set_fieldB({});
EXPECT_EQ(static_cast<void*>(&u), &*u.fieldB_ref());
}<commit_title>[PATCH] Fix handling of invalid union data in table-based serializer<commit_description>Summary:
Fix handling of invalid union data in the table-based serializer. Previously if the input contained duplicate union ... |
<vulnerable_code> return;
}
debug("Appling command arguments:", parsedArgv);
if (parsedArgv.config) {
const configFile = path.resolve(process.cwd(), parsedArgv.config);
applyConfigFile(configuration, configFile);
}
for (const key in parsedArgv) {
if (!parsedArgv.hasOwn... |
<vulnerable_code>"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const confinit = require("../index");
const path = require("path");
if (!env) {
env = process.env;
}
if (env.config) {
const configFile = path.resolve(process.cwd(), env.config);... |
<vulnerable_code>"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const assert = require("assert");
const __1 = require("..");
describe('setDeepProperty', () => {
it('should set a property with deep 1', () => {
const obj = {
test: "A"
};
__1.setDeepPro... |
<vulnerable_code>import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
.isXsrfProtectionEnabled()) {
String sessionToken = session.getCsrfToken();
if (sessi... |
<vulnerable_code> constructors.
"""
__slots__ = ("_re_period_context", "_re_word_tokenizer", "_re_last_word")
def __getstate__(self):
# All modifications to the class are performed by inheritance.
)
return self._re_period_context
def last_word_re(self):
"""C... |
<vulnerable_code> result->sheetcallbackdata.xmlparser = NULL;
result->sheetcallbackdata.callback = xlsxioread_list_sheets_resumable_callback;
result->sheetcallbackdata.callbackdata = result;
result->nextsheetname = NULL;
if ((result->zipfile = XML_Char_openzip(handle->zip, mainsheetfile, 0)) != NULL) {
res... |
<vulnerable_code>
if (!fp->skip) {
int fd = -1;
/* Directories replacing something need early backup */
if (!fp->suffix && fp != firstlink) {
rc = fsmBackup(di.dirfd, fi, fp->action);
}
if (!rc) {
rc = ensureDir(plugins, rpmfiDN(fi), 0,
(fp->action == FA_CREATE), 0, &di.dirfd);... |
<vulnerable_code> }
// Verify if SVG is valid
if (photoType.startsWith('svg')) {
const imageSvg = atob(photoB64Data)
const cleanSvg = await sanitizeSVG(imageSvg)
<commit_title>[PATCH] fix: mime case matching<commit_description>Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud><fixed_code>
}
// ... |
<vulnerable_code>var osmStream = require('osm-stream'),
reqwest = require('reqwest'),
moment = require('moment'),
}
function fetchChangesetData(id, callback) {
cached_changeset_data = changeset_cache.get(id);
if (!cached_changeset_data) {
var changeset_url_tmpl = '//www.openstreetmap.org/api/0... |
<vulnerable_code>/*
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
* This devtool is not neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file in the browser devtools.
* If you are trying to read the output file... |
<vulnerable_code><commit_title>[PATCH] distinct cjs and esm output using rollup; docs update<commit_description><fixed_code>
(()=>{var Ce=Object.create;var J=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,_e=Object.prototype.hasOwnProperty;var... |
<vulnerable_code>window.searchData = {"kinds":{"64":"Function","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","262144":"Accessor","4194304":"Type alias"},"rows":[{"id":0,"kind":4194304,"name":"PathSegment","url":"modules.html#pathsegment","classes":"tsd-kind... |
<vulnerable_code><commit_title>[PATCH] distinct cjs and esm output using rollup; docs update<commit_description><fixed_code>
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from 'rollup-... |
<vulnerable_code>const TerserPlugin = require('terser-webpack-plugin');
module.exports = {
mode: "production",
entry: {
'json-ptr.min': './src/index.ts',
},
output: {
path: path.resolve(__dirname, 'dist.browser'),
filename: '[name].js',
libraryTarget: 'umd',
library: 'JsonPointer',
rule... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.