text stringlengths 79 3.72M |
|---|
<vulnerable_code>import com.lorepo.icf.properties.IStaticListProperty;
import com.lorepo.icf.properties.IStaticRowProperty;
import com.lorepo.icf.properties.IVideoProperty;
import com.lorepo.icf.utils.StringUtils;
import com.lorepo.icf.utils.URLUtils;
import com.lorepo.icf.utils.XMLUtils;
if( property instanceof IAud... |
<vulnerable_code>import com.lorepo.icf.properties.IFileProperty;
import com.lorepo.icf.properties.IHtmlProperty;
import com.lorepo.icf.properties.IImageProperty;
import com.lorepo.icf.properties.IListProperty;
import com.lorepo.icf.properties.IProperty;
import com.lorepo.icf.properties.IPropertyProvider;<commit_title>[... |
<vulnerable_code> "Gap_Binder_info": "Gap Binder verifies the contents of the gaps in addons it's coupled with, marking them appropriately in check answers mode and displaying correct answers in show answers mode",
"Gap_Binder_property_items": "Items",
"Gap_Binder_property_modules": "Modules' IDs (Text or Table)",
"... |
<vulnerable_code> let text = "";
presenter.configuration.filteredTokens.forEach((token) => {
text += token.value + " ";
const tokenElement = presenter.getWordTokenByIndex(token.index);
if (!tokenElement.length) {
return;<commit_title>[PATCH 07/33] Add ... |
<vulnerable_code> var movedInput = false;
var escClicked = false;
presenter.LAYOUT_TO_LANGUAGE_MAPPING = {
'french (special characters)' : "{ \
}"
};
function touchStartDecorator(func, element) {
$(element).on('click', function (ev) {
ev.preventDefault();
... |
<vulnerable_code><commit_title>[PATCH 07/33] Add getView() to Ordering (#852)<commit_description><fixed_code>
TestCase("[eKeyboard] Model validation", {
setUp: function () {
this.presenter = AddoneKeyboard_create();
this.presenter.getAllPageModulesIds = () => ['Text1', 'Text2', 'MultipleGap1'];
... |
<vulnerable_code> "eKeyboard_info": "е-клавиатура е виртуална клавиатура, която се показва след натискане на поле за въвеждане на текст.",
"eKeyboard_name": "е-клавиатура",
"eKeyboard_property_work_with": "Работи с",
"eKeyboard_property_layout_type": "Оформление",
"eKeyboard_property_custom_layout": "Оформление по ... |
<vulnerable_code> "eKeyboard_info": "eKeyboard is a virtual keyboard displayed right after clicking on the input/textarea the module works with.",
"eKeyboard_name": "eKeyboard",
"eKeyboard_property_work_with": "Work With",
"eKeyboard_property_layout_type": "Layout Type",
"eKeyboard_property_custom_layout": "Custom ... |
<vulnerable_code> "eKeyboard_info": "Clavier de caractères spéciaux est un clavier virtuel permettant d'intégrer des caractères spéciaux dans des modules auxquels il est lié.",
"eKeyboard_name": "Clavier de caractères spéciaux",
"eKeyboard_property_work_with": "Fonctionne avec",
"eKeyboard_property_layou... |
<vulnerable_code> "eKeyboard_info": "eKeyboard es un teclado virtual que aparece al dar clic en el área del texto definido anteriormente en Propiedades.",
"eKeyboard_name": "Teclado virtual",
"eKeyboard_property_work_with": "Trabajar con",
"eKeyboard_property_layout_type": "Disposición del teclado",
"eKeyboard_prop... |
<vulnerable_code> "eKeyboard_info" : "Wirtualna klawiatura, która pojawia się na ekranie po zaznaczeniu obszaru tekstowego współpracującego z Addonem.",
"eKeyboard_name" : "e-Klawiatura",
"eKeyboard_property_work_with": "Działa z",
"eKeyboard_property_layout_type": "Typ układu",
"eKeyboard_property_custom_layout": ... |
<vulnerable_code> }
xml += "</styles>";
Document xmlDocument = XMLParser.createDocument();
Element layouts = xmlDocument.createElement("layouts");
for(PageLayout pageLayout : layoutsContainer.getLayouts().values()) {
return setsLayouts;
}
public String getDefaultSemiResponsiveLayoutID() {
return this.l... |
<vulnerable_code> return this.actualLayoutID;
}
public void removeFromLayoutsStyle(CssStyle styleToDelete, HashMap<String, CssStyle> styles) {
String defaultCssStyle = "";
<commit_title>[PATCH 07/33] Add getView() to Ordering (#852)<commit_description><fixed_code>
return this.actualLayoutID;
}
public PageL... |
<vulnerable_code> private boolean isDefault = false;
private boolean useDeviceOrientation = false;
private DeviceOrientation deviceOrientation = DeviceOrientation.vertical;
public PageLayout(String id, String name) {
this.id = id;
this.name = name;
this.threshold = threshold;
this.styleID = id;
}
publi... |
<vulnerable_code> return groupedModules;
}
public void setRulers(List<Ruler> verticals, List<Ruler> horizontals) {
rulers.put("verticals", verticals);
rulers.put("horizontals", horizontals);
}
public List<Ruler> getRulersByType(String type) {
return rulers.get(type);
}
public HashMap<String, List<Ruler>... |
<vulnerable_code>
private int position;
private String type;
public Ruler() {}
this.position = position;
}
public String toXML() {
return "<" + type +">" + position + "</"+ type +">";
}
public String getType() {
return position;
}
public void setPosition(int position) {
this.position = position;
... |
<vulnerable_code> content.setStyles(this.parseStyles(child));
} else if(name.compareTo("layouts") == 0) {
content = this.parseLayouts(content, child);
}
else if(name.compareTo("pages") == 0){
this.parsePages(content, child, this.pagesSubset);<commit_title>[PATCH 07/33] Add getView() to Orderin... |
<vulnerable_code> pageLayout = this.parseLayoutStyle(pageLayout, child);
} else if (nodeName.compareTo("deviceOrientation") == 0) {
pageLayout = this.parseDeviceOrientation(pageLayout, child);
}
}
}
return pageLayout;
}
}<commit_title>[PATCH 07/33] Add getView() to Ordering (#852)<commit_des... |
<vulnerable_code>
import java.util.ArrayList;
import java.util.List;
import com.lorepo.icf.utils.StringUtils;
import com.lorepo.icf.utils.XMLUtils;
Element rulerNode = (Element) rulersNodes.item(i);
Ruler ruler = new Ruler();
ruler.setType(type);
ruler.setPosition((int) Double.parseDouble(rulerNode.getFir... |
<vulnerable_code> "edit_layouts_menu": "Управление на оформленията",
"add_new_semi_responsive_layout_name_label": "Име:",
"add_new_semi_responsive_layout_threshold_label": "Праг:",
"add_new_semi_responsive_layout_type_label": "Тип:",
"add_new_semi_responsive_layout_add_action": "Добави",
"add_new_semi_responsive_l... |
<vulnerable_code> "edit_layouts_menu": "Manage Layouts",
"add_new_semi_responsive_layout_name_label": "Name:",
"add_new_semi_responsive_layout_threshold_label": "Threshold:",
"add_new_semi_responsive_layout_type_label": "Type:",
"add_new_semi_responsive_layout_add_action": "Add",
"add_new_semi_responsive_layout_de... |
<vulnerable_code> "edit_layouts_menu": "Manage Layouts",
"add_new_semi_responsive_layout_name_label": "Name:",
"add_new_semi_responsive_layout_threshold_label": "Threshold:",
"add_new_semi_responsive_layout_type_label": "Type:",
"add_new_semi_responsive_layout_add_action": "Add",
"add_new_semi_re... |
<vulnerable_code> "edit_layouts_menu": "Gestionar Diseños",
"add_new_semi_responsive_layout_name_label": "Nombre:",
"add_new_semi_responsive_layout_threshold_label": "Límite:",
"add_new_semi_responsive_layout_type_label": "Tipo:",
"add_new_semi_responsive_layout_add_action": "Añadir",
"add_new_semi_responsive_layo... |
<vulnerable_code> "edit_layouts_menu": "Zarządzaj układami",
"add_new_semi_responsive_layout_name_label": "Nazwa:",
"add_new_semi_responsive_layout_threshold_label": "Wartość progowa:",
"add_new_semi_responsive_layout_type_label": "Rodzaj:",
"add_new_semi_responsive_layout_add_action": "Dodaj",
"add_new_semi_respo... |
<vulnerable_code> presenter.ERROR_CODES = {
'A_01': "At least one audio format file must be uploaded!",
'A_02': "Your browser does not support HTML5 audio or none of Addon media types!",
'A_03': "No audio media was loaded!",
'S_01': "Each slide must have Image property set properly!",... |
<vulnerable_code> }
res.append(':');
}
if (res.back() == ':') res.pop_back();
}
struct ListAddHelper : public AddableContainer <commit_title>[PATCH] Fix various bugs found by OSS-Fuze.<commit_description><fixed_code>
}
res.append(':');
}
if (!res.empty() && res.back() == ':')... |
<vulnerable_code> while ( (dir = els.next()) != 0 )
{
path = dir;
if (path.back() != '/') path += '/';
unsigned dir_len = path.size();
path += filename;<commit_title>[PATCH] Fix various bugs found by OSS-Fuze.<commit_description><fixed_code>
while ( (dir = els.next()) != 0 )
{
... |
<vulnerable_code> char * unescape(char * dest, const char * src)
{
while (*src) {
if (*src == '\\') {
++src;
switch (*src) {
case 'n': *dest = '\n'; break;<commit_title>[PATCH] Fix various bugs found by OSS-Fuze.<commit_description><fixed_code>
char * unescape(char * dest, const char * src)
{
wh... |
<vulnerable_code> try {
Files.createDirectories(parentDirPath);
} catch (IOException e) {
log.error("下载驱动时创建目录失败", e);
throw DomainErrors.DOWNLOAD_DRIVER_ERROR.exception(e);
}
}
});
} catch (RestClientException e) {
... |
<vulnerable_code> login_user(form.user, remember=remember_me, authn_via=["password"])
after_this_request(_commit)
if not _security._want_json(request):
return redirect(get_post_login_redirect())
if _security._want_json(request):
if current_user.is_authenticated:
... |
<vulnerable_code> version = re.search(r'__version__ = "(.*?)"', f.read()).group(1)
tests_require = [
"Flask-Mongoengine>=0.9.5",
"peewee>=3.11.2",
"Flask-SQLAlchemy>=2.3",
"argon2_cffi>=19.1.0",
"cryptography>=2.3.1",
"isort>=4.2.2",
"mock>=1.3.0",
"mongoengine>=0.15.3",
"mongomo... |
<vulnerable_code> assert response.status_code == 200
end_nqueries = get_num_queries(app.security.datastore)
assert current_nqueries is None or end_nqueries == (current_nqueries + 2)<commit_title>[PATCH] I421backport (#425)<commit_description>* Fix security vuln - GET on /login or /change could reveal authent... |
<vulnerable_code> /* initialize protocol header pointer */
skb->transport_header = skb->network_header + fragheaderlen;
skb->ip_summed = CHECKSUM_PARTIAL;
skb->csum = 0;
/* specify the length of each IP datagram fragment */
skb_shinfo(skb)->gso_size = maxfraglen - fragheaderlen;
skb_shinfo(skb)->gso_type... |
<vulnerable_code><commit_title>[PATCH 2/2] =?UTF-8?q?:arrow=5Fup:=20=E5=8D=87=E7=BA=A7=E4=BE=9D?=<commit_description><fixed_code>
package com.rymcu.forest.util;
import com.google.common.net.InternetDomainName;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Objects;
/**
* Created on 202... |
<vulnerable_code>
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.*;
/**
* 文件上传控制器
ret... |
<vulnerable_code> char tmp[16];
snprintf(tmp, sizeof(tmp), "%X\r\n", (unsigned int)res->buffer_pos);
if ((w = write(req, tmp, strlen(tmp))) <= 0) {
// Sorry for this monstrocity, gotta be cross-platform.
#if __STDC_VERSION__ >= 201112 && !defined(__STDC_NO_THREADS__)
static _Thread_local ti... |
<vulnerable_code> uint8_t llen = 0;
uint8_t label_depth = 0;
for (; data < lim; data += BGP_LABEL_BYTES) {
memcpy(label, data, BGP_LABEL_BYTES);
llen += BGP_LABEL_BYTES;
memcpy(&addpath_id, pnt, BGP_ADDPATH_ID_LEN);
addpath_id = ntohl(addpath_id);
pnt += BGP_ADDPATH_ID_LEN;
}
/* Fetch prefix length... |
<vulnerable_code>// = 0 : illegal or unknown to us
// > 0 : actual size
// < 0 : neg. of minimum size; total must be (0 mod 4) or (0 mod 8)
// 2021-12: gcc 11.2.1 does not support 'sizeof' in designated initializer.
// 2021-12: gcc 11.2.1 does not support [enum] as designator.
static const signed char lc_cmd_size[] = {... |
<vulnerable_code> dib_colormap=(unsigned char *) AcquireQuantumMemory((size_t)
(1UL << dib_info.bits_per_pixel),4*sizeof(*dib_colormap));
if (dib_colormap == (unsigned char *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
q=dib_colormap;
... |
<vulnerable_code>
if (!(context_iter_p->opts & SCANNER_SUCCESSFUL_CLASS_SCAN))
{
return;
}
<commit_title>[PATCH] Private identifier resolving should always construct new<commit_description><fixed_code>
if (!(context_iter_p->opts & SCANNER_SUCCESSFUL_CLASS_SCAN))
{
lexer_construct_litera... |
<vulnerable_code><commit_title>[PATCH] Private identifier resolving should always construct new<commit_description><fixed_code>
// Copyright JS Foundation and other contributors, http://js.foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance ... |
<vulnerable_code> ThrowReaderException(CorruptImageError,"ImproperImageHeader");
image->columns=width;
image->rows=height;
for (depth=1; (GetQuantumRange(depth)+1) < max_value; depth++)
if (depth >= 64)
break;
image->depth=depth;
status=SetImageExtent(image,image->columns,image->r... |
<vulnerable_code> else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
snd_usbmidi_free(umidi);
return err;
}
<commit_title>[PATCH] ALSA: usb-audio: avoid freeing umidi object twice<commit_description>The 'umidi' object will be free'd on the error path by snd_usbmidi_free()
when tearing dow... |
<vulnerable_code> # Not intended to be accessed directly
self.memory_allocator = memory_allocator
# Intermented values, used for internal IDs
self._internal_var_iter = 0
self._scope_id_iter = 0
def is_constant(self):
return self.constancy is Constancy.Constant or self... |
<vulnerable_code>from .parse_function import ( # noqa
is_default_func,
is_initializer,
parse_function,
)<commit_title>[PATCH] wip: rewrite private function frame code<commit_description><fixed_code>
from .common import ( # noqa
is_default_func,
is_initializer,
generate_lll_for_function,
) |
<vulnerable_code><commit_title>[PATCH] wip: rewrite private function frame code<commit_description><fixed_code>
# can't use from [module] import [object] because it breaks mocks in testing
from vyper.ast.signatures import FunctionSignature
from vyper.old_codegen import context as ctx
from vyper.old_codegen.context impo... |
<vulnerable_code> return copier
def parse_external_function(
code: vy_ast.FunctionDef, sig: FunctionSignature, context: Context, check_nonpayable: bool,
) -> LLLnode:
"""<commit_title>[PATCH] wip: rewrite private function frame code<commit_description><fixed_code>
return copier
def generate_lll_for_e... |
<vulnerable_code> return copier
def parse_internal_function(
code: vy_ast.FunctionDef, sig: FunctionSignature, context: Context
) -> LLLnode:
"""<commit_title>[PATCH] wip: rewrite private function frame code<commit_description><fixed_code>
return copier
def generate_lll_for_internal_function(
cod... |
<vulnerable_code># can't use from [module] import [object] because it breaks mocks in testing
from vyper.ast.signatures import FunctionSignature
from vyper.old_codegen import context as ctx
from vyper.old_codegen.context import Constancy
# NOTE black/isort conflict >>
from vyper.old_codegen.function_definitions.parse_e... |
<vulnerable_code>from vyper.old_codegen.function_definitions import (
is_default_func,
is_initializer,
parse_function,
)
from vyper.old_codegen.global_context import GlobalContext
from vyper.old_codegen.lll_node import LLLnode
for func_node in otherfuncs:
func_type = func_node._metadata["type"]... |
<vulnerable_code> raise TypeCheckFailure(f"Invalid output type: {sig.output_type}")
return output_placeholder, returner, output_size
def make_call(stmt_expr, context):
# ** Internal Call **
# Steps:
pre_init, expr_args = parse_sequence(stmt_expr, stmt_expr.args, context)
sig = FunctionSigna... |
<vulnerable_code> self.falcodir = self.params.get('falcodir', '/', default=os.path.join(self.basedir, '../build'))
self.stdout_contains = self.params.get('stdout_contains', '*', default='')
self.stderr_contains = self.params.get('stderr_contains', '*', default='')
self.exit_status = self... |
<vulnerable_code>
m_syscall_evt_drop_rate = m_config->get_scalar<double>("syscall_event_drops", "rate", 0.3333);
m_syscall_evt_drop_max_burst = m_config->get_scalar<double>("syscall_event_drops", "max_burst", 10);
}
void falco_configuration::read_rules_file_directory(const string &path, list<string> &rules_filenames... |
<vulnerable_code> m_num_actions(0),
m_inspector(NULL),
m_outputs(NULL),
m_next_check_ts(0)
{
}
}
void syscall_evt_drop_mgr::init(sinsp *inspector,
falco_outputs *outputs,
std::set<action> &actions,
double rate,
double max_tokens)
{
m_inspector = inspector;
m_outputs = outputs;
m_bucket.init(... |
<vulnerable_code>import { Meteor } from 'meteor/meteor';
import { API } from '../api';
import { findOrCreateInvite } from '../../../invites/server/functions/findOrCreateInvite';
import { removeInvite } from '../../../invites/server/functions/removeInvite';
post() {
const { token } = this.bodyParams;
if (!token) ... |
<vulnerable_code>import { Invites, Rooms } from '../../../models';
export const validateInviteToken = (token) => {
if (!token) {
throw new Meteor.Error('error-invalid-token', 'The invite token is invalid.', { method: 'validateInviteToken', field: 'token' });
}
<commit_title>[PATCH] Security fix<commit_description>... |
<vulnerable_code>
Meteor.methods({
getFullUserData({ filter = '', username = '', limit = 1 }) {
const result = getFullUserData({ userId: Meteor.userId(), filter: filter || username, limit });
return result && result.fetch();
},
});<commit_title>[PATCH] Security fix<commit_description><fixed_code>
Meteor.methods(... |
<vulnerable_code>
Meteor.methods({
getServerInfo() {
return Info;
},
});<commit_title>[PATCH] Security fix<commit_description><fixed_code>
Meteor.methods({
getServerInfo() {
if (!Meteor.userId()) {
console.warning('Method "getServerInfo" is deprecated and will be removed after v4.0.0');
throw new Meteor.E... |
<vulnerable_code>
Meteor.methods({
'livechat:loadHistory'({ token, rid, end, limit = 20, ls }) {
const visitor = LivechatVisitors.getVisitorByToken(token, { fields: { _id: 1 } });
if (!visitor) {<commit_title>[PATCH] Security fix<commit_description><fixed_code>
Meteor.methods({
'livechat:loadHistory'({ token, r... |
<vulnerable_code>import { Meteor } from 'meteor/meteor';
import { LivechatBusinessHours } from '../../../models/server/raw';
Meteor.methods({
'livechat:saveOfficeHours'(day, start, finish, open) {
console.log('Method "livechat:saveOfficeHour" is deprecated and will be removed after v4.0.0');
LivechatBusinessHour... |
<vulnerable_code>import { Random } from 'meteor/random';
import _ from 'underscore';
import _marked from 'marked';
import hljs from '../../hljs';
import { escapeHTML } from '../../../../../lib/escapeHTML';
highlight,
});
return message;
};<commit_title>[PATCH] Security fix<commit_description><fixed_code>
import ... |
<vulnerable_code> return token;
};
const validateUrl = (url) => {
try {
new URL(url);
return true;
// Support 
msg = msg.replace(new RegExp(`!\\[([^\\]]+)\\]\\(((?:${ schemes }):\\/\\/[^\\s]+)\\)`, 'gm'), (match, title, url) => {
if (!validateUrl(url)) {
return match;
}
co... |
<vulnerable_code> '<http://link|Text>': escapeHTML('<http://link|Text>'),
'<https://open.rocket.chat/|Open Site For Rocket.Chat>': escapeHTML('<https://open.rocket.chat/|Open Site For Rocket.Chat>'),
'<https://open.rocket.chat/ | Open Site For Rocket.Chat>': escapeHTML('<https://open.... |
<vulnerable_code> });
}
if (room) {
const lastMessage = Messages.findVisibleByRoomId({ rid: room, queryOptions: { limit: 1, sort: { ts: -1 } } }).fetch()[0];
if (lastMessage == null) {
throw new Meteor.Error('error-action-not-allowed', 'Not allowed', {
return Subscriptions.setAsUnreadByRoomIdAndUse... |
<vulnerable_code> toastr.error(TAPi18n.__('error-pinning-message'));
return false;
}
toastr.success(TAPi18n.__('Message_has_been_pinned'));
return ChatMessage.update({
_id: message._id,
}, {
$set: {
pinned: true,
toastr.error(TAPi18n.__('error-unpinning-message'));
return false;
}
toast... |
<vulnerable_code>import { Meteor } from 'meteor/meteor';
import { settings } from '../../settings';
import { callbacks } from '../../callbacks';
Meteor.methods({
pinMessage(message, pinnedAt) {
const userId = Meteor.userId();
if (!userId) {
throw new Meteor.Error('error-invalid-user', 'Invalid user', {
});... |
<vulnerable_code>import { Box } from '@rocket.chat/fuselage';
import React, { useMemo } from 'react';
import marked from 'marked';
import { escapeHTML } from '../../lib/escapeHTML';
marked.InlineLexer.rules.gfm.strong = /^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/;
marked.InlineLexer.rules.gfm.em... |
<vulnerable_code>(function() {
"use strict";
var Remarkable = require('remarkable'),
fs = require('fs'),
path = require('path'),
url = require('url'),
_self.highlight = _self.config.highlight || true;
delete _self.config.highlight;
parser = new Remarkable(_self.config);
});
},
<commit_ti... |
<vulnerable_code>int
decompileAction(int n, SWF_ACTION *actions, int maxn)
{
if( n > maxn ) SWF_error("Action overflow!!");
#ifdef DEBUG
fprintf(stderr,"%d:\tACTION[%3.3d]: %s\n",
actionName(actions[n].SWF_ACTIONRECORD.ActionCode));
#endif
switch(actions[n].SWF_ACTIONRECORD.ActionCode)
{
case SWFACTION_... |
<vulnerable_code> ptls_buffer_push16(buf, csid);
/* ticket_age_add */
ptls_buffer_push32(buf, ticket_age_add);
/* server-name */
ptls_buffer_push_block(buf, 2, {
if (server_name != NULL)
ptls_buffer_pushv(buf, server_name, strlen(server_name));
... |
<vulnerable_code> pctx->ctx.emit_certificate = NULL;
}
if (listener->quic.ctx != NULL) {
#if H2O_USE_FUSION
/* rebuild and replace the cipher suite list, replacing the corresponding ones to fusion */
assert(ret == 1);
}
return 0;
}
}
#endif
SSL_CTX_set_session_... |
<vulnerable_code> size_t i;
for (i = 0; i != num_contexts; ++i) {
SSL_CTX_set_session_cache_mode(contexts[i], SSL_SESS_CACHE_SERVER | SSL_SESS_CACHE_NO_AUTO_CLEAR);
SSL_CTX_set_session_id_context(contexts[i], H2O_SESSID_CTX, H2O_SESSID_CTX_LEN);
SSL_CTX_set_timeout(contexts[i], conf.lifet... |
<vulnerable_code> assert(ret == 1);
}
{ /* set session resumption context so that resumption will succeed only against the same certificate */
uint8_t session_ctx[SSL_MAX_SID_CTX_LENGTH];
unsigned session_ctx_len;
H2O_BUILD_ASSERT(sizeof(session_ctx) == SHA256_DIGEST_LENGTH);<com... |
<vulnerable_code> ptls_buffer_push16(buf, csid);
/* ticket_age_add */
ptls_buffer_push32(buf, ticket_age_add);
/* sessin ID context */
ptls_buffer_push_block(buf, 2, {
if (ctx->ticket_context.is_set) {
ptls_buffer_pushv(buf, ctx->ticket_context.bytes, s... |
<vulnerable_code>import typing
from enum import Enum
from tempfile import SpooledTemporaryFile
from urllib.parse import unquote_plus
END = 5
class MultiPartMessage(Enum):
PART_BEGIN = 1
PART_DATA = 2
PART_END = 3
HEADER_FIELD = 4
HEADER_VALUE = 5
HEADER_END = 6
HEADERS_FINISHED = 7
... |
<vulnerable_code> self._json = json.loads(body)
return self._json
async def _get_form(self) -> FormData:
if self._form is None:
assert (
parse_options_header is not None
content_type, _ = parse_options_header(content_type_header)
if con... |
<vulnerable_code> await response(scope, receive, send)
def test_multipart_request_data(tmpdir, test_client_factory):
client = test_client_factory(app)
response = client.post("/", data={"some": "data"}, files=FORCE_MULTIPART)
assert (
res.text == 'The Content-Disposition header field "na... |
<vulnerable_code> return false;
}
static bool start_coap_client(void)
{
struct addrinfo *addr;
return false;
}
ctx.sock = socket(addr->ai_family, SOCK_DGRAM, protocol);
if (ctx.sock < 0) {
LOG_ERR("Failed to create UDP socket");
return false;
}
#if defined(CONFIG_UPDATEHUB_DTLS)
if (setsockopt(ctx.sock, ... |
<vulnerable_code>import requests
import json
import logging
from salt.exceptions import CommandExecutionError
salt '*' serverdensity_device.install_agent c2bbdd6689ff46282bdaa07555641498
'''
work_dir = '/tmp/'
account_url = get_sd_auth('account_url')
__salt__['cmd.run'](
cmd='curl ht... |
<vulnerable_code> api = flask.current_app.config["PYLOAD_API"]
user_info = api.check_auth(user, password)
if not user_info:
log.error(f"Login failed for user '{user}'")
return jsonify(False)
s = set_session(user_info)
log.info(f"User '{user}' successfully logged in")
flask.flash... |
<vulnerable_code> password = flask.request.form["password"]
user_info = api.check_auth(user, password)
if not user_info:
log.error(f"Login failed for user '{user}'")
return render_template("login.html", next=next, errors=True)
set_session(user_info)
log.i... |
<vulnerable_code> ecma_object_t *func_object_p = ecma_get_object_from_value (cb_func_val);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
JMEM_DEFINE_LOCAL_ARRAY (pass_value_list_p, len * element_size, lit_utf8_byte_t);
lit_utf8_byte_t *pass_value_p = pass_value_list_p;
ret_value = ecma_op_create_typedarray_w... |
<vulnerable_code> s2 %= BASE;
}
assert(s1 < BASE);
assert(s2 < BASE);
m_s1 = (word16)s1;
m_s2 = (word16)s2;<commit_title>[PATCH] Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420) trap.h and<commit_description><fixed_code>
s2 %= BASE;
}
CRYPTOPP_ASSERT(s1 < BASE);
CRYPTOPP_ASSERT(s2 < BASE);
m_s1 = (word1... |
<vulnerable_code>
for (i=0; i<expCount; i++)
{
assert(expBegin->NotNegative());
exponents.push_back(WindowSlider(*expBegin++, InversionIsFast(), 0));
exponents[i].FindNextWindow();
buckets[i].resize(((size_t) 1) << (exponents[i].windowSize-1), Identity());<commit_title>[PATCH] Add CRYPTOPP_ASSERT (Issue 277, ... |
<vulnerable_code>void AlgorithmParametersBase::operator=(const AlgorithmParametersBase &rhs)
{
CRYPTOPP_UNUSED(rhs);
assert(false);
}
bool AlgorithmParametersBase::GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const<commit_title>[PATCH] Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420) t... |
<vulnerable_code> m_totalFooterLength += length;
break;
default:
assert(false);
}
}
AuthenticateData(outString, length);
break;
default:
assert(false);
}
}
break;
default:
assert(false);
}
m_state = State_KeySet;<commit_title>[PATCH] Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420) trap.h and<co... |
<vulnerable_code>
const time_t endTime = time(NULL);
err = localtime_s(&localTime, &endTime);
assert(err == 0);
err = asctime_s(timeBuf, sizeof(timeBuf), &localTime);
assert(err == 0);
cout << "\nTest ended at " << timeBuf;
#else<commit_title>[PATCH] Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420) trap.h and<comm... |
<vulnerable_code> int i1=8*j+i;
int i2=8*(11-j)+i;
assert(i1<i2);
std::swap(K[i1],K[i2]);
std::swap(K[i1+4],K[i2+4]);<commit_title>[PATCH] Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420) trap.h and<commit_description><fixed_code>
int i1=8*j+i;
int i2=8*(11-j)+i;
CRYPTOPP_ASSERT(i1<i2);
... |
<vulnerable_code> BlockCipher &cipher = AccessBlockCipher();
m_L = REQUIRED_BLOCKSIZE-1-(int)len;
assert(m_L >= 2);
if (m_L > 8)
m_L = 8;
if (headerLength>0)
{
assert(m_bufferedDataLength == 0);
if (headerLength < ((1<<16) - (1<<8)))
{<commit_title>[PATCH] Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420)... |
<vulnerable_code> // sign and verify
byte signature[40];
DSA::Signer signer(dsaPrivateKey);
assert(signer.SignatureLength() == 40);
signer.SignMessage(rng, message, 3, signature);
DSA::Verifier verifier(dsaPublicKey);<commit_title>[PATCH] Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420) trap.h and<commit_descriptio... |
<vulnerable_code>
void EAX_Base::AuthenticateLastHeaderBlock()
{
assert(m_bufferedDataLength == 0);
MessageAuthenticationCode &mac = AccessMAC();
unsigned int blockSize = mac.TagSize();
void EAX_Base::AuthenticateLastFooterBlock(byte *tag, size_t macSize)
{
assert(m_bufferedDataLength == 0);
MessageAuthenticatio... |
<vulnerable_code> this->SetSubgroupGenerator(G);
// TODO: this fails in practice. Should it throw?
CRYPTOPP_UNUSED(result); assert(result);
StringSource ssN(param.n, true, new HexDecoder);
m_n.Decode(ssN, (size_t)ssN.MaxRetrievable());<commit_title>[PATCH] Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420) trap.h and... |
<vulnerable_code>{
ArraySink sink(encodedPoint, EncodedPointSize(compressed));
EncodePoint(sink, P, compressed);
assert(sink.TotalPutLength() == EncodedPointSize(compressed));
}
ECP::Point ECP::BERDecodePoint(BufferedTransformation &bt) const
for (i=0; i<expCount; i++)
{
assert(expBegin->NotNegative());
expo... |
<vulnerable_code>
template <class T> void DL_FixedBasePrecomputationImpl<T>::Precompute(const DL_GroupPrecomputation<Element> &group, unsigned int maxExpBits, unsigned int storage)
{
assert(m_bases.size() > 0);
assert(storage <= maxExpBits);
if (storage > 1)
{<commit_title>[PATCH] Add CRYPTOPP_ASSERT (Issue 277, C... |
<vulnerable_code> m_stream->seekg(newPosition);
try
{
assert(!m_waiting);
lword copyMax = end-begin;
size_t blockedBytes = const_cast<FileStore *>(this)->TransferTo2(target, copyMax, channel, blocking);
begin += copyMax;<commit_title>[PATCH] Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420) trap.h and<commit_des... |
<vulnerable_code>#if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2
return AccessPowerUpSelfTestInProgress().GetValue() != NULL;
#else
assert(false); // should not be called
return false;
#endif
}<commit_title>[PATCH] Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420) trap.h and<commit_description><fixed_code>
#if CRYPTOPP_... |
<vulnerable_code>{
CRYPTOPP_UNUSED(rng), CRYPTOPP_UNUSED(recoverableMessage), CRYPTOPP_UNUSED(recoverableMessageLength);
CRYPTOPP_UNUSED(messageEmpty), CRYPTOPP_UNUSED(hashIdentifier);
assert(recoverableMessageLength == 0);
assert(hashIdentifier.second == 0);
const size_t representativeByteLength = BitsToBytes(re... |
<vulnerable_code> keylength = hash.DigestSize();
}
assert(keylength <= blockSize);
memset(AccessIpad()+keylength, 0, blockSize-keylength);
for (unsigned int i=0; i<blockSize; i++)
void HMAC_Base::KeyInnerHash()
{
assert(!m_innerHashKeyed);
HashTransformation &hash = AccessHash();
hash.Update(AccessIpad(), ha... |
<vulnerable_code>// should use an inline function but macros are still faster in MSVC 4.0
#define DirectMUL(a,b) \
{ \
assert(b <= 0xffff); \
\
word32 p=(word32)low16(a)*b; \
\<commit_title>[PATCH] Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420) trap.h and<commit_description><fixed... |
<vulnerable_code>
T* dataBuf = this->DataBuf();
byte* data = (byte *)dataBuf;
assert(dataBuf && data);
if (num != 0) // process left over data
{
{
if (input == data)
{
assert(len == blockSize);
HashBlock(dataBuf);
return;
}<commit_title>[PATCH] Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420) trap.h... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.