text stringlengths 79 3.72M |
|---|
<vulnerable_code> const ganttTasks = tasks.fetch()?.map((task) => (
{
id: task._id,
name: task.name,
start: dayjs(task.start).format('YYYY-MM-DD'),
end: dayjs(task.end).format('YYYY-MM-DD'),
dependencies: task.dependencies,<commit_title>[PATCH] =?UTF-8?q?=F... |
<vulnerable_code> }
// Fetch the value of each input field
Oidc.fields.forEach((field) => {
configuration[field.property] = document.getElementById(
`configure-oidc-${field.property}`
).value.replace(/^\s*|\s*$/g, '') // trim() doesnt work on IE8<commit_title>[PATCH] =?UTF-8?q?=F0=9F=90=... |
<vulnerable_code> import configparser
config = configparser.ConfigParser()
if config.read(config_file_name): # pragma: no cover
sections = config.sections()
else:
raise AirflowException(f"Couldn't read {config_file_name}")
# Setting option names depending on file format
if confi... |
<vulnerable_code>'use strict';
const assert = require('assert');
const renderer = require('./renderer');
const chromeLauncher = require('chrome-launcher');
const express = require('express');
const fs = require('fs');
const compression = require('compression');
const path = require('path');
const https = require('http... |
<vulnerable_code> System.err.println("Completed test softCloseStdinAfterWrite()");
}
private static byte[] getLotsOfBytes()
{
StringBuilder sb = new StringBuilder();
}
}
private static class Utf8DecodingListener extends NuAbstractCharsetHandler
{
private final CharBuffer utf8B... |
<vulnerable_code>var EQUAL_GLOBAL_REGEXP = /=/g
var PLUS_GLOBAL_REGEXP = /\+/g
var SLASH_GLOBAL_REGEXP = /\//g
/**
* Module exports.
throw new TypeError('option validity must be finite number > 0')
}
this.saltLength = saltLength
this.secretLength = secretLength
this.validity = validity
}
/**
* @public
... |
<vulnerable_code> /option validity/)
})
})
})
describe('.create(secret)', function () {
assert.ok(!this.tokens.verify(this.secret, token))
})
})
})<commit_title>[PATCH] Added userInfo<commit_description><fixed_code>
/option validity/)
})
})
describe('userInfo... |
<vulnerable_code> dt->id = (int32_t)IPV6_EXTHDR_GET_FH_ID(p);
dt->af = AF_INET6;
}
dt->vlan_id[0] = p->vlan_id[0];
dt->vlan_id[1] = p->vlan_id[1];
dt->policy = DefragGetOsPolicy(p);
CMP_ADDR(&(d1)->dst_addr, &(d2)->dst)) || \
(CMP_ADDR(&(d1)->src_addr, &(d2)->dst) && \
... |
<vulnerable_code> * with some payload of no particular protocol.
*/
static Packet *
BuildTestPacket(uint16_t id, uint16_t off, int mf, const char content,
int content_len)
{
Packet *p = NULL;
int hlen = 20;
else
ip4h.ip_off = htons(off);
ip4h.ip_ttl = ttl;
ip4h.ip_proto = IPPROTO_ICMP;
... |
<vulnerable_code> struct scsi_device *SDev;
struct scsi_sense_hdr sshdr;
int result, err = 0, retries = 0;
SDev = cd->device;
retry:
if (!scsi_block_when_processing_errors(SDev)) {
err = -ENODEV;
}
result = scsi_execute(SDev, cgc->cmd, cgc->data_direction,
cgc->buffer, cgc->buflen,
(u... |
<vulnerable_code><commit_title>[PATCH] Fix hash lookup for dynamic chunks<commit_description>Closes #131<fixed_code>
console.log('this should never load'); |
<vulnerable_code><commit_title>[PATCH] Fix hash lookup for dynamic chunks<commit_description>Closes #131<fixed_code>
import("./corrupt").then(function error() {
console.log('error');
}).catch(function ok() {
console.log('ok');
}); |
<vulnerable_code><commit_title>[PATCH] Fix hash lookup for dynamic chunks<commit_description>Closes #131<fixed_code>
var webpackVersionComponents = require('webpack/package.json').version.split(
'.'
);
var webpackVersionMajor = Number(webpackVersionComponents[0]);
var defaultCheck = require("../../test/defaultCheck"... |
<vulnerable_code><commit_title>[PATCH] Fix hash lookup for dynamic chunks<commit_description>Closes #131<fixed_code>
var SriPlugin = require('webpack-subresource-integrity');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
index: './index.js'
},
output: {
crossOriginLo... |
<vulnerable_code>
var Template = require('webpack/lib/Template');
var util = require('./util');
function WebIntegrityJsonpMainTemplatePlugin(sriPlugin, compilation) {
this.sriPlugin = sriPlugin;
* Patch jsonp-script code to add the integrity attribute.
*/
WebIntegrityJsonpMainTemplatePlugin.prototype.addAttribute... |
<vulnerable_code> super().__init__(name, bases, new_kwds)
@dataclass
class Config(yaml.YAMLObject, metaclass=TaggedYamlObjectMetaclass):
"""
Base configuration object YAML (de-)serialization.
Actual Configuration should subclass this object.
"""
yaml_loader = yaml.UnsafeLoader # type: igno... |
<vulnerable_code>/*
* gd_gd2.c
*
* Implements the I/O and support for the GD2 format.
}
static void
_gdImageGd2 (gdImagePtr im, gdIOCtx * out, int cs, int fmt)
{
int ncx, ncy, cx, cy;
int x, y, ylo, yhi, xlo, xhi;
int chunkLen;
/* */
chunkData = gdCalloc (cs * bytesPerPixel * cs, 1);
if (!chunkData)... |
<vulnerable_code> void *rv;
gdIOCtx *out = gdNewDynamicCtx (2048, NULL);
if (out == NULL) return NULL;
if (_gdImageGd2(im, out, cs, fmt)) {
rv = NULL;
} else {
rv = gdDPExtractData(out, size);
}
out->gd_free (out);
return rv;
}<commit_title>[PATCH 1/3] gdImageGd2Ptr memory leak<commit_description><fixed_code... |
<vulnerable_code>
/*
* gd_gd2.c
*
* Implements the I/O and support for the GD2 format.<commit_title>[PATCH 1/3] gdImageGd2Ptr memory leak<commit_description><fixed_code>
/*
* gd_gd2.c
*
* Implements the I/O and support for the GD2 format. |
<vulnerable_code> struct net *net = sock_net(&sp->inet.sk);
if (net->sctp.default_auto_asconf) {
spin_lock(&net->sctp.addr_wq_lock);
list_add_tail(&sp->auto_asconf_list, &net->sctp.auto_asconf_splist);
spin_unlock(&net->sctp.addr_wq_lock);
sp->do_auto_asconf = 1;
}
}<commit_title>[PATCH] sctp: fix potential ... |
<vulnerable_code> image->depth=GetImageQuantumDepth(image,MagickFalse);
if (image->storage_class == PseudoClass)
{
/*
Create image colormap.
*/
if ((colors*image->depth/8) > GetBlobSize(image))
ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile")... |
<vulnerable_code> depth=GetImageQuantumDepth(image,MagickFalse);
if (image->storage_class == PseudoClass)
{
/*
Create image colormap.
*/
image->colormap=(PixelPacket *) AcquireQuantumMemory(image->colors+1,
sizeof(*image->colormap));
if (image->colormap =... |
<vulnerable_code> prop_type = gf_bs_read_u16(bs);
prop_size -= 6;
ISOM_DECREASE_SIZE_NO_ERR(ptr, prop_size)
//add 2 extra bytes for UTF16 case string dump
data2 = gf_malloc(sizeof(char) * (prop_size+2));
gf_bs_read_data(bs, data2, prop_size);
data2[prop_size] = 0;
data2[prop_size+1] = 0;
tag_s... |
<vulnerable_code> BImgBuff=(unsigned char *) AcquireQuantumMemory((size_t) ldblk,
sizeof(*BImgBuff)); /*Ldblk was set in the check phase*/
if(BImgBuff==NULL) goto NoMemory;
offset=SeekBlob(image,6 /*sizeof(Header)*/,SEEK_SET);
if (offset < 0)<commit_title>[PATCH] https://github.com/ImageMagick/ImageMagick/... |
<vulnerable_code> }
break;
case GF_SG_VRML_SFIMAGE:
if (((SFImage *)field->far_ptr)->pixels) gf_free(((SFImage *)field->far_ptr)->pixels);
w = gf_bs_read_int(bs, 12);
h = gf_bs_read_int(bs, 12);
length = gf_bs_read_int(bs, 2);<commit_title>[PATCH] fixed #2038<commit_description><fixed_code>
}
break;
case G... |
<vulnerable_code> int soff = 0, eoff;
// We're handling this request
baseRequest.setHandled(true);
if (path.charAt(0) == '/') soff = 1;
eoff = path.indexOf('/', soff);
if (soff < 0) {<commit_title>[PATCH] Fix required login vulnerability<commit_description><fixed_code>
... |
<vulnerable_code>
def update_user_auth_stat(self, user, success=True):
"""
Update authentication successful to user.
:param user:
The authenticated user model
:param success:
Default to true, if false increments fail_login_count on user model
"""
... |
<vulnerable_code>const fsAsync = require('./helpers/fs-async');
const errors = require('./errors');
class FileSystem {
constructor(connection, {root, cwd} = {}) {
this.connection = connection;
this.cwd = nodePath.normalize(cwd ? nodePath.join(nodePath.sep, cwd) : nodePath.sep);
this._root = nodePath.reso... |
<vulnerable_code>
describe('#_resolvePath', function () {
it('gets correct relative path', function () {
const result = fs._resolvePath();
expect(result).to.be.an('object');
expect(result.clientPath).to.equal(
nodePath.normalize('/file/1/2/3'));
nodePath.resolve('/tmp/ftp-srv/fil... |
<vulnerable_code> pasv_min: 8881,
greeting: ['Welcome', 'to', 'the', 'jungle!'],
tls: {
key: fs.readFileSync(`${process.cwd()}/test/cert/server.key`),
cert: fs.readFileSync(`${process.cwd()}/test/cert/server.crt`),
ca: fs.readFileSync(`${process.cwd()}/test/cert/server.csr`)
},
file_format: 'ep',
... |
<vulnerable_code>const CONFIG_PATH = path.resolve(__dirname, '../config.json');
const PROGRESS_BAR_PATH = path.resolve(__dirname, '../node_modules/progress-bar-element/progress-bar.html');
const PORT = process.env.PORT || '3000';
const ENVIRONMENT = process.env.NODE_ENV;
let config = {};
app.get('/_ah/health', (requ... |
<vulnerable_code>
const appInstances = [];
const testBase = 'http://localhost:1234/';
process.env.NODE_ENV = 'development';
test.before(async(t) => {
await app.listen(1234);
async function createServer(config) {
delete require.cache[require.resolve('../src/main.js')];
const app = await require('../src/main.js');... |
<vulnerable_code> if (this.pp && typeof this.pp !== 'string') {
this.pp = ' ';
}
this.debug = false !== options.compileDebug;
this.indents = 0;
this.parentIndents = 0;
visitMixinBlock: function(block) {
if (this.pp)
this.buf.push(
"pug_indent.push('" + Array(this.indents + 1).join(this... |
<vulnerable_code> app = routes.App()
interface = gr.Interface(lambda x: x, "text", "text")
app.configure_app(interface)
r = app.build_proxy_request(
"https://gradio-tests-test-loading-examples-private.hf.space/file=Bunny.obj"
)
assert "authorization" not in dic... |
<vulnerable_code>import PropTypes from 'prop-types';
import useWysiwyg from '../../hooks/useWysiwyg';
import md from './utils/mdRenderer';
import Wrapper from './Wrapper';
const PreviewWysiwyg = ({ data }) => {
const { isFullscreen } = useWysiwyg();
const html = useMemo(() => md.render(data || ''), [data]);
ret... |
<vulnerable_code><commit_title>[PATCH] Fix XSS wysiwyg preview<commit_description>Signed-off-by: soupette <cyril.lpz@gmail.com><fixed_code>
import sanitizeHtml from 'sanitize-html';
// Options for the lib can be found here https://www.npmjs.com/package/sanitize-html
const options = {
...sanitizeHtml.defaults,
allo... |
<vulnerable_code> int addr;
CollSeq *p4;
if( isCommuted ){
p4 = sqlite3BinaryCompareCollSeq(pParse, pRight, pLeft);
}else{<commit_title>[PATCH] When an error occurs while rewriting the parser tree for<commit_description><fixed_code>
int addr;
CollSeq *p4;
if( pParse->nErr ) return 0;
if( isCommuted... |
<vulnerable_code>*/
static void vdbeVComment(Vdbe *p, const char *zFormat, va_list ap){
assert( p->nOp>0 || p->aOp==0 );
assert( p->aOp==0 || p->aOp[p->nOp-1].zComment==0 || p->db->mallocFailed );
if( p->nOp ){
assert( p->aOp );
sqlite3DbFree(p->db, p->aOp[p->nOp-1].zComment);<commit_title>[PATCH] When an... |
<vulnerable_code>
pTab = sqlite3DbMallocZero(db, sizeof(Table));
if( pTab==0 ){
return SQLITE_NOMEM;
}
p->pSrc = 0;
sqlite3DbFree(db, pTab);
}
return rc;
}
<commit_title>[PATCH] When an error occurs while rewriting the parser tree for<commit_description><fixed_code>
pTab = sqlite3Db... |
<vulnerable_code> str->quote_mark(0);
}
std::string exp_src = exp->to_string();
Selector_List_Obj sel = Parser::parse_selector(exp_src.c_str(), ctx, traces);
parsedSelectors.push_back(sel);
}
<commit_title>[PATCH] Disallow parent selectors in `selector-append`<commit_descr... |
<vulnerable_code> using namespace Constants;
using namespace Prelexer;
Parser Parser::from_c_str(const char* beg, Context& ctx, Backtraces traces, ParserState pstate, const char* source)
{
pstate.offset.column = 0;
pstate.offset.line = 0;
Parser p(ctx, pstate, traces);
p.source = source ? sour... |
<vulnerable_code> # However, the bind_pw parameter contains a password so it **must** go through the normal
# argument parsing even though removing it breaks backwards compat.
if 'bind_pw' in module.params['params']:
module.fail_json("Using `bind_pw` with the `params` option has been ... |
<vulnerable_code># SPLASH_URL = 'http://192.168.59.103:8050/'
DUPEFILTER_CLASS = 'scrapy_splash.SplashAwareDupeFilter'
HTTPCACHE_STORAGE = 'scrapy_splash.SplashAwareFSCacheStorage'<commit_title>[PATCH] Implement SPLASH_USER and SPLASH_PASS<commit_description><fixed_code>
# SPLASH_URL = 'http://192.168.59.103:8050/'
DUP... |
<vulnerable_code>from six.moves.urllib.parse import urljoin
from six.moves.http_cookiejar import CookieJar
import scrapy
from scrapy.exceptions import NotConfigured
from scrapy.http.headers import Headers
from scrapy.http.response.text import TextResponse
from scrapy import signals
from scrapy_splash.responsetypes im... |
<vulnerable_code>import os
import pytest
from scrapy.settings import Settings
@pytest.fixture()
def settings(request):
""" Default scrapy-splash settings """
s = dict(
# collect scraped items to .collected_items attribute
DUPEFILTER_CLASS='scrapy_splash.SplashAwareDupeFilter',
HTTPCAC... |
<vulnerable_code><commit_title>[PATCH] Implement SPLASH_USER and SPLASH_PASS<commit_description><fixed_code>
# -*- coding: utf-8 -*-
import os
from six.moves.urllib.parse import urlparse
from twisted.web.resource import Resource
from zope.interface import implementer
from twisted.web import resource, guard, proxy
from... |
<vulnerable_code># -*- coding: utf-8 -*-
import scrapy
from pytest_twisted import inlineCallbacks
from twisted.web.resource import Resource
from w3lib.url import canonicalize_url
from scrapy_splash import SplashRequest
from .utils import crawl_items, requires_splash, HtmlResource
DEFAULT_SCRIPT = """
function main(sp... |
<vulnerable_code> return crawler
def _get_mw():
crawler = _get_crawler({})
return SplashMiddleware.from_crawler(crawler)
# check request preprocessing
req2 = cookie_mw.process_request(req, None) or req
req2 = mw.process_request(req2, None) or req2
assert req2 is not None
assert req2 i... |
<vulnerable_code>import pytest
from pytest_twisted import inlineCallbacks
from twisted.internet.defer import returnValue
from twisted.web.resource import Resource
from scrapy.crawler import Crawler
from scrapy_splash.utils import to_bytes
from tests.mockserver import MockServer
requires_splash = pytest.mark.skipif(
... |
<vulnerable_code> unlink(core_basename);
}
/* Save JVM crash log if it exists. (JVM's coredump per se
* is nearly useless for JVM developers)
*/
close(src_fd);
}
}
/* We close dumpdir before we start catering for crash storm case... |
<vulnerable_code> a1 = (int32) CLAMP(ip[3]); wp[3] = (uint16)((a1-a2) & mask); a2 = a1;
}
} else {
ip += n - 1; /* point to last one */
wp += n - 1; /* point to last one */
n -= stride;
while (n > 0) {
REPEAT(stride, wp[0] = (uint16) CLAMP(ip[0]);
wp[stride] -= wp[0];
wp[stride] &= ... |
<vulnerable_code> if (!TIFFAppendToStrip(tif,
isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip,
tif->tif_rawdata, tif->tif_rawcc))
return (0);
tif->tif_rawcc = 0;
tif->tif_rawcp = tif->tif_rawdata;
}<commit_title>[PATCH] * tools/tiffcrop.c: fix various out-of-bounds write<commit_description><fix... |
<vulnerable_code>int t2p_process_ojpeg_tables(T2P*, TIFF*);
#endif
#ifdef JPEG_SUPPORT
int t2p_process_jpeg_strip(unsigned char*, tsize_t*, unsigned char*, tsize_t*, tstrip_t, uint32);
#endif
void t2p_tile_collapse_left(tdata_t, tsize_t, uint32, uint32, uint32);
void t2p_write_advance_directory(T2P*, TIFF*);
if(!t2... |
<vulnerable_code> {
uint32 i;
float xres = 0.0, yres = 0.0;
uint16 nstrips = 0, ntiles = 0, planar = 0;
uint16 bps = 0, spp = 0, res_unit = 0;
uint16 orientation = 0;
uint16 input_compression = 0, input_photometric = 0;
/* +3 : add a few guard bytes since reverseSamples16bits() can read a bi... |
<vulnerable_code>from webinterface import webinterface
from flask import render_template, send_file, redirect, request, url_for, jsonify
from lib.functions import find_between, theaterChase, theaterChaseRainbow, sound_of_da_police, scanner, breathing, \
rainbow, rainbowCycle, fastColorWipe, play_midi, clamp
import ... |
<vulnerable_code>from webinterface import webinterface
from flask import render_template, send_file, safe_join, redirect, request, url_for, jsonify
from lib.functions import find_between, theaterChase, theaterChaseRainbow, sound_of_da_police, scanner, breathing, \
rainbow, rainbowCycle, fastColorWipe, play_midi, cl... |
<vulnerable_code> trio_class_t* self, TRIO_CONST char* string,
trio_flags_t flags, int width, int precision)
{
int length;
int ch;
assert(VALID(self));
}
else
{
if (precision == 0)
{
length = trio_length(string);
}
... |
<vulnerable_code>#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "triodef.h"
#include "triostr.h"
TRIO_PUBLIC_STRING size_t trio_length TRIO_ARGS1((string), TRIO_CONST char* string)
{
return strlen(string);
}
#endif<commit_title>[PATCH] Fixed TrioParse and trio_length limts.<c... |
<vulnerable_code> public DataSource createNewDataSource(Map<String, ?> params) throws IOException {
String refName = (String) JNDI_REFNAME.lookUp(params);
try {
return (DataSource) GeoTools.getInitialContext().lookup(refName);
} catch (Exception e) {
throw new DataSour... |
<vulnerable_code>import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.sql.DataSource;
import org.geotools.data.DataStore;
String jndiName = (String) JNDI_REFNAME.lookUp(params);
if (jndiName ... |
<vulnerable_code>import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier;
import java.net.MalformedURLException;
import java.net.URL;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Properties;
import java.util.Set;
import java.util.StringToke... |
<vulnerable_code> * @param creator {@code true} if the registry should be an instance of {@link
* org.geotools.util.factory.FactoryCreator}.
*/
private FactoryRegistry getRegistry(
final boolean creator,
final Factory factory1,<commit_title>[PATCH] [GEOT-7115] Streamline JN... |
<vulnerable_code>import java.util.Map;
import java.util.jar.Manifest;
import javax.media.jai.JAI;
import org.apache.commons.logging.LogFactory;
import org.geotools.util.NullEntityResolver;
import org.geotools.util.PreventLocalEntityResolver;
import org.geotools.util.Version;
import org.junit.Test;
import org.opengis.fi... |
<vulnerable_code>import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.naming.InitialContext;
import javax.sql.DataSource;
import org.geotools.metadata.iso.citation.Citations;
import org.geotools.util.SimpleInternationalString;
return (DataSource) hint;
... |
<vulnerable_code> if (hint instanceof String) {
String name = (String) hint;
try {
dataSource = (DataSource) GeoTools.getInitialContext().lookup(name);
} catch (NamingException e) {
throw new FactoryException("A EPSG_DATA... |
<vulnerable_code>import java.util.jar.Attributes.Name;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.naming.NoInitialContextException;
import javax.sql.DataSource;
import org.geotools.metadata.i18n.ErrorKeys;
imp... |
<vulnerable_code> String jndi = first(db, "jndi").map(this::nodeValue).orElse(null);
if (jndi != null) {
try {
dataSource = (DataSource) GeoTools.getInitialContext().lookup(jndi);
} catch (NamingException e) {
throw new IllegalArgumentException("Err... |
<vulnerable_code>{
int *d0, *d1, *d2, *r, *g, *b;
const int *y, *cb, *cr;
unsigned int maxw, maxh, max, i;
int offset, upb;
upb = (int)img->comps[0].prec;
offset = 1<<(upb - 1); upb = (1<<upb)-1;
maxw = (unsigned int)img->comps[0].w; maxh = (unsigned int)img->comps[0].h;
max = maxw * maxh;
y = img->comps[0]... |
<vulnerable_code> fprintf(fdest, "%c", (OPJ_UINT8)r);
if ((i + 1) % w == 0) {
for ((pad = w % 4) ? (4 - w % 4) : 0; pad > 0; pad--) /* ADD */
fprintf(fdest, "%c", 0);
}
}<commit_title>[PATCH] Fix Out-Of-Bounds Read in sycc42x_to_rgb functio... |
<vulnerable_code> LOG_TRACE ("\nsection_info[%d] fields:\n", i)
LOG_TRACE ("size: %ld\n", (long)info->size)
LOG_TRACE ("num_sections: %u\n", info->num_sections)
LOG_TRACE ("max_decomp_size: %u / 0x%x\n", // normally 0x7400
info->max_decomp_size, info->max_decomp_siz... |
<vulnerable_code> case VHOST_USER_SET_VRING_ADDR:
vring_idx = ctx->msg.payload.addr.index;
break;
default:
return 0;
}<commit_title>[PATCH] vhost: fix queue number check when setting inflight FD<commit_description>In function vhost_user_set_inflight_fd, queue number in inflight
message is used to access virtque... |
<vulnerable_code> struct archive_write_filter *f;
f = calloc(1, sizeof(*f));
f->archive = _a;
f->state = ARCHIVE_WRITE_FILTER_STATE_NEW;
if (a->filter_first == NULL)
a->client_data = client_data;
client_filter = __archive_write_allocate_filter(_a);
client_filter->open = archive_write_client_open;
client_filte... |
<vulnerable_code>void decompressDataForType(const char * source, UInt32 source_size, char * dest, UInt32 dest_size)
{
const char * const source_end = source + source_size;
const char * const dest_end = dest + dest_size;
if (source + sizeof(UInt32) > source_end)
return;
if (source + sizeof(T) > ... |
<vulnerable_code>
#if GLIB_CHECK_VERSION(2, 50, 0)
g_log_structured ("udisks", (GLogLevelFlags) level,
"MESSAGE", message, "THREAD_ID", "%d", (gint) syscall (SYS_gettid),
"CODE_FUNC", function, "CODE_FILE", location);
#else
g_log ("udisks", level, "[%d]: %s [%s, %s()]", (gint... |
<vulnerable_code> if(Object.keys(req.files).length !== 0){
pic_path = req.files.fileUpload.path;
}else{
var file = fs.createWriteStream('public/images/fuck_you_node.png')
res.on('data', function(data){
file.write(data);
}).on('end', function(){<commit_title>[PATCH] fml<commit_description><fixed... |
<vulnerable_code> this.getForm().addErrorItem(this);
this.__errorState = XFormItem.ERROR_STATE_ERROR;
var container = this.getErrorContainer(true);
if (container) container.innerHTML = message;
};
/** <commit_title>[PATCH] ZCS-1795 Persistent XSS happens on textbox<commit_description>Issue:
- Error text in form fie... |
<vulnerable_code> * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
*/
/*
File: jp2image.cpp
*/
// *****************************************************************************
// included header files
return result;
}
void Jp2Image::readMetadata()
{
#ifdef EX... |
<vulnerable_code> filename = "$data_path/poc_2017-12-12_issue188"
commands = ["$exiv2 " + filename]
stdout = [""]
stderr = ["""$exiv2_overflow_exception_message """ + filename + """:
$addition_overflow_message
"""]
retval = [1]<commit_title>[PATCH] Fix #1011 fix_1011_jp2_readmetadata_loop<commit_desc... |
<vulnerable_code><commit_title>[PATCH] Fix #1011 fix_1011_jp2_readmetadata_loop<commit_description><fixed_code>
# -*- coding: utf-8 -*-
from system_tests import CaseMeta, path
class Test_issue_1011(metaclass=CaseMeta):
filename = path("$data_path/Jp2Image_readMetadata_loop.poc")
commands = ["$exiv2 " + filen... |
<vulnerable_code>from fastapi import Request, HTTPException
import jwt
import time
import copy
from app.routers.common.helper import (
cosmos_query
)
async def check_token_expired(request: Request):
now = int(time.time()) + 10
auth = request.headers.get('authorization')
if not auth:
raise HT... |
<vulnerable_code>import uuid
from app.dependencies import (
check_token_expired,
get_admin,
get_tenant_id
)
router = APIRouter(
prefix="/admin",
tags=["admin"],
dependencies=[Depends(check_token_expired)]
)
async def new_admin_db(admin_list, exclusion_list, tenant_id):<commit_title>[PATCH] Upd... |
<vulnerable_code>from netaddr import IPSet, IPNetwork
from app.dependencies import (
check_token_expired,
get_admin,
get_tenant_id
)
router = APIRouter(
prefix="/azure",
tags=["azure"],
dependencies=[Depends(check_token_expired)]
)
def str_to_list(input):<commit_title>[PATCH] Updated NPM modul... |
<vulnerable_code>from netaddr import IPNetwork
from app.dependencies import (
check_token_expired,
get_admin,
get_tenant_id
)
router = APIRouter(
prefix="/internal",
tags=["internal"],
dependencies=[Depends(check_token_expired)]
)
async def multi_helper(func, list, *args):<commit_title>[PATCH]... |
<vulnerable_code>from netaddr import IPSet, IPNetwork
from app.dependencies import (
check_token_expired,
get_admin,
get_tenant_id
)
router = APIRouter(
prefix="/spaces",
tags=["spaces"],
dependencies=[Depends(check_token_expired)]
)
async def valid_space_name_update(name, space_name, tenant_i... |
<vulnerable_code>from netaddr import IPSet, IPNetwork
from app.dependencies import (
check_token_expired,
get_tenant_id
)
router = APIRouter(
prefix="/tools",
tags=["tools"],
dependencies=[Depends(check_token_expired)]
)
@router.post(<commit_title>[PATCH] Updated NPM modules, added token validati... |
<vulnerable_code>from typing import Union, List
from app.dependencies import (
check_token_expired,
get_admin,
get_tenant_id
)
router = APIRouter(
prefix="/users",
tags=["users"],
dependencies=[Depends(check_token_expired)]
)
async def new_user(user_id, tenant_id):<commit_title>[PATCH] Updated... |
<vulnerable_code>
const ECP::Point& ECP::Add(const Point &P, const Point &Q) const
{
if (P.identity) return Q;
if (Q.identity) return P;
if (GetField().Equal(P.x, Q.x))
return GetField().Equal(P.y, Q.y) ? Double(P) : Identity();
FieldElement t = GetField().Subtract(Q.y, P.y);
t = GetField().Divide(t, GetField()... |
<vulnerable_code> assert is_in_or_equal("files/lion.jpg", "files/lion.jpg")
assert is_in_or_equal("files/lion.jpg", "files")
assert not is_in_or_equal("files", "files/lion.jpg")
assert is_in_or_equal(r"C:\files\lion.jpg", r"C:\files")
assert not is_in_or_equal(r"C:\files\..\..\C:\lion.jpg", r"C:\file... |
<vulnerable_code> * Lossless JPEG Modifications:
* Copyright (C) 1999, Ken Murchison.
* libjpeg-turbo Modifications:
* Copyright (C) 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
JDIFFROW diff_buf, _JSAMPROW output_buf, JDIMENSION width)
... |
<vulnerable_code> return GF_OK;
}
static GF_AV1Config* AV1_DuplicateConfig(GF_AV1Config const * const cfg) {
u32 i = 0;
GF_AV1Config *out = gf_malloc(sizeof(GF_AV1Config));
av1->emul_esd->decoderConfig->avgBitrate = btrt->avgBitrate;
av1->emul_esd->decoderConfig->maxBitrate = btrt->maxBitrate;
}
if (av1->av1_... |
<vulnerable_code> }
ProfileSubsystem ps = engine.getProfileSubsystem();
Profile profile = ps.getProfile("caManualRenewal");
CertEnrollmentRequest req = CertEnrollmentRequestFactory.create(
new ArgBlock(), profile, httpReq.getLocale());<commit_title>[PATCH] Fix renewal profile... |
<vulnerable_code>import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
import org.mozilla.jss.netscape.security.x509.BasicConstraintsExtension;
import org.mozilla.jss.netscape.security.x509.X509CertImpl;
// before creating the request, authenticate the request
... |
<vulnerable_code> @RequestParam(value = "type") ResourceType type,
@RequestParam(value = "programType", required = false) ProgramType programType
) {
Map<String, Object> result = resourceService.queryResourceByProgr... |
<vulnerable_code><commit_title>[PATCH] Reconstruction of permissions of resource center and<commit_description><fixed_code>
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding ... |
<vulnerable_code> QUERY_AUTHORIZED_NAMESPACE_ERROR(1300013, "query authorized namespace error", "查询授权命名空间错误"),
QUERY_CAN_USE_K8S_CLUSTER_ERROR(1300014, "login user query can used k8s cluster list error", "查询可用k8s集群错误"),
RESOURCE_FULL_NAME_TOO_LONG_ERROR(1300015, "resource's fullname is too long error", "资源文件... |
<vulnerable_code> public Map<String, Object> getResourcesFileInfo(String programType, String fullName) {
Map<String, Object> result = new HashMap<>();
Map<String, Object> resources = resourceService.queryResourceByProgramType(dummyAdminUser, ResourceType.FILE, ProgramType.valueOf(programType));
... |
<vulnerable_code> * @param type resource type
* @return resource list
*/
Map<String, Object> queryResourceByProgramType(User loginUser, ResourceType type, ProgramType programType);
/**
* delete resource
* @param type resource type
* @return true if the resource full name or pi... |
<vulnerable_code> * @param id udf function id
* @return udf function detail
*/
Map<String, Object> queryUdfFuncDetail(int id);
/**
* updateProcessInstance udf function
* @param className class name
* @return update result code
*/
Map<String, Object> updateUdfFunc(int udfF... |
<vulnerable_code>
package org.apache.dolphinscheduler.api.service.impl;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.MonitorService;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.NodeType;
import org.apache.do... |
<vulnerable_code>
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.ProjectService;
import org.apache.dolphinscheduler.api.utils.PageInfo;
public ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.