text stringlengths 79 3.72M |
|---|
<vulnerable_code> * @api public
*/
req.logout =
req.logOut = function() {
var property = this._userProperty || 'user';
this[property] = null;
if (this._sessionManager) {
this._sessionManager.logOut(this);
}
};
<commit_title>[PATCH] Regenerate session in logout.<commit_description><fixed_code>
* @api pu... |
<vulnerable_code>SessionManager.prototype.logOut = function(req, cb) {
console.log('SM: logOut');
if (req.session && req.session[this._key]) {
delete req.session[this._key].user;
}
cb && cb();
}
<commit_title>[PATCH] Regenerate session in logout.<commit_description><fixed_code>
SessionManager.prototy... |
<vulnerable_code> req._passport = {};
req._passport.instance = passport;
req._sessionManager = passport._sm;
req.session = {};
req.session['passport'] = {};
req.session['passport'].user = '1';
req.logout();
it('should not be authenticated', function() {
... |
<vulnerable_code> "url_field": '<a href="http://example.com/2">http://example.com/2</a>',
"choice_field": '<span class="label label-default">Bar</span>',
"multi_choice_field": (
'<span class="label label-default">Bar</span> <span class="label label-default">Baz</span> ... |
<vulnerable_code> ],
"expected_errors": {
"api": {
"objects_nonexistent": "Circuit types require a platform, but no platforms exist yet. "
"Create a platform by posting to /api/dcim/platforms/",
"o... |
<vulnerable_code>from django.utils.html import format_html
from unittest import mock
from nautobot.dcim.models import ConsolePort, Device, DeviceRole, DeviceType, Interface, Manufacturer, Site
from nautobot.dcim.tests import test_views
from nautobot.extras.choices import (
CustomFieldTypeChoices,
super().s... |
<vulnerable_code>
var async = require('async')
var _ = require('lodash')
var winston = require('winston')
var ConversationSchema = require('../../../models/chat/conversation')
var MessageSchema = require('../../../models/chat/message')
var apiMessages = {}
async.waterfall(
[
function (done) {
// U... |
<vulnerable_code> 'history',
'isinview'
], function ($, _, angular, UIKit, moment, helpers) {
var messagesPage = {}
messagesPage.init = function (callback) {
$(document).ready(function () {
var $messageScroller = $('#message-content.scrollable')
var $messagesWrapper = $('#messages')
var ... |
<vulnerable_code> uint32_t table_id, count, size_required;
uint32_t num_extensions = 0;
if ( size_left && size_left < 4 ) {
LogError("Process_ipfix [%u] Template size error at %s line %u" ,
exporter->info.id, __FILE__, __LINE__, strerror (errno));
size_left = 0;
while ( size_left ) {
uint32_t id;
... |
<vulnerable_code> },
_applyFilterStyleOnItem: function(term, item) {
var instance = this;
var content = item.one('span').getContent();
item.one('span').setContent(AHighlight.all(content, term));<commit_title>[PATCH] LPS-71082 SF<commit_description><fixed_code>
},
_applyFilterStyleOnItem: func... |
<vulnerable_code>
no_open:
res = nfs_lookup(dir, dentry, lookup_flags);
if (switched) {
d_lookup_done(dentry);
if (!res)<commit_title>[PATCH] NFSv4: Handle case where the lookup of a directory fails<commit_description>If the application sets the O_DIRECTORY flag, and tries to open a
regular file, nfs_atomic_open(... |
<vulnerable_code> g_str_has_prefix(argv[i],"--newer") ||
g_str_has_prefix(argv[i],"--exclude-from") ||
g_str_has_prefix(argv[i],"--files-from")) {
/* Accept theses options with the following argument */
good_option += 2;
} else if (argv[i][0] != '-') {
good_option++;
}
}<commit_title>[PATCH] fix :... |
<vulnerable_code>bool StelScriptMgr::runScript(const QString& fileName, const QString& includePath)
{
QString preprocessedScript;
prepareScript(preprocessedScript,fileName,includePath);
return runPreprocessedScript(preprocessedScript,fileName);
}
bool StelScriptMgr::runScriptDirect(const QString scriptId, const QSt... |
<vulnerable_code> return -EINVAL;
}
*opt_len += hdr_len;
}
if (len > COAP_OPTION_NO_EXT) {
return -EINVAL;
}
*opt_len += hdr_len;
}
*opt_delta += delta;
*opt_len += len;
if (r == 0) {
if (len == 0U) {
return -EINVAL;
}
} else {
*pos += len;
r = max_len - *pos;
}
<commit_title>[PATCH... |
<vulnerable_code> return TCPEDIT_ERROR;
}
/* Make space for our new L2 header */
if (newl2len != ctx->l2len)
memmove(packet + newl2len, packet + ctx->l2len, pktlen - ctx->l2len);
/* update the total packet length */
pktlen += newl2len - ctx->l2len;<commit_title>[PATCH] Bug #486 CVE-... |
<vulnerable_code> Forward declarations.
*/
static MagickBooleanType
WriteRGFImage(const ImageInfo *,Image *,ExceptionInfo *);
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The format of the WriteRGFImage method is:
%
% MagickBooleanType WriteRGFImage(const ImageInfo *im... |
<vulnerable_code>
for (i=(ssize_t) first_object; i <= (ssize_t) last_object; i++)
{
if (mng_info->exists[i] && !mng_info->frozen[i] &&
(p-chunk) < (ssize_t) (length-8))
{<commit_title>[PATCH] https://github.com/ImageMagick/ImageMagick/iss... |
<vulnerable_code>/** @see https://github.com/victornpb/asciitable.js */
function matrixToAsciiTable(g,e){function n(b,d){for(var a in d)d.hasOwnProperty(a)&&(b[a]&&"object"===typeof d[a]?n(b[a],d[a]):b[a]=d[a]);return b}function p(b,d){d=d||" ";var a=0<b?Array(Math.ceil(b/d.length)+1).join(d):"";return a.length>b?a.sub... |
<vulnerable_code> struct sc_context *ctx = p15card->card->ctx;
struct sc_pkcs15_cert_info cinfo;
struct sc_pkcs15_object cobj;
unsigned char *info_blob, *cert_blob;
size_t info_len, cert_len, len, offs;
unsigned flags;
int rv;
rv = sc_oberthur_read_file(p15card, ch_tmp, &info_blob, &info_len, 1);
LOG_TEST_RET(c... |
<vulnerable_code> int depth = -1;
int want = 0;
int base = fdt_off_dt_struct(fdt);
end = path;
*end = '\0';
tag = fdt_next_tag(fdt, offset, &nextoffset);
stop_at = nextoffset;
switch (tag) {
case FDT_PROP:
include = want >= 2;
if (depth == FDT_MAX_DEPTH)
return -FDT_ERR_BADSTRUCTURE;
name = f... |
<vulnerable_code> fdt_for_each_subnode(noffset, fit, image_noffset) {
const char *name = fit_get_name(fit, noffset, NULL);
if (!strncmp(name, FIT_SIG_NODENAME,
strlen(FIT_SIG_NODENAME))) {
ret = fit_image_check_sig(fit, noffset, data,
return -EPERM;
}
int fit_config_verify_required_sigs(const void *fi... |
<vulnerable_code> */
int fit_image_verify(const void *fit, int image_noffset)
{
const void *data;
size_t size;
int noffset = 0;
char *err_msg = "";
/* Get image data and data length */
if (fit_image_get_data_and_size(fit, image_noffset, &data, &size)) {
err_msg = "Can't get image data/size";
printf("error... |
<vulnerable_code> #address-cells = <1>;
images {
kernel@1 {
data = /incbin/("%(kernel)s");
type = "kernel";
arch = "sandbox";
load = <0x40000>;
entry = <0x8>;
... |
<vulnerable_code> """
Maliciously manipulates the structure to create a crafted FIT file
"""
# locate /images/kernel@1 (frankly, it just expects it to be the first one)
kernel_node = root[0][0]
# clone it to save time filling all the properties
fake_kernel = kernel_node.clone()
# rename t... |
<vulnerable_code><commit_title>[PATCH 2/8] fit: Don't allow verification of images with @ nodes<commit_description>When searching for a node called 'fred', any unit address appended to the
name is ignored by libfdt, meaning that 'fred' can match 'fred@1'. This
means that we cannot be sure that the node originally inten... |
<vulnerable_code>Tests run with both SHA1 and SHA256 hashing.
"""
import struct
import pytest
import u_boot_utils as util
import vboot_forge
TESTDATA = [
['sha1', '', None, False],
['sha1', '', '-E -p 0x10000', False],
['sha1', '-pss', None, False],
['sha1', '-pss', '-E -p 0x10000', False],
['sha2... |
<vulnerable_code> return false;
}
if (!fit_check_format(sec_firmware_img)) {
printf("SEC Firmware: Bad firmware image (bad FIT header)\n");
return false;
}<commit_title>[PATCH 2/8] fit: Don't allow verification of images with @ nodes<commit_description>When searching for a node called 'fred', any unit address ... |
<vulnerable_code> /* Remember only PE-COFF and FIT images */
if (efi_check_pe(buffer, buffer_size, NULL) != EFI_SUCCESS) {
#ifdef CONFIG_FIT
if (!fit_check_format(buffer))
return;
/*
* FIT images of type EFI_OS are started via command bootm.<commit_title>[PATCH 2/8] fit: Don't allow verification of images wi... |
<vulnerable_code> case IMAGE_FORMAT_FIT:
puts(" FIT image found\n");
if (!fit_check_format(hdr)) {
puts("Bad FIT image format!\n");
unmap_sysmem(hdr);
return 1;
#endif
#if defined(CONFIG_FIT)
case IMAGE_FORMAT_FIT:
if (!fit_check_format(hdr))
goto next_sector;
printf("FIT Image at %08lX... |
<vulnerable_code> /* This cannot be done earlier,
* we need complete FIT image in RAM first */
if (genimg_get_format((void *) addr) == IMAGE_FORMAT_FIT) {
if (!fit_check_format(fit_hdr)) {
bootstage_error(BOOTSTAGE_ID_IDE_FIT_READ);
puts("** Bad FIT image format\n");
return 1;<commit_title>[PATCH 2/8] fit... |
<vulnerable_code>#if defined(CONFIG_FIT)
case IMAGE_FORMAT_FIT:
fit_hdr = buf;
if (!fit_check_format (fit_hdr)) {
puts ("Bad FIT image format\n");
return 1;
}<commit_title>[PATCH 2/8] fit: Don't allow verification of images with @ nodes<commit_description>When searching for a node called 'fred', any unit a... |
<vulnerable_code> "at %08lx ...\n", uname, addr);
fit_hdr = (const void *)addr;
if (!fit_check_format(fit_hdr)) {
puts("Bad FIT image format\n");
return 1;
}<commit_title>[PATCH 2/8] fit: Don't allow verification of images with @ nodes<commit_description>When searching for a node called 'fred', any unit ... |
<vulnerable_code> */
#if CONFIG_IS_ENABLED(FIT)
/* check FDT blob vs FIT blob */
if (fit_check_format(buf)) {
ulong load, len;
fdt_noffset = boot_get_fdt_fit(images,<commit_title>[PATCH 2/8] fit: Don't allow verification of images with @ nodes<commit_description>When searching for a node called 'fred'... |
<vulnerable_code> * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
#ifdef USE_HOSTCC
#include "mkimage.h"
#include <time.h>
return (comp == image_comp);
}
/**
* fit_check_format - sanity check FIT image format
* @fit: pointer to the FIT format image header
*
* fit_check_format() runs a basic sanity FI... |
<vulnerable_code>got_update_file:
fit = map_sysmem(addr, 0);
if (!fit_check_format((void *)fit)) {
printf("Bad FIT format of the update file, aborting "
"auto-update\n");
return 1;
if (!fit)
return -EINVAL;
if (!fit_check_format((void *)fit)) {
printf("Bad FIT format of the update file, aborting au... |
<vulnerable_code> if (ret < 0)
return ret;
ret = fit_check_format(buffer_p);
if (!ret) {
debug("FPGA: No valid FIT image was found.\n");
return -EBADF;
}
confs_noffset = fdt_path_offset(buffer_p, FIT_CONFS_PATH);<commit_title>[PATCH 2/8] fit: Don't allow verification of images with @ nodes<commit_descriptio... |
<vulnerable_code> return -ENOEXEC;
}
/* mandatory / node 'description' property */
if (!fdt_getprop(fit, 0, FIT_DESC_PROP, NULL)) {
log_debug("Wrong FIT format: no description\n");<commit_title>[PATCH 2/8] fit: Don't allow verification of images with @ nodes<commit_description>When searching for a node called 'f... |
<vulnerable_code> unsigned depth = 0;
const void *prop;
const char *propname;
if (bufsize < FDT_V1_SIZE)
return -FDT_ERR_TRUNCATED;
if (nextoffset < 0)
return nextoffset;
switch (tag) {
case FDT_NOP:
break;
depth++;
if (depth > INT_MAX)
return -FDT_ERR_BADSTRUCTURE;
break;
case FDT_EN... |
<vulnerable_code> util.run_and_log_expect_exception(
cons, [fit_check_sign, '-f', efit, '-k', dtb],
1, 'Failed to verify required signature')
run_bootm(sha_algo, 'evil fakeroot', 'Bad Data Hash', False, efit)
# Try adding an @ to the kernel node name. ... |
<vulnerable_code> return (comp == image_comp);
}
int fit_check_format(const void *fit, ulong size)
{
int ret;
if (size == IMAGE_SIZE_INVAL)
size = fdt_totalsize(fit);
ret = fdt_check_full(fit, size);
if (ret) {
log_debug("FIT check error %d\n", ret);
return -EINVAL;
}
}
printf("## Loading %s from... |
<vulnerable_code> util.run_and_log(cons, [fit_check_sign, '-f', fit, '-k', dtb])
if full_test:
# Make sure that U-Boot checks that the config is in the list of hashed
# nodes. If it isn't, a security bypass is possible.
ffit = '%stest.forged.fit' % tmpdir
... |
<vulnerable_code> (type, value, traceback) = sys.exc_info()
raise FailedSource(value)
####################################################################################################################
# Externally used methods
#
@return: a serialized RDF Graph
@rtype: string
"""
# This is better beca... |
<vulnerable_code>}
Variant HHVM_FUNCTION(mcrypt_get_block_size, const String& cipher,
const Variant& module /* = null_string */) {
MCRYPT td = mcrypt_module_open((char*)cipher.data(),
(char*)MCG(algorithms_dir).data(),
... |
<vulnerable_code> if (Parser.canParse(jeName.toLowerCase())) {
InputStream inputStream = jf.getInputStream(je);
File copyFile = new File(file, jeName);
copyFile.getParentFile().mkdirs();
Files.copy(inputStream, copyFile.toPath());
if (matchesXmlPathInJar(je)) {<c... |
<vulnerable_code>
import com.google.common.base.CaseFormat;
import com.google.common.collect.ImmutableSet;
import java.util.Set;
import javax.el.BeanELResolver;
import javax.el.ELContext;
}
private void checkRestrictedClass(Object o, Object method) {
if (o instanceof Class || o instanceof ClassLoader || o inst... |
<vulnerable_code>void WasmBinaryBuilder::readUserSection(size_t payloadLen) {
auto oldPos = pos;
Name sectionName = getInlineString();
if (sectionName.equals(BinaryConsts::UserSections::Name)) {
readNames(payloadLen - (pos - oldPos));
} else {
// an unfamiliar custom section
if (sectionName.equals(B... |
<vulnerable_code> }
while (input[0] && input[0] != '\n') input++;
line++;
lineStart = ++input;
} else if (input[0] == '(' && input[1] == ';') {
// Skip nested block comments.
input += 2;
int depth = 1;
while (1) {
if (input[0] == 0) {
return;
... |
<vulnerable_code># limitations under the License.
import logging
import twisted.internet.ssl
logger = logging.getLogger(__name__)
return twisted.internet._sslverify.OpenSSLCertificateAuthorities([caCert.original])
else:
return twisted.internet.ssl.OpenSSLDefaultPaths()<commit_title>[... |
<vulnerable_code>from twisted.internet import defer
from twisted.internet.endpoints import HostnameEndpoint, wrapClientTLS
from twisted.internet.interfaces import IStreamClientEndpoint
from twisted.web.client import URI, Agent, HTTPConnectionPool, RedirectAgent, readBody
from twisted.web.http import stringToDatetime
fr... |
<vulnerable_code> method: "POST",
params: {
id: this.document.id,
path: el.getValue()
},
... |
<vulnerable_code> return email.replace(/[^a-zA-Z0-9_\-@.+]/g,'');
};
pimcore.helpers.registerKeyBindings = function (bindEl, ExtJS) {
if (!ExtJS) {<commit_title>[PATCH] optimized urlslug input<commit_description><fixed_code>
return email.replace(/[^a-zA-Z0-9_\-@.+]/g,'');
};
pimcore.helpers.sanitizeUrlSlu... |
<vulnerable_code>#include <stdlib.h>
#include <stdbool.h>
#include <stdarg.h>
#include <string.h>
#include <unistd.h>
#include <libgen.h>
#include "compat/msw_missing.h"
#endif
// Change two hex character to one hex value.
char _q_x2c(char hex_up, char hex_low)
{
char digit;
break;
}
... |
<vulnerable_code><commit_title>[PATCH] security update: add check on improperly encoded input<commit_description><fixed_code>
/******************************************************************************
* qunit - C Unit Test Framework
*
* Copyright (c) 2014-2022 Seungyoung Kim.
* All rights reserved.
*
* Redis... |
<vulnerable_code><commit_title>[PATCH] security update: add check on improperly encoded input<commit_description><fixed_code>
/******************************************************************************
* qLibc
*
* Copyright (c) 2010-2015 Seungyoung Kim.
* All rights reserved.
*
* Redistribution and use in sou... |
<vulnerable_code> :license: BSD, see LICENSE for more details.
"""
import warnings
try:
import cPickle as pickle
except ImportError: # pragma: no cover
import pickle # type: ignore
def iteritems_wrapper(mappingorseq):
self,
default_timeout=300,
serializer_impl=pickle,
seri... |
<vulnerable_code>import json
class BytesSerializer:
def loads(self, obj, *args, **kwargs):
if isinstance(obj, bytes):
obj = obj.decode()
return json.loads(obj, *args, **kwargs)
def load(self, fp, *args, **kwargs):
return self.loads(fp.read(), *args, **kwargs)
json_bytes ... |
<vulnerable_code># -*- coding: utf-8 -*-
import errno
import json
import os
try:
import cPickle as pickle
except ImportError: # pragma: no cover
import pickle # type: ignore
import flask
import pytest
import flask_caching as fsc
from flask_caching.serialization import json_bytes
# build the path to the uws... |
<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>from unittest.mock import MagicMock, Mock, patch
from flask_appbuilder import ModelView
from flask_appbuilder.exceptions import PasswordComplexityValidationError
client = self.app.test_client()
_ = self.browser_login(client, USERNAME_ADMIN, PASSWORD_ADMIN)
read_ony_user: User ... |
<vulnerable_code> expdesc key;
singlevaraux(fs, ls->envn, var, 1); /* get environment variable */
lua_assert(var->k != VVOID); /* this one must exist */
codestring(&key, varname); /* key is variable name */
luaK_indexed(fs, var, &key); /* env[varname] */
}<commit_title>[PATCH] Bug: Lua can gene... |
<vulnerable_code> s.add("org.aoju.bus.proxy.provider.RmiProvider");
s.add("org.aoju.bus.proxy.provider.remoting.RmiProvider");
// [databind#2664]: activemq-jms
s.add("org.apache.activemq.jms.pool.XaPooledConnectionFactory");
// [databind#2666]: apache/commons-jms
s.add("... |
<vulnerable_code>
DEBUG_MSG("\tDissector_imap AUTHENTICATE LOGIN USER");
//SAFE_CALLOC(user, strlen((const char*)ptr), sizeof(char));
/* username is encoded in base64 */
i = base64decode((const char*)ptr, &user);
<commit_title>[PATCH] Fix get_decode_len ignored strlen retu... |
<vulnerable_code>int get_decode_len(const char *b64_str) {
int len = strlen(b64_str);
int padding = 0;
if (b64_str[len-1] == '=' && b64_str[len-2] == '=')
padding = 2;
else if (b64_str[len-1] == '=')<commit_title>[PATCH] Fix get_decode_len ignored strlen return value<commit_description><fixed_code>
in... |
<vulnerable_code> kiwitcms-tenants is installed.
"""
def save( # pylint: disable=too-many-arguments
self,
domain_override=None,<commit_title>[PATCH] Show captcha on password reset form if enabled<commit_description><fixed_code>
kiwitcms-tenants is installed.
"""
captcha = (
... |
<vulnerable_code> user = User.objects.create_user("kiwi-tester", "tester@example.com", "password")
user.is_active = True
user.save()
data = {"email": "tester@example.com"}
response = self.client.post(self.password_reset_url, data, follow=True)
self.assertContains(response... |
<vulnerable_code><commit_title>[PATCH] test: move IT to another module<commit_description><fixed_code>
|
<vulnerable_code>
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
DelegatingSerializationFilter filter = new DelegatingSerializationFilter();
filter.setFilter(in, "org.keycloak.KeycloakSecurityContext;org.keycloak.KeycloakPrincipal;!*");
in.defaultR... |
<vulnerable_code> return result;
}
//! resolveLens0x32c print lens in human format
std::ostream& resolveLens0x32c(std::ostream& os, const Value& value,
const ExifData* metadata)
unsigned long index = 0;
// http://www.sno.phy.... |
<vulnerable_code> parser.parseCommentOptions(expr.range);
if (commentErrors) {
for (const { cause: e, comment } of commentErrors) {
parser.state.module.addWarning(
new CommentCompilationWarning(
`Compilation error while processing magic comment(-s): /*${comment.value}*/: ${e.message}`... |
<vulnerable_code> return EMPTY_COMMENT_OPTIONS;
}
let options = {};
let errors = [];
for (const comment of comments) {
const { value } = comment;
options[key] = val;
}
} catch (e) {
errors.push({ comment, cause: e });
}
}
}<commit_title>[PATCH] chore: revert breaking change<com... |
<vulnerable_code> break;
case 93:
if (pline) pline->vertexnum = reader->getInt32();
else loop->numedges = reader->getInt32();//aqui reserve
break;
case 98: //seed points ??
clearEntities();<commit_title>[PATCH] Added NULL check for hatch code 93<commit_description>This fix... |
<vulnerable_code> * @returns {String} The String freed of excess whitespace
*/
function trim(str) {
return str.replace(/^\s*/, '').replace(/\s*$/, '');
}
/**<commit_title>[PATCH] Security fix for ReDoS (#3980)<commit_description><fixed_code>
* @returns {String} The String freed of excess whitespace
*/
function tr... |
<vulnerable_code> groups_local = self.hs.get_groups_local_handler()
assert isinstance(
groups_local, GroupsLocalHandler
), "Misconfiguration of workers for groups."
res = await groups_local.on_invite(group_id, user_id, content)
local_attestation... |
<vulnerable_code> assert_params_in_dict(
content, ("name", "avatar_url", "short_description", "long_description")
)
assert isinstance(self.groups_handler, GroupsLocalHandler)
await self.groups_handler.update_group_profile(
group_id, requester_user_id, content
... |
<vulnerable_code> break; // all the lines are processed
ga_concat(&ga, ((char_u **)sp->buflines.ga_data)[sp->buf_lnum]);
sp->buf_lnum++;
buf = (char_u *)ga.ga_data;
}
else
{<commit_title>[PATCH] patch 8.2.4647: "source" can read past end of copied line<commit_description>Problem: "source" can... |
<vulnerable_code>
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4646,
/**/<commit_title>[PATCH] patch 8.2.4647: "source" can read past end of copied line<commit_description>Problem: "source" can read past end of copied line.
Solution: Add a terminating NUL.<fixed_code>
st... |
<vulnerable_code> clone_info = NULL;
}
if (logging) (void)LogMagickEvent(CoderEvent,GetMagickModule(),"return");
if(image==NULL)
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
return (image);<commit_title>[PATCH] https://github.com/ImageMagick/ImageMagick/issues/587<commit_description><fi... |
<vulnerable_code> File inputSpecTempFile = inputSpecFile;
if (inputSpecRemoteUrl != null) {
inputSpecTempFile = File.createTempFile("openapi-spec", ".tmp");
URLConnection conn = inputSpecRemoteUrl.openConnection();
if (isNotEmpty(auth)) {<commit_title>[PATCH] use Fil... |
<vulnerable_code>var path = require('path');
var spawn = require("child_process").spawn;
var exec = require("child_process").exec;
var EventEmitter = require('events').EventEmitter;
var debug = require('debug')('launchpad:local:instance');
var rimraf = require('rimraf');
if (this.options.command.indexOf('open') ===... |
<vulnerable_code> assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
if ((image->columns > 65535UL) || (image->rows > 65535UL))
ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit");
assert(exc... |
<vulnerable_code>import { platform, arch } from 'os'
import { platformArchTriples } from '@napi-rs/triples'
import Log from '../output/log'
const ArchName = arch()
const PlatformName = platform()<commit_title>[PATCH] Ensure invalid URLs respond with 400 correctly (#32092)<commit_description>This ensures we catch any e... |
<vulnerable_code>/* global browserName */
import webdriver from 'next-webdriver'
import { readFileSync } from 'fs'
import url from 'url'
import { join } from 'path'
import {
module.exports = (context) => {
describe('With Security Related Issues', () => {
it('should only access files inside .next directory', asyn... |
<vulnerable_code>{
UChar *p;
if (range == 0) goto fail;
range += reg->dist_min;
p = s;
retry:
}
}
/* no needs to adjust *high, *high is used as range check only */
if (reg->dist_max != INFINITE_LEN) {
*low = p - reg->dist_max;
*high = p - reg->dist_min;
*high = onigenc_... |
<vulnerable_code><commit_title>[PATCH] tests/main/snap-seccomp-blocks-tty-injection: spread test<commit_description><fixed_code>
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <linux/tiocl.h>
#include <linux/vt.h>
int main(void)
{
int res;
printf("\33[H\33[2J");
pr... |
<vulnerable_code><commit_title>[PATCH] tests/main/snap-seccomp-blocks-tty-injection: spread test<commit_description><fixed_code>
#define _GNU_SOURCE
#include <termios.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/syscall.h>
#include <errno.h>
static int ioctl64(int fd, unsigned long nr... |
<vulnerable_code> if (!esize) {
/* Exponent is zero, result is 1 mod MOD, i.e., 1 or 0
* depending on if MOD equals 1. */
rp[0] = 1;
res->nlimbs = (msize == 1 && mod->d[0] == 1) ? 0 : 1;
res->sign = 0;
goto leave;
}<commit_title>[PATCH] mpi: Fix NULL ptr dereference in mpi_powm() [ver #3]<commit_descript... |
<vulnerable_code> /* Handle SSI tag */
buf[len] = 0;
if (!memcmp(buf + 5, "include", 7)) {
do_ssi_include(conn, path, buf + 12, include_level + 1);
#if !defined(NO_POPEN)
} else if (!memcmp(buf + 5, "exec", 4)) {
do_ssi_exec(conn, buf + 9);
#endif /* !NO_POPEN */
} else {<commit_tit... |
<vulnerable_code> receivedMessages.add(dc);
}
private String followRedirect(String redirectUrl, int redirectCount, String origUrl) {
if (redirectCount > MAX_REDIRECTS) {
log.error("Max redirect reached for callback url=[{}]", origUrl);
return null;
}
URL presUrl;
try {
presUrl = new URL(redirectU... |
<vulnerable_code>import java.io.FilenameFilter;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concu... |
<vulnerable_code>import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.InetAddress;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.concurrent.Executors;
import java.util.concurrent.Futu... |
<vulnerable_code>import java.io.IOException;
import java.net.*;
import java.util.ArrayList;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
private String presentationBaseURL;
private String presentationDir;
private String BLAN... |
<vulnerable_code> String host = url.getHost();
if(presentationDownloadSupportedProtocols.stream().noneMatch(p -> p.equalsIgnoreCase(protocol))) {
log.error("Invalid protocol [{}]", protocol);
return false;
}
if(presentationDownloadBlockedH... |
<vulnerable_code>
if(presentationDownloadSupportedProtocols.stream().noneMatch(p -> p.equalsIgnoreCase(protocol))) {
if(presentationDownloadSupportedProtocols.size() == 1 && presentationDownloadSupportedProtocols.get(0).equalsIgnoreCase("*")) {
log.info("Warning: All prot... |
<vulnerable_code> InetAddress[] addresses = InetAddress.getAllByName(url.getHost());
InetAddressValidator validator = InetAddressValidator.getInstance();
for(InetAddress address: addresses) {
if(!validator.isValid(address.getHostAddress())) {
log.e... |
<vulnerable_code> private String presentationBaseURL;
private String presentationDir;
private String BLANK_PRESENTATION;
private List<String> presentationDownloadSupportedProtocols;
private List<String> presentationDownloadBlockedHosts;
private ScheduledExecutorService scheduledThreadPool = Exec... |
<vulnerable_code>BookMeta = namedtuple('BookMeta', 'file_path, extension, title, author, cover, description, tags, series, '
'series_id, languages, publisher')
STABLE_VERSION = {'version': '0.6.16 Beta'}
NIGHTLY_VERSION = {}
NIGHTLY_VERSION[0] = '$Format:%H$'<commit_title>[PATCH] Upa... |
<vulnerable_code> sess->rtcp_rr_pkt.common.pt = RTCP_RR;
sess->rtcp_rr_pkt.common.length = pj_htons(7);
/* Get time and timestamp base and frequency */
pj_gettimeofday(&now);
sess->tv_base = now;<commit_title>[PATCH] Merge pull request from GHSA-vhxv-phmx-g52q<commit_description>* Prevent OOB read/w... |
<vulnerable_code> unsigned nack_cnt,
const pjmedia_rtcp_fb_nack nack[])
{
pjmedia_rtcp_common *hdr;
pj_uint8_t *p;
unsigned len, i;
return PJ_ETOOSMALL;
/* Build RTCP-FB NACK header */
hdr = (pjmedia_rtcp_common*)buf;
pj_memcpy(hdr, &session->rtcp_rr_pkt.common, sizeof(*hdr));
h... |
<vulnerable_code> try {
// newInstance() et pas newFactory() pour java 1.5 (issue 367)
final XMLInputFactory factory = XMLInputFactory.newInstance();
final XMLStreamReader xmlReader;
if (charEncoding != null) {
xmlReader = factory.createXMLStreamReader(stream, charEncoding);<commit_title>[PATCH] fix fo... |
<vulnerable_code># Windows extension modules
WINDOWS_MODULES = (
'_msi',
'_testconsole',
'_winapi',
'msvcrt',<commit_title>[PATCH 003/413] bpo-43651: Fix EncodingWarning in test_io (GH-25097)<commit_description><fixed_code>
# Windows extension modules
WINDOWS_MODULES = (
'_msi',
'_overlapped',
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.