text
stringlengths
79
3.72M
<vulnerable_code>#define COAP_MAX_RETRY 3 #define MAX_IP_SIZE 30 #if defined(CONFIG_UPDATEHUB_CE) #define UPDATEHUB_SERVER CONFIG_UPDATEHUB_SERVER #else } ctx; static struct update_info { char package_uid[TC_SHA256_BLOCK_SIZE + 1]; char sha256sum_image[TC_SHA256_BLOCK_SIZE + 1]; int image_size; } update_info; r...
<vulnerable_code>var exec = require('child_process').exec; module.exports = function (iface, callback) { exec("cat /sys/class/net/" + iface + "/address", function (err, out) { if (err) { callback(err, null); return; } callback(null, out.trim().toLowerCase()); });...
<vulnerable_code>var exec = require('child_process').exec; module.exports = function (iface, callback) { exec("networksetup -getmacaddress " + iface, function (err, out) { if (err) { callback(err, null); return;<commit_title>[PATCH 1/5] Fix arbitrary command injection, CWE-264<commi...
<vulnerable_code>var exec = require('child_process').exec; module.exports = function (iface, callback) { exec("ifconfig " + iface, function (err, out) { if (err) { callback(err, null); return;<commit_title>[PATCH 1/5] Fix arbitrary command injection, CWE-264<commit_description><fixe...
<vulnerable_code>var exec = require('child_process').exec; var regexRegex = /[-\/\\^$*+?.()|[\]{}]/g; } module.exports = function (iface, callback) { exec("ipconfig /all", function (err, out) { if (err) { callback(err, null); return;<commit_title>[PATCH 1/5] Fix arbitrary command ...
<vulnerable_code>var execFile = require('child_process').execFile; module.exports = function (iface, callback) { execFile("networksetup", ["-getmacaddress", iface], function (err, out) { if (err) { callback(err, null); return; } var match = /[a-f0-9]{2}(:[a-f0-9]{2})...
<vulnerable_code>var execFile = require('child_process').execFile; module.exports = function (iface, callback) { execFile("cat", ["/sys/class/net/", iface, "/address"], function (err, out) { if (err) { callback(err, null); return;<commit_title>[PATCH 1/5] Fix arbitrary command injec...
<vulnerable_code> (tail->dir = strdup(dir)) == NULL) { die_mem(); } tail->next = NULL; } else { DirAlias *curr; tail->next = curr; tail = curr; } } fclose(fp); aliases_up++;<commit_title>[PATCH] diral...
<vulnerable_code> case NJS_VMCODE_AWAIT: await = (njs_vmcode_await_t *) pc; njs_vmcode_debug(vm, pc, "EXIT AWAIT"); return njs_vmcode_await(vm, await, promise_cap, async_ctx); case NJS_VMCODE_TRY_START: ret = njs_vmcode_try_start(...
<vulnerable_code><commit_title>[PATCH] Fixed njs_vmcode_interpreter() when await fails.<commit_description>Previously, while interpreting a user function, njs_vmcode_interpreter() might return prematurely when an error happens in await instruction. This is not correct because the current frame has to be unwound (or exc...
<vulnerable_code> else if (quicklink_list) { $('#header_quick ul.dropdown-menu .divider').prevAll().remove(); $('#header_quick ul.dropdown-menu').prepend(quicklink_list); window.showSuccessMessage(window.update_success_msg); } }<commit_title>[PA...
<vulnerable_code> * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ !function(e){e.fn.clickableDropdown=function(){return e(document).on("click",".dropdown-clickable .dropdown-menu",function(e){e.stopPropagation()})...
<vulnerable_code>const ivm = require('isolated-vm'); const { strictEqual } = require('assert'); const foo = { foo: 1 }; const bar = Object.create(foo); bar.bar = 2; const etc = Object.create(bar); etc.etc = bar; { const ref = new ivm.Reference(etc); strictEqual(ref.getSync('bar'), undefined); strictEqual(ref.getSyn...
<vulnerable_code> gf_sg_mfscript_del( * ((MFScript *) field)); break; case GF_SG_VRML_SFSCRIPT: return; default: assert(0); gf_sg_mfurl_del( * ((MFURL *) mf)); break; case GF_SG_VRML_MFSCRIPT: gf_sg_mfscript_del( * ((MFScript *) mf)); break; default: if (mffield->array) gf_free(mffield->array);<c...
<vulnerable_code> return AVERROR_INVALIDDATA; } /* compute number of resolution levels to decode */ if (c->nreslevels < s->reduction_factor) c->nreslevels2decode = 1; else c->nreslevels2decode = c->nreslevels - s->reduction_factor; c->log2_cblk_width = (bytestream2_get_byte...
<vulnerable_code> dctx->w = (state >> 32) & 0xFFFF; } else if (dctx->cur_byte == 42) { int cid = (state >> 32) & 0xFFFFFFFF; if (cid <= 0) continue; dctx->remaining = avpriv_dnxhd_get_frame_size(cid); if (dc...
<vulnerable_code> name, end - start); return FALSE; } diff = start - end; if (diff > 0) { WLog_Print(update->log, WLOG_DEBUG, "SECONDARY_ORDER %s: read %" PRIuz "bytes short, skipping", name, diff); Stream_Seek(s, diff); } return rc; }<commit_title>[PATCH] Fixed OOB read in update_r...
<vulnerable_code> if ( typeof requires === 'undefined' || requires === null || requires === '' ) { requires = 'Pro'; } jQuery( '.license-level' ).html( requires ); // If one click upgrade, hide other content addOneClickModal( this );<commit_title>[PATCH] use text for data-requires as well<commit_desc...
<vulnerable_code> text = lastFrame.innerText !== undefined ? lastFrame.innerText : text; } if (nonTextTagsArray.indexOf(tag) !== -1) { result += text; } else { var escaped = escapeHtml(text);<commit_title>[PATCH] Fixed XSS attack vector via `textarea` tags (when explicitly<comm...
<vulnerable_code> }), '<a data-b.c="#test">click me</a>' ); }); it('should not escape inner content from non-text tags (when allowed)', function() { assert.equal( sanitizeHtml('<div>"normal text"</div><script>"this is code"</script>', { allowedTags: [ 'script' ] }), '&quot;normal te...
<vulnerable_code> ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, &input_userauth_passwd_changereq); return 1; } <commit_title>[PATCH] removed empty line<commit_description><fixed_code> ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, &input_userauth_passwd_changereq); return 1; }
<vulnerable_code> jas_free(siz->comps); return -1; } siz->comps[i].sgnd = (tmp >> 7) & 1; siz->comps[i].prec = (tmp & 0x7f) + 1; }<commit_title>[PATCH] Added range check on XRsiz and YRsiz fields of SIZ marker<commit_description><fixed_code> jas_free(siz->comps); return -1; } if (siz->comps[i].hsa...
<vulnerable_code> if (parser->m_prologState.level >= parser->m_groupSize) { if (parser->m_groupSize) { { char *const new_connector = (char *)REALLOC( parser, parser->m_groupConnector, parser->m_groupSize *= 2); if (new_connector == NULL) { } ...
<vulnerable_code> void gf_bifs_dec_name(GF_BitStream *bs, char *name) { u32 i = 0; while (1) { name[i] = gf_bs_read_int(bs, 8); if (!name[i]) break; i++; } } ID = gf_bs_read_int(bs, codec->info->config.ProtoIDBits); if (codec->UseName) { gf_bifs_dec_name(bs, name); } else { sprintf(name, "Prot...
<vulnerable_code> if ((node_tag == TAG_MPEG4_IndexedFaceSet) && codec->info->config.Use3DMeshCoding) { if (gf_bs_read_int(bs, 1)) { /*nodeID = 1 + */gf_bs_read_int(bs, codec->info->config.NodeIDBits); if (codec->UseName) gf_bifs_dec_name(bs, name); } /*parse the 3DMesh node*/ return NULL; return NULL; ...
<vulnerable_code> /*def'ed route*/ if (flag) { RouteID = 1 + gf_bs_read_int(bs, codec->info->config.RouteIDBits); if (codec->UseName) gf_bifs_dec_name(bs, name); } /*origin*/ node_id = 1 + gf_bs_read_int(bs, codec->info->config.NodeIDBits);<commit_title>[PATCH] fixed #1970<commit_description><fixed_code> /*def...
<vulnerable_code> eventType = gf_bs_read_int(parser->bs, 2); fieldType = gf_bs_read_int(parser->bs, 6); gf_bifs_dec_name(parser->bs, name); field = gf_sg_script_field_new(parser->script, eventType, fieldType, name); if (!field) return GF_NON_COMPLIANT_BITSTREAM; } //parse else { gf_bifs_dec_name(parser->bs, ...
<vulnerable_code> if(partNumber<0 || partNumber> static_cast<int>(parts.size())) { throw IEX_NAMESPACE::IoExc("part number out of range"); }<commit_title>[PATCH] Fix #491, issue with part number range check reconstructing<commit_d...
<vulnerable_code> else delegate_info=GetDelegateInfo("pcl:color",(char *) NULL,exception); if (delegate_info == (const DelegateInfo *) NULL) return((Image *) NULL); if ((page.width == 0) || (page.height == 0)) (void) ParseAbsoluteGeometry(PSPageGeometry,&page); if (image_info->page != (char *) ...
<vulnerable_code> unsigned char decoded[INDX_INFLBUF_SIZEMAX + 1]; memset(decoded, 0, INDX_INFLBUF_SIZEMAX + 1); unsigned char *rule = (unsigned char *) infl->entries[parts[j]].label; memcpy(decoded, label, label_length); int decoded_length = (int)...
<vulnerable_code> entry=SetMagickInfo("CACHE"); entry->description=ConstantString("Magick Persistent Cache image format"); entry->module=ConstantString("MPC"); entry->stealth=MagickTrue; (void) RegisterMagickInfo(entry); entry=SetMagickInfo("MPC"); entry->encoder=(EncodeImageHandler *) WriteMPCImage; ent...
<vulnerable_code> } } return DOM_EVENTS; }; } // Remove "javascript:..." unless specifically enabled if (["href", "xlink:href"].includes(name) && value.startsWith("javascript") && !enableJs) { attributesToRemove.push(name); } } ...
<vulnerable_code> // SVG <animate> events DOM_EVENTS.push('onbegin', 'onend', 'onrepeat'); return DOM_EVENTS; }; <commit_title>[PATCH 1/3] Fix XSS vulnerability<commit_description><fixed_code> // SVG <animate> events DOM_EVENTS.push('onbegin', 'onend', 'onrepeat'); // Some non-standard events, ...
<vulnerable_code> if (Z_TYPE(ent1->data) == IS_UNDEF) { if (stack->top > 1) { stack->top--; } else { stack->done = 1; } efree(ent1); return; } <commit_title>[PATCH] Fix for bug #72790 and bug #72799<commit_description>(cherry picked from commit a14fdb9746262549bbbb96abb87338bacd147e1b) Confli...
<vulnerable_code>// Read a file, optionally processing its content, then write the output. // Or read a directory, recursively creating directories, reading files, // processing content, writing output. file.copy = function copy(srcpath, destpath, options) { if (file.isDir(srcpath)) { // Copy a directory, recursi...
<vulnerable_code> test.ok(grunt.file.isPathInCwd(path.resolve('deep')), 'subdirectory is in cwd'); test.done(); }, } };<commit_title>[PATCH] Update dependencies, tests...<commit_description><fixed_code> test.ok(grunt.file.isPathInCwd(path.resolve('deep')), 'subdirectory is in cwd'); test.do...
<vulnerable_code> * * The supplied field is scanned for non-printable and other illegal * characters. * + -1 is returned if an illegal character is present. * + 1 is returned if no illegal characters are present, but the field * contains a non-printable character. * + 0 is returned otherwise. */ int v...
<vulnerable_code> int LibarchivePlugin::extractionFlags() const { int result = ARCHIVE_EXTRACT_TIME; result |= ARCHIVE_EXTRACT_SECURE_NODOTDOT; // TODO: Don't use arksettings here /*if ( ArkSettings::preservePerms() ) { result &= ARCHIVE_EXTRACT_PERM; } if ( !ArkSettings::extractOv...
<vulnerable_code> num_images = get_num_images(img_fol.imgdirpath); dirptr = (dircnt_t*)malloc(sizeof(dircnt_t)); if (dirptr) { dirptr->filename_buf = (char*)malloc(num_images * OPJ_PATH_LEN * sizeof( char)); /* Stores at max 10 image file names*/ dirptr...
<vulnerable_code> return EXIT_FAILURE; } /* Stores at max 10 image file names */ dirptr->filename_buf = (char*)malloc(sizeof(char) * (size_t)num_images * OPJ_PATH_LEN); if (!dirptr->filename_buf) { failed = 1; ...
<vulnerable_code> if (!dirptr) { return EXIT_FAILURE; } dirptr->filename_buf = (char*)malloc((size_t)num_images * OPJ_PATH_LEN * sizeof( char)); /* Stores at max 10 image file names*/ if (!dirptr->filename_buf) { free(dirptr); return EXI...
<vulnerable_code> reset(); _numParts++; if (_maxParts >= 0 && _numParts > _maxParts) throw new IllegalStateException(String.format("Form with too many keys [%d > %d]", _numParts, _maxParts)); } @Override<commit_title>[PATCH] #9344 changes from review<c...
<vulnerable_code> eap->forceit = TRUE; } curwin->w_cursor.lnum = eap->line2; do_put(eap->regname, NULL, eap->forceit ? BACKWARD : FORWARD, 1L, PUT_LINE|PUT_CURSLINE); }<commit_title>[PATCH] patch 8.2.3581: reading character past end of line<commit_description>Problem: Reading character past ...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 3580, /**/<commit_title>[PATCH] patch 8.2.3581: reading character past end of line<commit_description>Problem: Reading character past end of line. Solution: Correct the cursor column.<fixed_code> static int i...
<vulnerable_code> @param configurationForTLS: An object which creates appropriately configured TLS connections. This is passed to C{startTLS} on the transport and is preferably created using L{twisted.internet.ssl.optionsForClientTLS}. See L{xmlstream.TLSInitiatingInitializer} for de...
<vulnerable_code> default is to verify the server certificate against the trust roots as provided by the platform. See L{twisted.internet._sslverify.platformTrust}. @type configurationForTLS: L{IOpenSSLClientConnectionCreator} """ super(TLSInitiatingInitializer...
<vulnerable_code> track_info->type_of_track = VIDEO_TRACK; } if (parsedAtoms[track->track_atom].AtomicLength > 34) { memset(track_info->track_hdlr_name, 0, 100); APar_readX(track_info->track_hdlr_name, isofile, parsedAtoms[track->track_atom].AtomicStart + 32, ...
<vulnerable_code> max = vc->vc_cfgsize ? vc->vc_cfgsize : 0x100000000; if ((newoff + ((unsigned) size)) > max) goto bad; error = (*vc->vc_cfgread)(DEV_SOFTC(vs), ((int) newoff), size, &value); if (!error) goto done; }<commit_title>[PATCH] Fix vi_pci_read null vc_cfgread function pointer dereference<commit...
<vulnerable_code> ) async def preview(self, url: str, user: UserID, ts: int) -> bytes: # XXX: we could move this into _do_preview if we wanted. url_tuple = urlsplit(url) for entry in self.url_preview_url_blacklist: match = True for attrib in entry: ...
<vulnerable_code><commit_title>[PATCH] Separate URL checker out to a separate method.<commit_description><fixed_code> # Copyright 2023 The Matrix.org Foundation C.I.C. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain ...
<vulnerable_code> } if (has_mbyte && spaces > 0) { int off; // Avoid starting halfway a multi-byte character. if (b_insert) { off = (*mb_head_off)(oldp, oldp + offset + spaces); spaces -= off; count -= off; } else { // spaces fill the gap, the character that's at the edge ...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 4150, /**/<commit_title>[PATCH] patch 8.2.4151: reading beyond the end of a line<commit_description>Problem: Reading beyond the end of a line. Solution: For block insert only use the offset for correcting the ...
<vulnerable_code> try: os.mkdir(path) except OSError: fd = os.open(path, os.O_RDONLY) stat = os.fstat(fd) if os.getuid() != stat.st_uid: print ("The temporary folder for building (%s) " % path + "is not owned by your user!") print("pip will ...
<vulnerable_code> u8 *out_ptr; size_t size = 0; size_t left = 0; size_t len, next_len; sc_apdu_t apdu; int r = SC_SUCCESS; SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); size = left = *out_buf ? *out_len : sizeof(buf); out_ptr = *out_buf ? *out_buf : buf; sc_format_apdu(card, &apdu, SC_APDU_CASE_2_SHORT, CAC...
<vulnerable_code>const { shouldBehaveLikeRegularContext } = require('../utils/Context.behavior'); contract('ERC2771Context', function (accounts) { const [, anotherAccount] = accounts; beforeEach(async function () { this.forwarder = await MinimalForwarder.new(); it('returns the original sender when call...
<vulnerable_code>const https = require("https"); const aws4 = require("aws4"); const AWS = require("aws-sdk"); const apiUrl = new URL(process.env.DCE_API_GW); const region = process.env.REGION; const accountsTable = process.env.DCE_ACCOUNTS_TABLE; const serviceName = "execute-api"; const respondWithError = (message = ...
<vulnerable_code>const https = require("https"); const aws4 = require("aws4"); const apiUrl = new URL(process.env.DCE_API_GW); const region = process.env.REGION; const serviceName = "execute-api"; const respondWithError = (message = "Internal error.", errorObject = {}) => { console.error(message, errorObject); ...
<vulnerable_code>const https = require("https"); const aws4 = require("aws4"); const AWS = require("aws-sdk"); const apiUrl = new URL(process.env.DCE_API_GW); const region = process.env.REGION; const leasesTable = process.env.DCE_LEASES_TABLE; const serviceName = "execute-api"; const respondWithError = (message = "Int...
<vulnerable_code> },[config]) useEffect(() => { if (authStatus === "authenticated") { dispatch(setCurrentUser(user)); dispatch(fetchConfig()); }<commit_title>[PATCH] Reduced end user API permissions<commit_description><fixed_code> },[config]) useEffect(() => { ...
<vulnerable_code> eventStatus createdAt updatedAt } } `; eventStatus createdAt updatedAt } } `; eventStatus createdAt updatedAt } } `; config createdAt updatedAt } } `; config createdAt updatedAt } } `...
<vulnerable_code>// this is an auto generated file. This will be overwritten export const safeLoginApi = /* GraphQL */ ` query safeLoginApi($action: String, $paramJson: String) { safeLoginApi(action: $action, paramJson: $paramJson) } `; export const safeAdminApi = /* GraphQL */ ` query safeAdminApi($action: ...
<vulnerable_code>// this is an auto generated file. This will be overwritten export const onCreateEvent = /* GraphQL */ ` subscription OnCreateEvent { onCreateEvent { id eventName eventOn eventStatus createdAt updatedAt } } `; export const onUpdateEvent = /* GraphQL */ `...
<vulnerable_code> </Box> <Box> <Box variant="h5">Maximum budget per AWS account</Box> {Item.eventBudget + " " + Config.BUDGET_CURRENCY} </Box> <Box> ...
<vulnerable_code> id: "eventSpend", header: "Current spend", sortingField: "eventSpend", cell: (item) => item.eventSpend + " " + Config.BUDGET_CURRENCY } ]} items={items} ...
<vulnerable_code> id: "costAmount", header: "AWS service spend", sortingField: "costAmount", cell: (item) => item.costAmount.toFixed(2) + " " + Config.BUDGET_CURRENCY } ]} items={items}<commit_title>[P...
<vulnerable_code> empty={<NoData />} /> </Container> <Container header={<Header>AWS service spend in {Config.BUDGET_CURRENCY}</Header>}> <AreaChart hideF...
<vulnerable_code>import { useSelector, useDispatch } from "react-redux"; import { useParams } from "react-router"; import AwsLoginModal from "../modals/AwsLoginModal"; import moment from "moment"; import { isEmpty, regExpAll } from "./utils.js"; import { fetchAwsLoginUrl } from "../../redux/actions/aws_login"; import {...
<vulnerable_code> /> </FormField> <FormField label={"Budget in " + Config.BUDGET_CURRENCY} description={ "Enter budget cap for each AWS account (maximum " + Config.ACCOUNT_MAX_BUDGE...
<vulnerable_code> setValue((prev) => { let newValue = { ...prev, ...update }; validateInputs(newValue, true); let user = newValue.user.replace(/[^a-zA-Z0-9]/g, Config.EVENT_EMAIL_SUBST); if (newValue.eventId !== "") newValue.principalId = newValue....
<vulnerable_code> </FormField> ) : null} <FormField label={"Budget in " + Config.BUDGET_CURRENCY} description={"Enter budget cap for this lease (maximum " + Config.ACCOUNT_MAX_BUDGET + ")"}...
<vulnerable_code> const initialState = { status: "hidden", url: "" }; const aws_login = (state = initialState, action) => { }; case "aws_login/loadError": case "aws_login/dismiss": return initialState; default: return state; } }; export default a...
<vulnerable_code> EVENT_MAX_DAYS: 90, EVENT_MAX_ACCOUNTS: 50, ACCOUNT_MAX_BUDGET: 1000, BUDGET_CURRENCY: "USD", EVENT_DEFAULT_LENGTH_DAYS: 0, EVENT_DEFAULT_LENGTH_HOURS: 8, EVENT_DEFAULT_ACCOUNT_BUDGET: 10, EVENT_DEFAULT_ACCOUNTS: 5, EVENT_ID_LENGTH: 10, EVENT_PRINCIPAL_SEPARATOR:...
<vulnerable_code>}; export const setCurrentUser = (data) => (dispatch, getState) => { const config = getState().config; let useremail = data.attributes.email; let tokenPayload = data.signInUserSession.accessToken.payload;<commit_title>[PATCH] Reduced end user API permissions<commit_description><fixed_code>...
<vulnerable_code> }; switch (action.type) { case "events/loading": return { ...state, status: "idle", items: action.events.map((item) => convertItem(item, action.leases)) }; case "event/loading": return { ...
<vulnerable_code> let spendAmount = item.spendAmount ?? 0; if (typeof spendAmount !== "string") spendAmount = spendAmount.toFixed(2); let principalIdParts = item.principalId.match( new RegExp("^(" + action.config.EVENT_ID_REGEX + ")" + action.config.EVENT_PRINCIPAL_SEPARATOR + "\\S{5,...
<vulnerable_code> const convertItem = (item) => ({ ...item, startDate: moment.unix(item.startDate).format(action.config.FORMAT_DATE), eventId: item.principalId.includes(action.config.EVENT_PRINCIPAL_SEPARATOR) ? item.principalId.substring(0, action.config.EVENT_ID_LENGTH) : "" }); sw...
<vulnerable_code>import contextvars import logging import pprint import typing as t from abc import ABCMeta, abstractmethod logger = logging.getLogger(__name__) class Batch:<commit_title>[PATCH] Merge pull request from GHSA-xq59-7jf3-rjc6<commit_description>Co-authored-by: skelmis <ethan.mckee-harris@zxsecurity.co...
<vulnerable_code>import typing as t from dataclasses import dataclass from piccolo.engine.base import Batch, Engine from piccolo.engine.exceptions import TransactionError from piccolo.query.base import DDL, Query from piccolo.querystring import QueryString self.transaction = transaction async def rollback...
<vulnerable_code>import typing as t from unittest import TestCase from piccolo.engine.postgres import Atomic from piccolo.engine.sqlite import SQLiteEngine, TransactionType from piccolo.table import drop_db_tables_sync self.assertListEqual( Manager.select(Manager.name).run_sync(), [{"name": "Manage...
<vulnerable_code>PHP_FUNCTION(linkinfo) { char *link; size_t link_len; zend_stat_t sb; int ret; return; } ret = VCWD_STAT(link, &sb); if (ret == -1) { php_error_docref(NULL, E_WARNING, "%s", strerror(errno)); RETURN_LONG(Z_L(-1)); } RETURN_LONG((zend_long) sb.st_dev); } /* }}} */<commit_title>[PATCH] F...
<vulnerable_code> PyPDF2._utils.deprecate_no_replacement("foo") error_msg = "foo is deprecated and will be removed in PyPDF2 3.0.0." assert exc.value.args[0] == error_msg<commit_title>[PATCH] attempt fix iss with test_utils<commit_description><fixed_code> PyPDF2._utils.deprecate_no_replacement("f...
<vulnerable_code><commit_title>[PATCH] Readd AllowThirdPartyFraming option<commit_description>We want by default no framing of phpMyAdmin, but still some sites might need to embed it, so configuration option (with appropriate security warning) is there. This basically reverts d7e0bed28443e6cf8f41965cc2f27be19c667fa6.<...
<vulnerable_code>module.exports = isUrl; /** * Matcher. */ var matcher = /^(?:\w+:)?\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/; /** * Loosely validate a URL `string`. */ function isUrl(string){ return matcher.test(string); }<commit_title>[PATCH] security: Fix REDOS vulnerability<commit_description>Problem: ...
<vulnerable_code> assert(!url('google.com')); }); }); });<commit_title>[PATCH] security: Fix REDOS vulnerability<commit_description>Problem: As disclosed by email, the regex in this module was vulnerable to catastrophic backtracking. This could be used as a REDOS vector for Node.js servers that use this modu...
<vulnerable_code> if (status == MagickFalse) { InheritException(exception,&image->exception); return(DestroyImageList(image)); } for (y=0; y < (ssize_t) image->rows; y++)<commit_title>[PATCH] https://github.com/ImageMagick/ImageMagick/issues/873<commit_description><fixed_c...
<vulnerable_code> ConstIterator endIt; if(length < 0xffffffff && length + index < size()) endIt = d->data.begin() + index + length; else endIt = d->data.end();<commit_title>[PATCH] Avoid uint overflow in case the length + index is over<commit_description><fixed_code> ConstIterator endIt; if(length ...
<vulnerable_code> in_assert_fails = TRUE; do_cmdline_cmd(cmd); if (called_emsg == called_emsg_before) { prepare_assert_error(&ga); CHECK_LIST_MATERIALIZE(list); tv = &list->lv_first->li_tv; expected = tv_get_string_buf_chk(tv, buf); if (!pattern_match(expected, actual, FALSE)) ...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 403, /**/<commit_title>[PATCH] patch 9.0.0404: crash when passing invalid arguments to<commit_description><fixed_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 404, /...
<vulnerable_code> emsg(_(e_positive_count_required)); return; } eap->line1 = eap->line2; eap->line2 += i - 1; if (eap->line2 > curbuf->b_ml.ml_line_count)<commit_title>[PATCH] patch 9.0.2108: [security]: overflow with count for :s<commit_description><fixed_code> emsg(_(e_positive_count_required)); ...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 2107, /**/<commit_title>[PATCH] patch 9.0.2108: [security]: overflow with count for :s<commit_description><fixed_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 2108, ...
<vulnerable_code> }); }); }); <commit_title>[PATCH] Add tests.<commit_description><fixed_code> }); }); describe('without session support', function() { var passport = new Passport(); passport.serializeUser(function(user, done) { done(null, user.id); }); ...
<vulnerable_code> if ev.rejected_reason is None: auth_events[key] = event_map[ev_id] try: event_auth.check_state_dependent_auth_rules( event,<commit_title>[PATCH] Don't add previously rejected events to state during state<commit_description><fixed_...
<vulnerable_code> return 0; } int json_dispatch_string(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *userdata) { char **s = ASSERT_PTR(userdata); int r;<commit_title>[PATCH] json: add dispatchers for 16bit integers<commit_description><fixed_code> return 0; } int...
<vulnerable_code> static ErlDrvSSizeT ejabberd_zlib_drv_control(ErlDrvData handle, unsigned int command, char *buf, ErlDrvSizeT len, char **rbuf, ErlDrvSizeT rlen) { ejabberd_zlib_data *d = (ejabberd_zlib_data *)handle; int err; int size; ErlDrvBinary *b; switch (command) ...
<vulnerable_code> err = deflate(d->d_stream, Z_SYNC_FLUSH); die_unless((err == Z_OK) || (err == Z_STREAM_END), "Deflate error"); rlen += (BUF_SIZE - d->d_stream->avail_out); size += (BUF_SIZE - d->d_stream->avail_out); ...
<vulnerable_code> if (HandlerHelper.isPathUnsafe(requestFilename)) { getLogger().info(HandlerHelper.UNSAFE_PATH_ERROR_MESSAGE_PATTERN, requestFilename); response.setStatus(HttpServletResponse.SC_NOT_MODIFIED); return true; } <commit_title>[PATCH] Ad...
<vulnerable_code> } /** * Checks if the given URL path contains the symbols encoded twice in * hexadecimal format, which can be injected maliciously. * * @param path * the URL path to be verified. * @return {@code true}, if the given path has a double encoding, * ...
<vulnerable_code> if (HandlerHelper.isPathUnsafe(filenameWithPath)) { getLogger().info(HandlerHelper.UNSAFE_PATH_ERROR_MESSAGE_PATTERN, filenameWithPath); response.setStatus(HttpServletResponse.SC_NOT_MODIFIED); return true; } <commit_title>[PATCH] ...
<vulnerable_code>import static com.vaadin.flow.server.InitParameters.SERVLET_PARAMETER_DEVMODE_WEBPACK_TIMEOUT; import static com.vaadin.flow.server.frontend.NodeUpdateTestUtil.WEBPACK_TEST_OUT_FILE; import static com.vaadin.flow.server.frontend.NodeUpdateTestUtil.createStubWebpackServer; import static java.net.HttpURL...
<vulnerable_code>import java.time.LocalDateTime; import java.time.ZoneOffset; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.mockito.Matchers; import org.mockit...