text
stringlengths
79
3.72M
<vulnerable_code>class RealtimeChart extends DashboardChart { constructor(el, options) { super(el, options); this.delay = parseInt(localStorage.sidekiqTimeInterval) || 5000; this.startPolling(); document.addEventListener("interval:update", this.handleUpdate.bind(this)); }<commit_title>[PATCH] Valida...
<vulnerable_code>fake_users_db = omr_config_data['users'][0] def verify_password(plain_password, user_password): if plain_password == user_password: LOG.debug("password true") return True return False<commit_title>[PATCH] Fix timing attacks potential vulnerability<commit_description><fixed_code...
<vulnerable_code> char nChar = *pTemp; *pTemp = '\0'; nCode = atoi( pCur ); *pTemp = nChar; if ( nCode == 8 && *pTemp == '#') { s...
<vulnerable_code> Document document; try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder documentBuilder = factory.newDocumentBuilder(); document = documentBuilder.parse(input); <commit_title>[PATCH] fix(co...
<vulnerable_code> /** Shared logger */ private static Log log = LogFactory.getLog(XpathUtils.class); private static DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); /** * InputStream to Document.<commit_title>[PATCH] fix(core): added fix for xml parser (#3100)<commit_descript...
<vulnerable_code> break; c++; } if ((ret = s->decode(gb, rc, cumfr, cnt_c, totfr)) < 0) return ret;<commit_title>[PATCH] avcodec/scpr: Fix multiple runtime error: index 256 out of<commit_description><fixed_code> break; c++; } if (x >= 16 || c >= 256) { ...
<vulnerable_code> const [loading, setLoading] = useState(true); const [groupOptions, setGroupOptions] = useState([]); const [environmentOptions, setEnvironmentOptions] = useState([]); const devOptions =[{value:"cdk-trunk", label:"CDK Pipelines - Trunk-based"},{value:"trunk", label:"CodePipeline - Trunk-based"},{...
<vulnerable_code> const [inputValue, setInputValue] = useState(''); const [loading, setLoading] = useState(true); const client = useClient(); const devOptions =[{value:"cdk-trunk", label:"CDK Pipelines - Trunk-based"},{value:"trunk", label:"CodePipeline - Trunk-based"},{value:"gitflow", label:"CodePipeline - Git...
<vulnerable_code> Check - `https://docs.embedchain.ai/data-sources/json`" ) @staticmethod def load_data(content): """Load a json file. Each data point is a key value pair.""" if len(content) > MAX_CONTENT_LENGTH: raise ValueError(f"The content is ...
<vulnerable_code> TRUE /* Force /x */ ); switch (*RExC_parse) { case '?': if (RExC_parse[1] == '[') nest_depth++, RExC_parse++; /* FALLTHROUGH */ default: break; } ...
<vulnerable_code> break; case MEMCACHED_TIMEOUT: case MEMCACHED_WRITE_FAILURE: if(!timeout) { --i; } ++hit; REQUIRE(true); break;<commit_title>[PATCH] revert most of d7a0084bf99d618d1dc26a54fd413db7ae8b8e63<commit_description>See php-memcached-dev/php-memcached#531<fix...
<vulnerable_code> * GPAC - Multimedia Framework C SDK * * Authors: Jean Le Feuvre * Copyright (c) Telecom ParisTech 2000-2012 * All rights reserved * * This file is part of GPAC / BIFS codec sub-project s32 value; Fixed tang[4], delta; s32 dir; if (NbComp != 2 && NbComp != 3) return GF_BAD_PARAM; ...
<vulnerable_code> } #endif printline ("bytes", NULL, 0); for (j = 0; j < size; j++) { r_cons_printf ("%02x", buf[j + idx]); } r_cons_newline (); if (op.val != UT64_MAX) printline ("val", "0x%08" PFMT64x "\n", op.val); if (op.ptr != UT64_MAX) printline ("ptr", "0x%08" PFMT64x "\n", op.ptr...
<vulnerable_code> self.assertAllEqual(z.shape.as_list(), [None]) self.assertAllEqual(z, [0.0, 0.0]) if __name__ == "__main__": os.environ["TF_XLA_FLAGS"] = ("--tf_xla_min_cluster_size=2 " + os.environ.get("TF_XLA_FLAGS", ""))<commit_title>[PATCH] [Tensorflow] Fix security v...
<vulnerable_code> # pseudocode def mkidentifier(s): "".join(c if c.isalnumeric() else "_" for c in s) function_label = func_type.internal_function_label # internal functions without return types need to jump back to the calling # function, as there is no guarantee there is a user-provided re...
<vulnerable_code> __mul__ = __add__ # Data structure for LLL parse tree class LLLnode: repr_show_gas = False<commit_title>[PATCH] wip cleanup internal calls<commit_description><fixed_code> __mul__ = __add__ def push_label_to_stack(labelname: str) -> str: # items prefixed with `_sym_` are ignored unt...
<vulnerable_code> _pos = getpos(stmt) # sanity typecheck _tmp = LLLnode(0, location="memory", typ=context.return_type) check_assign(_tmp, lll_val, _pos) func_type = stmt.get_ancestor(vy_ast.FunctionDef)._metadata["type"]<commit_title>[PATCH] wip cleanup internal calls<commit_description><fixed_code...
<vulnerable_code> TypeCheckFailure, ) from vyper.old_codegen.abi import abi_decode from vyper.old_codegen.lll_node import LLLnode from vyper.old_codegen.parser_utils import getpos, pack_arguments from vyper.old_codegen.types import ( BaseType, method_name = stmt_expr.func.attr args_lll = Expr(x, self.co...
<vulnerable_code>!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";if("undefined"!=typeof window){var e=window.$||window.jQuery||window.Zepto;e&&(e.fn.shave=function(e,t){return function(e,t){var n=2<arguments.length&&v...
<vulnerable_code>/** shave - Shave is a javascript plugin that truncates multi-line text within a html element based on set max height @version v2.5.2 @link https://github.com/dollarshaveclub/shave#readme @author Jeff Wainwright <yowainwright@gmail.com> (jeffry.in) @license MIT el[textProp] = spaces ? wor...
<vulnerable_code>!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.shave=t()}(this,function(){"use strict";return function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(!t)throw Error("maxHeight is required"...
<vulnerable_code> el.insertAdjacentHTML('beforeend', charHtml) const diff = spaces ? ` ${words.slice(max).join(' ')}` : words.slice(max) // https://stackoverflow.com/questions/476821/is-a-dom-text-node-guaranteed-to-not-be-interpreted-as-html const shavedText = document.createTextNode(diff) const el...
<vulnerable_code> return 0; } /*---------------------------------------------------------------------------*/ static bool uip_check_mtu(void) { struct uip_ext_hdr *ext_ptr; #if UIP_TCP int c; uint16_t tmp16; uint8_t opt; register struct uip_conn *uip_connr = uip_conn; #endif /* UIP_TCP */ #if UIP_UDP got...
<vulnerable_code> SourceLocation sourceLocation = null; String offendingToken = null; if (token != null) { tokenType = token.getChannel() == CHANNEL_IGNORED_CHARS ? "whitespace" : tokenType; offendingToken = token.getText(); sourceLocation = AntlrHelper.create...
<vulnerable_code> ldap_enabled=self.app.cfg.ldap_uri, ) @cherrypy.expose() def new(self, **kwargs): form = UserForm() if form.is_submitted(): flash(form.error_message, level='error') return self._compile_template("admin_user_new.html", form=form) ...
<vulnerable_code> class PagePrefSshKeys(Controller): @cherrypy.expose def default(self, **kwargs): # Handle action add_form = SshForm()<commit_title>[PATCH] Add ratelimit to AccessToken, SSH Keys, User creation<commit_description><fixed_code> class PagePrefSshKeys(Controller): @cherrypy.exp...
<vulnerable_code> class PagePrefTokens(Controller): @cherrypy.expose def default(self, **kwargs): form = TokenForm() delete_form = DeleteTokenForm()<commit_title>[PATCH] Add ratelimit to AccessToken, SSH Keys, User creation<commit_description><fixed_code> class PagePrefTokens(Controller): @...
<vulnerable_code> pCrwMapping->crwDir_); if (edX != edEnd || edY != edEnd || edO != edEnd) { uint32_t size = 28; if (cc && cc->size() > size) size = cc->size(); DataBuf buf(size); std::memset(buf.pData_, 0x0, buf.siz...
<vulnerable_code> ASCIISET: Final[Set[str]] = set(string.printable) # See https://tools.ietf.org/html/rfc7230#section-3.1.1 # and https://tools.ietf.org/html/rfc7230#appendix-B # # method = token # tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / # "^" / "_" / "`" / "|" / "~" / D...
<vulnerable_code> parser.feed_data(text) @pytest.mark.parametrize("size", [40960, 8191]) def test_max_header_field_size(parser, size) -> None: name = b"t" * size parser.feed_data(b"GET //get HT/11\r\n\r\n") @pytest.mark.parametrize("size", [40965, 8191]) def test_http_request_max_status_line(pars...
<vulnerable_code> } return queryString.toString(); } }<commit_title>[PATCH] card571 fix sql injection vulnerabilities<commit_description><fixed_code> } return queryString.toString(); } /** * Method to sanitize order by SQL injection * @param orderByRequest * @return */ public static String sa...
<vulnerable_code>import com.dotmarketing.business.PermissionAPI; import com.dotmarketing.business.Role; import com.dotmarketing.cms.factories.PublicCompanyFactory; import com.dotmarketing.db.HibernateUtil; import com.dotmarketing.exception.DotDataException; import com.dotmarketing.exception.DotHibernateException; s...
<vulnerable_code>import com.dotcms.repackage.org.apache.struts.action.ActionForward; import com.dotcms.repackage.org.apache.struts.action.ActionMapping; import com.dotmarketing.business.APILocator; import com.dotmarketing.db.DbConnectionFactory; import com.dotmarketing.portal.struts.DotPortletAction; import com.dotmark...
<vulnerable_code>import com.dotmarketing.business.APILocator; import com.dotmarketing.business.web.UserWebAPI; import com.dotmarketing.business.web.WebAPILocator; import com.dotmarketing.exception.DotDataException; import com.dotmarketing.exception.DotRuntimeException; import com.dotmarketing.exception.DotSecurityExcep...
<vulnerable_code> while ((tarEntry = tin.getNextTarEntry()) != null) { File destEntry = new File(destDir, tarEntry.getName()); File parent = destEntry.getParentFile(); if (!parent.exists()) {<commit_title>[PATCH] Merge pull request from GHSA-m88m-crr9-jvqq<commit_description...
<vulnerable_code> assertEquals(timeBeforeB, timeAfterB); assertNotEquals(timeBeforeA, timeAfterA); } }<commit_title>[PATCH] Merge pull request from GHSA-m88m-crr9-jvqq<commit_description>* Fix zip slip vulnerability in project import command * Add zip-slip.tar test resource<fixed_code> asser...
<vulnerable_code> String tmpstr(63, ReserveString); tmpbuf = tmpstr.mutableData(); tmplen = snprintf(tmpbuf, 64, "%.*F", dec, d); if (tmpbuf == nullptr || !isdigit((int)tmpbuf[0])) { tmpstr.setSize(tmplen); return tmpstr; tmpstr = String(tmplen, ReserveString); tmpbuf = tmpstr.mutableData(); ...
<vulnerable_code><commit_title>[PATCH] XWIKI-20285: Improve escaping of the Invitation Application<commit_description>- Introduce an internal role (DefaultXARExtensionIndex) to know if a document is provided by an extension - Split index-api to index-api/index-default to be able to use the api in oldcore - Fix the esca...
<vulnerable_code> import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; import org.xwiki.component.annotation.Component; import org.xwiki.script.service.ScriptService; import org.xwiki.stability.Unstable; import com.xpn.xwiki.XWikiContext; /** * Provides...
<vulnerable_code> import java.util.Map; import javax.inject.Provider; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.xwiki.test.junit5.mockito.ComponentTest; import org.xwiki.test.junit5.mockito.InjectMockComponents; import org.xwiki.test.junit5.mockito...
<vulnerable_code><commit_title>[PATCH] XWIKI-20285: Improve escaping of the Invitation Application<commit_description>- Introduce an internal role (DefaultXARExtensionIndex) to know if a document is provided by an extension - Split index-api to index-api/index-default to be able to use the api in oldcore - Fix the esca...
<vulnerable_code>import org.xwiki.bridge.event.ApplicationReadyEvent; import org.xwiki.component.annotation.Component; import org.xwiki.component.phase.Initializable; import org.xwiki.component.phase.InitializationException; import org.xwiki.index.TaskManager; import org.xwiki.observation.AbstractEventListener; import ...
<vulnerable_code> import java.util.List; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; import org.xwiki.component.annotation.Component; import org.xwiki.index.TaskManager; import org.xwiki.query.Query; import org.xwiki.query.QueryException; import ...
<vulnerable_code> import java.util.List; import javax.inject.Provider; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.xwiki.index.TaskManager; import org.xwiki.query.Query; import org.xwiki.query.QueryException; import org.xwiki.query.QueryManager; impo...
<vulnerable_code> void testEq0() throws Exception { this.context.setDoc(this.xwiki.getDocument( new DocumentReference("xwiki", "<script>console.log</script>", "InvitationCommon"), this.context)); DocumentReference invitationCommonReference = new DocumentReference("xwiki", "Invitation...
<vulnerable_code><commit_title>[PATCH] XWIKI-20285: Improve escaping of the Invitation Application<commit_description>- Introduce an internal role (DefaultXARExtensionIndex) to know if a document is provided by an extension - Split index-api to index-api/index-default to be able to use the api in oldcore - Fix the esca...
<vulnerable_code><commit_title>[PATCH] XWIKI-20285: Improve escaping of the Invitation Application<commit_description>- Introduce an internal role (DefaultXARExtensionIndex) to know if a document is provided by an extension - Split index-api to index-api/index-default to be able to use the api in oldcore - Fix the esca...
<vulnerable_code><commit_title>[PATCH] XWIKI-20285: Improve escaping of the Invitation Application<commit_description>- Introduce an internal role (DefaultXARExtensionIndex) to know if a document is provided by an extension - Split index-api to index-api/index-default to be able to use the api in oldcore - Fix the esca...
<vulnerable_code><commit_title>[PATCH] XWIKI-20285: Improve escaping of the Invitation Application<commit_description>- Introduce an internal role (DefaultXARExtensionIndex) to know if a document is provided by an extension - Split index-api to index-api/index-default to be able to use the api in oldcore - Fix the esca...
<vulnerable_code><commit_title>[PATCH] XWIKI-20285: Improve escaping of the Invitation Application<commit_description>- Introduce an internal role (DefaultXARExtensionIndex) to know if a document is provided by an extension - Split index-api to index-api/index-default to be able to use the api in oldcore - Fix the esca...
<vulnerable_code><commit_title>[PATCH] XWIKI-20285: Improve escaping of the Invitation Application<commit_description>- Introduce an internal role (DefaultXARExtensionIndex) to know if a document is provided by an extension - Split index-api to index-api/index-default to be able to use the api in oldcore - Fix the esca...
<vulnerable_code><commit_title>[PATCH] XWIKI-20285: Improve escaping of the Invitation Application<commit_description>- Introduce an internal role (DefaultXARExtensionIndex) to know if a document is provided by an extension - Split index-api to index-api/index-default to be able to use the api in oldcore - Fix the esca...
<vulnerable_code> let j if (typeof value === 'object') { // Cannot escape on this value if (Array.isArray(value) && value.length === 0) { return false // empty arrays are falsey } return true // assumed to be truthy if something is in it } else if (value === undefined) { // Cannot escape on this...
<vulnerable_code> while (1) { int is_first = 1; if (!http_find_header(htx, ist("Set-Cookie"), &ctx, 1)) { if (!http_find_header(htx, ist("Set-Cookie2"), &ctx, 1)) break; is_cookie2 = 1;<commit_title>[PATCH] BUG/MAJOR: http/htx: prevent unbounded loop in<commit_description><fixed_code> while (1) { int ...
<vulnerable_code>{ txSize aSize = c_strlen(a->value.string); txSize bSize = c_strlen(b->value.string); txString result = (txString)fxNewChunk(the, aSize + bSize + 1); c_memcpy(result, a->value.string, aSize); c_memcpy(result + aSize, b->value.string, bSize + 1); a->value.string = result; { txSize aSize = c_strle...
<vulnerable_code> #endif void fxCheckStack(txMachine* the, txSlot* slot) { if (!(the->collectFlag & XS_SKIPPED_COLLECT_FLAG)) theSize = roundup(theSize, the->minimumChunksSize); theSize += sizeof(txBlock); aData = fxAllocateChunks(the, theSize); #ifdef mxSnapshot c_memset(aData, 0, theSize); } } void* fxNewC...
<vulnerable_code> void* fxAllocateChunks(txMachine* the, txSize theSize) { if (theSize > 0x3FFFFFFF) fxAbort(the, XS_NOT_ENOUGH_MEMORY_EXIT); return c_malloc(theSize); } <commit_title>[PATCH] XS: #582 #581 #580 #567<commit_description><fixed_code> void* fxAllocateChunks(txMachine* the, txSize theSize) { return c_...
<vulnerable_code> txInteger delta = resultSize - stringSize; txInteger count = delta / fillerSize; txInteger rest = fxUnicodeToUTF8Offset(filler, delta % fillerSize); txString result = mxResult->value.string = (txString)fxNewChunk(the, stringLength + (fillerLength * count) + rest + 1); mxResult->kind = XS...
<vulnerable_code> CSndUList::CSndUList(): m_pHeap(NULL), m_iArrayLength(4096), m_iLastEntry(-1), m_ListLock(), m_pWindowLock(NULL), } remove_(u); insert_norealloc(1, u); return; } // insert a new entry, ts is the next processing time if (ts > 0) insert_norea...
<vulnerable_code> """Exception for when Fides is configured to use an SSH tunnel without config provided.""" class AuthenticationError(HTTPException): """To be raised when attempting to fetch an access token using invalid credentials.<commit_title>[PATCH] Merge pull request from GHSA-r25m-cr6v-p9hq<commit_...
<vulnerable_code>""" Contains the code that sets up the API. """ import sys from datetime import datetime, timezone from logging import WARNING from fideslog.sdk.python.event import AnalyticsEvent from loguru import logger from starlette.background import BackgroundTask from uvicorn import Config, Server import fides ...
<vulnerable_code> f"{V1_URL_PREFIX}/route/does/not/exist/", headers=auth_header ) assert resp_4.status_code == HTTP_404_NOT_FOUND<commit_title>[PATCH] Merge pull request from GHSA-r25m-cr6v-p9hq<commit_description>* fix for vuln * Apply suggestions from code review Use correct spelling of m...
<vulnerable_code> return regs; } struct task_struct * __cpuinit fork_idle(int cpu) { struct task_struct *task; task = copy_process(CLONE_VM, 0, idle_regs(&regs), 0, NULL, &init_struct_pid, 0); if (!IS_ERR(task)) init_idle(task, cpu); return task; }<commit_title>[PATCH] pids: fix fork_idle() to setup ->p...
<vulnerable_code> uint32_t vsize; uint16_t asize; uint16_t auxsize; if (nsv->ahead[0].data || nsv->ahead[1].data) return 0; //-1; /* hey! eat what you've in your plate first! */ if (vsize && st[NSV_ST_VIDEO]) { nst = st[NSV_ST_VIDEO]->priv_data; pkt = &nsv->ahead[NSV_ST_VIDEO...
<vulnerable_code> { nmatch = curbuf->b_ml.ml_line_count - sub_firstlnum + 1; skip_match = TRUE; } // Need room for:<commit_title>[PATCH] patch 9.0.1873: [security] heap-buffer-overflow in<commit_description><fixed_code> { nmatch = curbuf->b_ml.ml_line_count - sub_firstlnum + 1; skip_matc...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 1872, /**/<commit_title>[PATCH] patch 9.0.1873: [security] heap-buffer-overflow in<commit_description><fixed_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 1873, /**/...
<vulnerable_code> beep_flush(); return; } #ifdef FEAT_GUI need_mouse_correct = TRUE;<commit_title>[PATCH] patch 9.0.1873: [security] heap-buffer-overflow in<commit_description><fixed_code> beep_flush(); return; } if (text_or_buf_locked()) { beep_flush(); return; } #ifdef FEAT_GUI need...
<vulnerable_code> extend_error_data = (spdm_error_data_response_not_ready_t *)(spdm_response + 1); LIBSPDM_ASSERT(spdm_response->header.request_response_code == SPDM_ERROR); LIBSPDM_ASSERT(spdm_response->header.param1 == SPDM_ERROR_CODE_RESPONSE_NOT_READY); if (extend_error_data->request_code != original...
<vulnerable_code> if (context->crypto_request) { timeout = context->local_context.capability.rtt + ((uint64_t)2 << context->connection_info.capability.ct_exponent); } else { timeout = context->local_context.capability.rtt + context->local_context.capability.st...
<vulnerable_code> return LIBSPDM_STATUS_SUCCESS; case 0x25: return LIBSPDM_STATUS_SUCCESS; default: return LIBSPDM_STATUS_SEND_FAIL; } } return LIBSPDM_STATUS_SUCCESS; default: return LIBSPDM_STATUS_RECEIVE_FAIL; } /** * Test 10: Responder sets illegal S...
<vulnerable_code> SPDM_GET_CAPABILITIES, }, /*header*/ 0x00, /*reserved*/ 0x01, /*ct_exponent*/ 0x0000, /*reserved, 2 bytes*/ (SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_FRESH_CAP | SPDM_GET_CAPABILITIES_REQUEST_FLAGS_CERT_CAP | /*flags*/ SPDM_GET_CAPABILITIES_REQUEST_FLAGS_CHAL_CAP ...
<vulnerable_code> if (typeof done != 'function') { throw new Error('req#login requires a callback function'); } var self = this; this._sessionManager.logIn(this, user, function(err) { if (err) { self[property] = null; return done(err); } done(); });<commit_title>[PATCH] Add option to kee...
<vulnerable_code> if (!req.session) { return cb(new Error('Login sessions require session support. Did you forget to use `express-session` middleware?')); } var self = this; // regenerate the session, which is good practice to help // guard against forms of session fixation if (err) { return ...
<vulnerable_code><commit_title>[PATCH] sanitize Wiris response against XSS in the Wiris addon<commit_description><fixed_code> /** * @module commons */ (function (window) { /** xss utils. @class xssUtils */ var xssUtils = {}; /** Sanitize HTML, securing it against potential xss attack...
<vulnerable_code> xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == XMLHttpRequest.DONE) { if (xmlhttp.status === 200) { $(presenter.wrapper).html(xmlhttp.response); } else { $(presenter.wrapper).html(presenter....
<vulnerable_code> { if ((i < 0) || (i >= MNG_MAX_OBJECTS)) continue; if (mng_info->exists[i] && !mng_info->frozen[i] && (p-chunk) < (ssize_t) (length-8)) {<commit_title>[PATCH] https://github.com/ImageMagick/ImageMagick...
<vulnerable_code> for (const result of searchResults) { const note = becca.notes[result.noteId]; result.highlightedNotePathTitle = result.notePathTitle.replace('/[<\{\}]/g', ''); if (highlightedTokens.find(token => note.type.includes(token))) { result.highlightedNotePathTitle +=...
<vulnerable_code> uint8_t *data = NULL; int flags = -1, flags_size, ret; if (enc->codec_id == AV_CODEC_ID_VP6F || enc->codec_id == AV_CODEC_ID_VP6A || enc->codec_id == AV_CODEC_ID_VP6 || enc->codec_id == AV_CODEC_ID_AAC) flags_size = 2;<commit_title>[PATCH] avformat/flvenc: Check audio pack...
<vulnerable_code> uint64_t offset; int bidx = (int) arg2; assert(bidx <= PCI_BARMAX); assert(pdi->bar[bidx].type == PCIBAR_MEM32 || pdi->bar[bidx].type == PCIBAR_MEM64); assert(addr >= pdi->bar[bidx].addr && addr + size <= pdi->bar[bidx].addr + pdi->bar[bidx].size); offset = addr - pdi->bar[bidx]...
<vulnerable_code> mock_ecdf.assert_called_once() mock_box.assert_called_once() mock_scatter.assert_called_once() mock_open.assert_called_once() self.assertEqual(...
<vulnerable_code> ks_results[pair] ] writer.writerow(row) print("For detailed report see {}".format(report_filename)) return difference if __name__ == '__main__':<commit_title>[PATCH] write also a legend for the generated graphs<comm...
<vulnerable_code> if (pointer[0] === '') return pointer throw new Error('Invalid JSON pointer.') } else if (Array.isArray(pointer)) { pointer.forEach(function (part, i) { if (typeof part !== 'string' && typeof part !== 'number') { pointer[i] = '' + part } }) return pointer } <...
<vulnerable_code>assert(!d.boo, 'should not boo') var e = {} jsonpointer.set({}, '/constructor/prototype/boo', 'polluted') assert(!e.boo, 'should not boo') jsonpointer.set({}, '/foo/constructor/prototype/boo', 'polluted') assert(!e.boo, 'should not boo') jsonpointer.set({}, '/foo/constructor/constructor/prototype/bo...
<vulnerable_code> @app.route("/v1/products", methods=["GET"]) async def products(): dbresponse = getproducts() results = {}<commit_title>[PATCH] V1.0.2<commit_description><fixed_code> @app.route("/v1/products", methods=["GET"]) @require_apikey async def products(): dbresponse = getproducts() results ...
<vulnerable_code> ERR_raise(ERR_LIB_PKCS12, PKCS12_R_CONTENT_TYPE_NOT_DATA); return NULL; } return ASN1_item_unpack_ex(p7->d.data, ASN1_ITEM_rptr(PKCS12_SAFEBAGS), ossl_pkcs7_ctx_get0_libctx(&p7->ctx), ossl_pkcs7_ctx_get0_propq(&p7->ct...
<vulnerable_code> return 0; } salt = p12->mac->salt->data; saltlen = p12->mac->salt->length; if (p12->mac->iter == NULL)<commit_title>[PATCH] Add NULL checks where ContentInfo data can be NULL<commit_description>PKCS12 structures contain PKCS7 ContentInfo fields. These fields are optional and ca...
<vulnerable_code> bags = PKCS12_unpack_p7data(p7); } else if (bagnid == NID_pkcs7_encrypted) { bags = PKCS12_unpack_p7encdata(p7, oldpass, -1); if (!alg_get(p7->d.encrypted->enc_data->algorithm, &pbe_nid, &pbe_iter, &pbe_saltlen, &cipherid)) ...
<vulnerable_code> int ctype_nid = OBJ_obj2nid(p7->type); const PKCS7_CTX *ctx = ossl_pkcs7_get0_ctx(p7); if (ctype_nid == NID_pkcs7_signed) mdalgs = p7->d.sign->md_algs; else mdalgs = NULL; flags ^= SMIME_OLDMIME; <commit_title>[PATCH] Add NULL checks where ContentInfo data can be N...
<vulnerable_code>#include "file.h" #ifndef lint FILE_RCSID("@(#)$File: cdf.c,v 1.59 2014/05/14 23:22:48 christos Exp $") #endif #include <assert.h> cdf_count_chain(const cdf_sat_t *sat, cdf_secid_t sid, size_t size) { size_t i, j; cdf_secid_t maxsector = (cdf_secid_t)(sat->sat_len * size); DPRINTF(("Chain:")); f...
<vulnerable_code> /* Allow network administrator to have same access as root. */ if (ns_capable(net->user_ns, CAP_NET_ADMIN) || uid_eq(root_uid, current_uid())) { int mode = (table->mode >> 6) & 7; return (mode << 6) | (mode << 3) | mode; } /* Allow netns root group to have the same access as the root grou...
<vulnerable_code> else acls = sc_asn1_find_tag(ctx, buf, buflen, IASECC_DOCP_TAG_ACLS_CONTACT, &taglen); if (!acls) { sc_log(ctx, "ACLs not found in data(%"SC_FORMAT_LEN_SIZE_T"u) %s", buflen, sc_dump_hex(buf, buflen));<commit_title>[PATCH] iasecc: Prevent stack buffer overflow when empty ACL ...
<vulnerable_code> # Don't run as root, unless explicitly instructed to if user_info.pw_uid == 0: raise ModuleException("Binwalk extraction uses many third party utilities, which may not be secure.\nIf you wish to have extraction utilities executed as the current user,...
<vulnerable_code>function set (obj, path, value) { if(!obj) throw new Error('libnested.set: first arg must be an object') if(isBasic(path)) return obj[path] = value for(var i = 0; i < path.length; i++) if(i === path.length - 1) obj[path[i]] = value else if(null == obj[path[i]]) obj = (obj[path...
<vulnerable_code> t.end() })<commit_title>[PATCH] better fix for prototype pollution vulnerability<commit_description>cheers Idan Digmi of Snyk Security<fixed_code> t.end() }) tape('prototype pollution', function (t) { t.notEqual({}.polluted, 'yes') R.set({}, ['__proto__','polluted'], 'yes'); t.notEqual({}....
<vulnerable_code> @login_required @permission_required("admin.view_domain") @reversion.create_revision() def editdomain(request, dom_id): """Edit domain view."""<commit_title>[PATCH] Fixed CSRF issues in edit operations.<commit_description><fixed_code> @login_required @permission_required("admin.view_domain") @req...
<vulnerable_code> @login_required @permission_required("core.change_user") @reversion.create_revision() def editaccount(request, pk): account = User.objects.get(pk=pk)<commit_title>[PATCH] Fixed CSRF issues in edit operations.<commit_description><fixed_code> @login_required @permission_required("core.change_user")...
<vulnerable_code> v = math_ops.range(0, 9223372036854775807) self.evaluate(v) # TODO(vrv): move to sequence_ops_test? class LinSpaceTest(test.TestCase):<commit_title>[PATCH] Fix crash with tf.range when start is large/negative<commit_description>This PR tries to address the issue raised in 46899 where ...
<vulnerable_code> const keys = Object.keys(source); for (let i = 0; i < keys.length; ++i) { const key = keys[i]; const value = source[key]; if (value && typeof value === 'object') {<commit_title>[PATCH] skip assignment to __proto__<commit_description><fixed_code> const key...
<vulnerable_code> Hoek.merge({ x: {} }, a); expect(a.x.toString()).to.equal('abc'); }); }); describe('applyToDefaults()', () => {<commit_title>[PATCH] skip assignment to __proto__<commit_description><fixed_code> Hoek.merge({ x: {} }, a); expect(a.x.toString()).to.equal('abc'); })...
<vulnerable_code>import java.io.IOException; import java.lang.reflect.Method; import java.nio.charset.StandardCharsets; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.stream.Collectors; import org.jsoup.Jsoup; import org.jsoup.internal.StringUtil; import org.jsoup.nodes.Docu...