text
stringlengths
79
3.72M
<vulnerable_code> var data = record.data; var type = data.type; if (type == "bool") { if (value) { return '<div style="text-align: left"><div role="button" class="x-grid-checkcolumn x-grid-checkcolumn-checked" style=""></div></div>'; } else { ...
<vulnerable_code> #endif // Rate limiting: burst up to 30, 4 message per sec limit over longer time LeakyBucket::LeakyBucket() : tokensPerSec(4), maxTokens(30), currentTokens(0) { lastUpdate = now(); } <commit_title>[PATCH] Lower bucket params<commit_description>Use 1 tokens per second and 5 burst instead of 4 tokens...
<vulnerable_code> filter = state_keys_to_include selected_state_ids = await context.get_current_state_ids(filter) # Confusingly, get_current_state_events may return events that are discarded by # the filter, if they're in context._state_delta_due_to_event. Strip these away. s...
<vulnerable_code>{ struct outbound_phy_packet_event *e = container_of(packet, struct outbound_phy_packet_event, p); switch (status) { /* expected: */ } e->phy_packet.data[0] = packet->timestamp; queue_event(e->client, &e->event, &e->phy_packet, sizeof(e->phy_packet) + e->phy_packet.length, NULL, 0); cl...
<vulnerable_code> if inline_env is not None: env.update(inline_env) if os.name == "nt": cmd_not_found_exception = OSError if kill_after_timeout is not None: raise GitCommandError( redacted_command, '"kill_after_t...
<vulnerable_code> || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_FLOAT64ARRAY_PROTOTYPE) #endif /* JERRY_NUMBER_TYPE_FLOAT64 */ #if JERRY_BUILTIN_BIGINT || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_BIGINT64ARRAY_PROTOTYPE) || ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_BIGUINT64ARRAY_PROTOTYPE) #endi...
<vulnerable_code><commit_title>[PATCH] Add missing object types for ecma_object_get_class_name<commit_description>This patch fixes #4937 and fixes #4938. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu<fixed_code> // Copyright JS Foundation and other contributors, http://js.foundation // // L...
<vulnerable_code> { annotate_info=DestroyDrawInfo(annotate_info); annotate=DestroyDrawInfo(annotate); return(MagickFalse); } p=text; annotate_info=DestroyDrawInfo(annotate_info); annotate=DestroyDrawInfo(annotate); textlist=(char **) RelinquishMagickMemory(textlist); r...
<vulnerable_code> if (status == MagickFalse) continue; Ar=GetCacheViewVirtualPixels(Ar_view,0,y,Ar_image->columns,1,exception); Ai=GetCacheViewVirtualPixels(Ai_view,0,y,Ai_image->columns,1,exception); Br=GetCacheViewVirtualPixels(Br_view,0,y,Br_image->columns,1,exception); Bi=GetCacheViewVirtu...
<vulnerable_code> goto error; } if (report(UPDATEHUB_STATE_INSTALLED) < 0) { LOG_ERR("Could not reporting installed state"); goto error;<commit_title>[PATCH] lib: updatehub: Add missing do upgrade request call<commit_description>After a success image download, UpdateHub needs inform MCUboot that must test new i...
<vulnerable_code> } else { UChar *q = p + reg->dmin; while (p < q) p += enclen(reg->enc, p); } }<commit_title>[PATCH] Patch from the upstream git<commit_description><fixed_code> } else { UChar *q = p + reg->dmin; if (q >= end) return 0; /* fail */ while (p < q) p += e...
<vulnerable_code> return rc; } static int fsmRmdir(const char *path) { int rc = rmdir(path); if (_fsm_debug) rpmlog(RPMLOG_DEBUG, " %8s (%s) %s\n", __func__, path, (rc < 0 ? strerror(errno) : "")); if (rc < 0) switch (errno) { case ENOENT: rc = RPMERR_ENOENT; break; return rc; }...
<vulnerable_code><commit_title>[PATCH] Add reproducer for #262 to the test suite<commit_description><fixed_code> # -*- coding: utf-8 -*- import system_tests class DivByZeroInPrintIFD(metaclass=system_tests.CaseMeta): url = "https://github.com/Exiv2/exiv2/issues/262" filename = system_tests.path( "$...
<vulnerable_code> if item in package['exports'] or item == package['name']: result.append(package) # sanity check: # imo we should no longer need the functionality to remove the duplicates # TODO: recheck this # it is possible that the pipreqs will write two packages, using s...
<vulnerable_code>{ int ret; WOLFSSL_ENTER("wolfSSL_CertManagerCheckOCSP_Staple"); if (cm == NULL || response == NULL) return BAD_FUNC_ARG; if (cm->ocspEnabled == 0)<commit_title>[PATCH] Fix CompareOcspReqResp.<commit_description>There was a bug in this function that could cause a match to be re...
<vulnerable_code>} #endif /* !NO_FILESYSTEM && !NO_CERTS */ static int test_wolfSSL_CertManagerLoadCABuffer(void) { int ret = 0; AssertIntEQ(test_wolfSSL_CTX_use_certificate_buffer(), WOLFSSL_SUCCESS); test_wolfSSL_CTX_use_PrivateKey_file(); test_wolfSSL_CTX_load_verify_locations(); test_wolfSSL_Ce...
<vulnerable_code> for (single = resp->single; single; single = next) { cmp = req->serialSz - single->status->serialSz; if (cmp == 0) { if ((XMEMCMP(req->serial, single->status->serial, req->serialSz) == 0) && (XMEMCMP(req->issuerHash, single->issuerHash, OCSP_DIGEST_SIZE) == ...
<vulnerable_code> * the contents of the first * * The slowest version uses no static tables at all and computes the values in each round * <p> * This file contains the fast version with 8Kbytes of static tables for round precomputation * */ public class AESFastEngine implements BlockCipher<commit_title>[PATCH...
<vulnerable_code>package org.bouncycastle.jcajce.provider.drbg; import java.lang.reflect.Constructor; import java.security.SecureRandom; import java.security.SecureRandomSpi; extends SecureRandomSpi { private SecureRandom random = new SP800SecureRandomBuilder(secureRandom, true) .setPe...
<vulnerable_code> } catch (InvalidCipherTextException e) { throw new IllegalStateException("exception on doFinal()", e); } } <commit_title>[PATCH] Added table use obfuscation to AESFastEngine JDK 1.4 compiler<commit_descripti...
<vulnerable_code> } } bool jspeiAddScope(JsVar *scope) { if (execInfo.scopeCount >= JSPARSE_MAX_SCOPES) { jsExceptionHere(JSET_ERROR, "Maximum number of scopes exceeded"); if (JSP_SHOULD_EXECUTE && lhs) { if (op=='=') { /* If we're assigning to this and we don't have a parent, * add ...
<vulnerable_code> extent+=image->columns*sizeof(uint32); #endif strip_pixels=(unsigned char *) AcquireQuantumMemory(extent, sizeof(*strip_pixels)); if (strip_pixels == (unsigned char *) NULL) ThrowTIFFException(ResourceLimitError,"MemoryAllocationFailed"); (void) memse...
<vulnerable_code>import io.dropwizard.validation.selfvalidating.ViolationCollector; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.parallel.Execution; import org.junit.jupiter.api.parallel.ExecutionMode; import uk.org.lidalia.slf4jext.Level; import uk.org.lidalia...
<vulnerable_code># Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """Tests scenario for the Firecracker serial console.""" import time from framework.microvm import Serial from framework.state_machine import TestState class WaitLogin(TestState): """In...
<vulnerable_code> (?::(\d\d))? # optional seconds )? # optional clock \s* ([-+]?\d{2,4}|(?![APap][Mm]\b)[A-Za-z]+)? # timezone \s* (?:\(\w+\))? # ASCII representation of timezone in parens. \s*$""", re.X | re.ASCII) def http2time(text): """Returns time...
<vulnerable_code> If the room is partial-stated, we raise an AuthError with the UNABLE_DUE_TO_PARTIAL_STATE error code, unless `allow_partial_state_rooms` is true. """ if not allow_partial_state_rooms and await self._store.is_partial_state_room( room_id<commit_title>[PATCH] A...
<vulnerable_code>import { routeAction } from "discourse/helpers/route-action"; import { buildParams, replaceRaw } from "../../lib/raw-event-helper"; import bootbox from "bootbox"; export default createWidget("discourse-post-event", { tagName: "div.discourse-post-event-widget", startsAtMonth: moment(eventModel....
<vulnerable_code>import I18n from "I18n"; import { createWidgetFrom } from "discourse/widgets/widget"; import { DefaultNotificationItem } from "discourse/widgets/default-notification-item"; import { formatUsername } from "discourse/lib/utilities"; import { iconNode } from "discourse-common/lib/icon-library"; createWid...
<vulnerable_code>import I18n from "I18n"; import { createWidgetFrom } from "discourse/widgets/widget"; import { DefaultNotificationItem } from "discourse/widgets/default-notification-item"; import { formatUsername } from "discourse/lib/utilities"; import { iconNode } from "discourse-common/lib/icon-library"; createWid...
<vulnerable_code>!function(){var t;t=jQuery,Craft.QuickPostWidget=Garnish.Base.extend({params:null,initFields:null,formHtml:null,$widget:null,$form:null,$spinner:null,$errorList:null,loading:!1,init:function(i,r,e,n){this.params=r,this.initFields=e,this.formHtml=n,this.$widget=t("#widget"+i),this.initForm(this.$widget....
<vulnerable_code> for (var i = 0; i < response.errors[attribute].length; i++) { var error = response.errors[attribute][i]; $('<li>' + error + '</li>').appendTo(this.$errorList); } } }<commit_title>[PATCH] Fixed an ...
<vulnerable_code> *len = le16_to_cpu(((struct smb2_read_req *)hdr)->ReadChannelInfoLength); break; case SMB2_WRITE: if (((struct smb2_write_req *)hdr)->DataOffset) { *off = le16_to_cpu(((struct smb2_write_req *)hdr)->DataOffset); *len = le32_to_cpu(((struct smb2_write_req *)hdr)->Length); break; }<comm...
<vulnerable_code> " %s uploaded by tenant: %s", spFileContent.getFileName(), tenantDomain)); } try { //Creating secure parser by disabling XXE SAXParserFactory spf = SAXParserFactory.newInstance(); spf.setNamespaceAware(true); spf.setXIn...
<vulnerable_code> err1 = __es_remove_extent(inode, lblk, end, NULL, es1); if (err1 != 0) goto error; err2 = __es_insert_extent(inode, &newes, es2); if (err2 == -ENOMEM && !ext4_es_must_keep(&newes)) err2 = 0; if (err2 != 0) goto error; if (sbi->s_cluster_ratio > 1 && test_opt(inode->i_sb, DELALLOC) && ...
<vulnerable_code>CONN_ID = "test_kubernetes_conn_id" POLL_INTERVAL = 2 CLUSTER_CONTEXT = "test-context" CONFIG_DICT = {"a": "b"} IN_CLUSTER = False SHOULD_DELETE_POD = True GET_LOGS = True kubernetes_conn_id=CONN_ID, poll_interval=POLL_INTERVAL, cluster_context=CLUSTER_CONTEXT, config_di...
<vulnerable_code>typedef struct { TIFFPredictorState predict; z_stream stream; uint16 *tbuf; uint16 stride; int state; sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size); if (sp->tbuf == NULL) return (0); if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) sp->user_datafmt = PixarLogGuessDataFmt(td); if (sp...
<vulnerable_code> * they are not on hot paths so a little discipline won't do * any harm. * * Locking: takes termios_rwsem */ down_write(&tty->termios_rwsem); tty->termios.c_line = num; up_write(&tty->termios_rwsem); } /**<commit_title>[PATCH] tty: Prevent ldisc drivers from re-using stale tty fields<commit_de...
<vulnerable_code>#define NETWORK_TIMEOUT K_SECONDS(2) #define UPDATEHUB_POLL_INTERVAL K_MINUTES(CONFIG_UPDATEHUB_POLL_INTERVAL) #define MAX_PATH_SIZE 255 #define MAX_PAYLOAD_SIZE 500 #define MAX_DOWNLOAD_DATA 1100 #define COAP_MAX_RETRY 3 #define MAX_IP_SIZE 30 <commit_title>[PATCH] lib: updatehub: Fix buffer sizes<com...
<vulnerable_code> auto index = exportIndexes[curr]; switch (curr->kind) { case ExternalKind::Function: { curr->value = getFunctionIndexName(index); break; }<commit_title>[PATCH] properly error on invalid function import indexes ; fixes<commit_description><fixed_code> auto index = ...
<vulnerable_code> continue; timer->it.cpu.expires += incr; timer->it_overrun += 1 << i; delta -= incr; } }<commit_title>[PATCH] posix-timers: Sanitize overrun handling<commit_description>The posix timer overrun handling is broken because the forwarding functions can return a huge number of overruns which does...
<vulnerable_code>} __initcall(init_posix_timers); static void common_hrtimer_rearm(struct k_itimer *timr) { struct hrtimer *timer = &timr->it.real.timer; if (!timr->it_interval) return; timr->it_overrun += (unsigned int) hrtimer_forward(timer, timer->base->get_time(), timr->it_interval); hrtimer_res...
<vulnerable_code> static void tokenadd(struct jv_parser* p, char c) { assert(p->tokenpos <= p->tokenlen); if (p->tokenpos == p->tokenlen) { p->tokenlen = p->tokenlen*2 + 256; p->tokenbuf = jv_mem_realloc(p->tokenbuf, p->tokenlen); } TRY(value(p, v)); } else { // FIXME: better parser p->token...
<vulnerable_code> def is_complex_type(self): raise NotImplementedError("ABIType.is_complex_type") # uint<M>: unsigned integer type of M bits, 0 < M <= 256, M % 8 == 0. e.g. uint32, uint8, uint256. # int<M>: two’s complement signed integer type of M bits, 0 < M <= 256, M % 8 == 0. class ABI_GIntM(ABIType): ...
<vulnerable_code> return LLLnode.from_list(lll_node, typ=typ, pos=getpos(self.expr)) def parse_Tuple(self): call_lll, multi_lll = parse_sequence(self.expr, self.expr.elements, self.context) typ = TupleType([x.typ for x in multi_lll], is_literal=True) multi_lll = LLLnode.from_list(["m...
<vulnerable_code> # Create an x=y statement, where the types may be compound @type_check_wrapper def make_setter(left, right, location, pos, in_function_call=False): # Basic types if isinstance(left.typ, BaseType): right = unwrap_location(right)<commit_title>[PATCH] simplify return logic<commit_descript...
<vulnerable_code>from vyper.old_codegen.function_definitions.utils import get_nonreentrant_lock from vyper.old_codegen.lll_node import LLLnode from vyper.old_codegen.parser_utils import getpos, make_setter from vyper.old_codegen.types import BaseType, TupleType, get_size_of_type from vyper.old_codegen.types.check impor...
<vulnerable_code> unwrap_location, zero_pad, ) from vyper.old_codegen.return_ import gen_tuple_return, make_return_stmt from vyper.old_codegen.types import ( BaseType, ByteArrayLike, return LLLnode.from_list("break", typ=None, pos=getpos(self.stmt)) def parse_Return(self): if self.co...
<vulnerable_code> # Check assignment from rhs to lhs. # For now use make_setter for its typechecking side effects def check_assign(lhs, rhs, pos, in_function_call=False): make_setter(lhs, rhs, location="memory", pos=pos, in_function_call=in_function_call) # TODO Refactor into an actual type-checking function<co...
<vulnerable_code> # Paginate results result = filtered[parameters['start']:(parameters['start'] + parameters['length'])] # Sanitize on the way out result = [{k: helpers.sanitize(v) if isinstance(v, basestring) else v for k, v in row.iteritems()} for row in result] ...
<vulnerable_code> return params def sanitize(string): if string: return unicode(string).replace('<','&lt;').replace('>','&gt;') else: return '' def is_public_ip(host):<commit_title>[PATCH] Improve data sanitation (Fixes Tautulli/Tautulli-Issues#161)<commit_description><fixed_code> ret...
<vulnerable_code> settings_photo_quality = helpers.get_xml_attr(settings, 'photoQuality') settings_photo_resolution = helpers.get_xml_attr(settings, 'photoResolution') sync_details = {"device_name": helpers.sanitize(device_name), ...
<vulnerable_code>import versioncheck import web_socket from plexpy.api2 import API2 from plexpy.helpers import checked, addtoapi, get_ip, create_https_certificates, build_datatables_json from plexpy.session import get_session_info, get_session_user_id, allow_session_user, allow_session_library from plexpy.webauth impor...
<vulnerable_code> static int fsmMkfile(int dirfd, rpmfi fi, struct filedata_s *fp, rpmfiles files, rpmpsm psm, int nodigest, struct filedata_s ** firstlink, int *firstlinkfile) { int rc = 0; int fd = -1; *firstlinkfile = -1; } } if (fd != *firstlinkfile) fsmClose(&fd); return ...
<vulnerable_code> !(data_node && data_node->nodetype != LYS_GROUPING && lys_ingrouping(data_node))) { unsigned int c = 2 * (((struct yang_type *)(yyvsp[-2].backup_token).a...
<vulnerable_code> 'tags': [group.name], 'environmentUri': env_fixture.environmentUri, 'devStrategy': 'trunk', 'template': '', }, username='alice', groups=[group.name],<commit_title>[PATCH] Remove templates option in Pipelines - fixed docs and tests<...
<vulnerable_code> 'tags': [group.name], 'environmentUri': env1.environmentUri, 'devStrategy': 'trunk', 'template': '' }, username='alice', groups=[group.name],<commit_title>[PATCH] Remove templates option in Pipelines - fixed docs and tests<commit_d...
<vulnerable_code>/* {[The file is published on the basis of YetiForce Public License 3.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */ CKEDITOR.dialog.add('base64image-dialog', function (editor) { var t = null, selectedImg = null, orgWidth = null, orgHeight = null, ...
<vulnerable_code>/* {[The file is published on the basis of YetiForce Public License 3.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */ function initPasteEvent(editorInstance) { if (editorInstance.addFeature) { editorInstance.addFeature({ allowedContent: 'img[alt,id,!s...
<vulnerable_code>var exec = require('child_process').execSync var platform = require('os').platform() module.exports = function(){ var commands = Array.isArray(arguments[0]) ? arguments[0] : Array.prototype.slice.apply(arguments) function isExec(command){ try{ exec(command, { stdio: 'ignore' }) return tru...
<vulnerable_code> return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, commands); /* Now that we know we at least have a chunk header, * do things that are type appropriate. */ } } /* Report violation if chunk len overflows */ ch_end = ((__u8 *)ch) + SCTP_PAD4(ntohs(ch->length)); i...
<vulnerable_code> } protected int indexOf(char c, int pos) { for (int i = pos; pos < len; i++) if (in[i] == (byte) c) return i; return -1;<commit_title>[PATCH] Fix out of bound exception<commit_description><fixed_code> } protected int indexOf(char c, int pos) { for (int i = pos; i < len; i++) if (i...
<vulnerable_code> * @return numbers of rows deleted */ public int deleteAllExternalLinks() { return mContentResolver.delete(ProviderMeta.ProviderTableMeta.CONTENT_URI_EXTERNAL_LINKS, " 1 = 1 ", null); } /**<commit_title>[PATCH 8/8] Remove obsolete TODO<commit_description><fixed_code> ...
<vulnerable_code> // ""+file.getFileId()); Uri file_uri = ContentUris.withAppendedId(ProviderTableMeta.CONTENT_URI_FILE, ocFile.getFileId()); String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + AND + ProviderTableMeta.FILE_PATH + "=?"; Str...
<vulnerable_code> */ public List<SyncedFolder> getSyncedFolders() { Cursor cursor = mContentResolver.query( ProviderMeta.ProviderTableMeta.CONTENT_URI_SYNCED_FOLDERS, null, "1=1", null, null ); if (cursor !=...
<vulnerable_code> _ID, FILE_PARENT, FILE_NAME, FILE_CREATION, FILE_MODIFIED, FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA, FILE_CONTENT_TYPE, FILE_STORAGE_PATH, FILE_PATH, FILE_ACCOUNT_OWNER, FILE_L...
<vulnerable_code>import javax.inject.Inject; import androidx.annotation.NonNull; import dagger.android.AndroidInjection; /** * The ContentProvider for the ownCloud App. */ } private int delete(SQLiteDatabase db, Uri uri, String where, String... whereArgs) { if (isCallerNotAllowed(uri)) { ...
<vulnerable_code> } if (uri.getPathSegments().size() > MINIMUM_PATH_SEGMENTS_SIZE) { // TODO this *must* fail with new protection (as where is to be checked) count += db.delete(ProviderTableMeta.FILE_TABLE_NAME, ProviderTableMeta._ID + "=" + uri.ge...
<vulnerable_code> // verify only for those requests that are not internal final int uriMatch = mUriMatcher.match(uri); switch (uriMatch) { case ROOT_DIRECTORY: case SINGLE_FILE: case DIRECTORY: VerificationUtils.verifyColumnNames(projectionArra...
<vulnerable_code> } public String buildParameterizedSelection(String selection) { StringBuilder stringBuilder = new StringBuilder(); // add = ? boolean moreThanOne = false; for (String string : selection.split(",")) { if (moreThanOne) { stringBuilder....
<vulnerable_code>import android.content.OperationApplicationException; import android.content.UriMatcher; import android.database.Cursor; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import android.database.sqlite.SQLiteOpenHelper; ...
<vulnerable_code>import android.content.OperationApplicationException; import android.content.UriMatcher; import android.database.Cursor; import android.database.DatabaseUtils; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import and...
<vulnerable_code><commit_title>[PATCH 8/8] Remove obsolete TODO<commit_description><fixed_code> package third_parties.aosp; /* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. ...
<vulnerable_code> } public static void verifySortOrder(@Nullable String sortOrder) { if (TextUtils.isEmpty(sortOrder)) { return; } for (String segment : sortOrder.split(" +")) { switch (segment.toLowerCase(Locale.ROOT)) { ...
<vulnerable_code> Cursor cursor = mContentResolver.query( ProviderMeta.ProviderTableMeta.CONTENT_URI_SYNCED_FOLDERS, null, null, // TODO check if this is correct, via test? null, null );<commit_title>[PATCH ...
<vulnerable_code> sk = s->sk; if (!sk) { spin_unlock_bh(&ax25_list_lock); s->ax25_dev = NULL; ax25_disconnect(s, ENETUNREACH); spin_lock_bh(&ax25_list_lock); goto again; } sock_hold(sk); spin_unlock_bh(&ax25_list_lock); lock_sock(sk); s->ax25_dev = NULL; if (sk->sk_socket) { ...
<vulnerable_code>function _init(){"use strict";$.AdminLTE.layout={activate:function(){var t=this;t.fix(),t.fixSidebar(),$(window,".wrapper").resize(function(){t.fix(),t.fixSidebar()})},fix:function(){var t=$(".main-header").outerHeight()+$(".main-footer").outerHeight(),e=$(window).height(),i=$(".sidebar").height();if($...
<vulnerable_code>!function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?f...
<vulnerable_code>function _init(){"use strict";$.AdminLTE.layout={activate:function(){var t=this;t.fix(),t.fixSidebar(),$(window,".wrapper").resize(function(){t.fix(),t.fixSidebar()})},fix:function(){var t=$(".main-header").outerHeight()+$(".main-footer").outerHeight(),e=$(window).height(),i=$(".sidebar").height();if($...
<vulnerable_code> set; function indexer(set) { return function(obj, i) { "use strict"; try { if (obj && i && obj.hasOwnProperty(i)) { return obj[i]; } return; } catch(ex) { console.error(ex); return; } fu...
<vulnerable_code><commit_title>[PATCH] fix vulnerability reported by whitesource software<commit_description><fixed_code> var dh = require("./deepHas"); var obj = {}; console.log(obj.isAdmin); dh.set(obj,'__proto__.isAdmin','true'); console.log(obj.isAdmin);
<vulnerable_code><commit_title>[PATCH] fix vulnerability reported by whitesource software<commit_description><fixed_code> var dh = require("../deepHas"), should = require("should"), obj; obj = {}; dh.set(obj,'__proto__.isAdmin',true); should.not.exist(obj.isAdmin); obj.hasOwnProperty('isAdmin').should.equal(...
<vulnerable_code> return { authenticate: function (request, reply) { var token = extract(request, options); if (!token && request.auth.mode !== 'required') { // request.auth.isAuthenticated = false; console.log(' - - - - - - - - - - - - - - - - - - - > SHORT Circuit!') console....
<vulnerable_code> method: 'GET', path: '/try', handler: function (request, reply) { console.log(' - - - - - - - - - - - - - - - - - - - - - - -') console.log(request.auth); console.log(' - - - - - - - - - - - - - - - - - - - - - - -') t.notOk(request.auth.isAuthenticated...
<vulnerable_code> f->transport_hdr = ((uint8_t *)f->net_hdr) + PICO_SIZE_IP4HDR + option_len; f->transport_len = (uint16_t)(short_be(hdr->len) - PICO_SIZE_IP4HDR - option_len); f->net_len = (uint16_t)(PICO_SIZE_IP4HDR + option_len); #if defined(PICO_SUPPORT_IPV4FRAG) || defined(PICO_SUPPORT_IPV6FRAG) f->...
<vulnerable_code> if (tcpopt_len_check(idx, len, PICO_TCPOPTLEN_MSS) < 0) return; t->mss_ok = 1; mss = short_from(opt + *idx); *idx += (uint32_t)sizeof(uint16_t); uint8_t *opt = f->transport_hdr + PICO_SIZE_TCPHDR; uint32_t i = 0; f->timestamp = 0; while (i < (f->transport_len - ...
<vulnerable_code> /* Initialize image structure. */ if (ReadDDSInfo(image, &dds_info) != MagickTrue) { ThrowReaderException(CorruptImageError,"ImproperImageHeader"); } if (dds_info.ddscaps2 & DDSCAPS2_CUBEMAP) cubemap = MagickTrue; if (volume) num_images = dds_info.depth; for (n = 0; n < ...
<vulnerable_code> static njs_code_name_t code_names[] = { { NJS_VMCODE_OBJECT, sizeof(njs_vmcode_object_t), njs_str("OBJECT ") }, { NJS_VMCODE_FUNCTION, sizeof(njs_vmcode_function_t), njs_vmcode_import_t *import; njs_vmcode_finally_t *finally; njs_vmcode_try_end...
<vulnerable_code> function = native_frame->function; be = njs_arr_add(stack); if (njs_slow_path(be == NULL)) { return NJS_ERROR; be->file = njs_str_value(""); if (function != NULL && function->native) { while (function->bound != NULL) { function = function->u.bound_targ...
<vulnerable_code> function->object.type = NJS_FUNCTION; function->object.shared = 1; function->object.extensible = 1; function->args_offset = 1; function->native = 1; function->u.native = external->u.method.native; function->magic8 = ext...
<vulnerable_code> */ function->ctor = lambda->ctor; function->args_offset = 1; function->u.lambda = lambda; if (function->ctor) { } function->native = 1; function->args_offset = 1; function->u.native = native; return function; njs_bool_t ctor) { size_t si...
<vulnerable_code> njs_parser_node_t *node) { njs_jump_off_t func_offset; njs_vmcode_move_arg_t *move_arg; njs_vmcode_function_frame_t *func; if (node == NULL) { return njs_generator_stack_pop(vm, generator, generator->context); } njs_generate_code(generator, nj...
<vulnerable_code> function->object.shared_hash = vm->shared->arrow_instance_hash; function->object.type = NJS_FUNCTION; function->object.extensible = 1; function->args_offset = 1; function->native = 1; function->context = context; <commit_title>[PATCH] Refactored bound function calls according to...
<vulnerable_code> lambda->declarations = (arr != NULL) ? arr->start : NULL; lambda->ndeclarations = (arr != NULL) ? arr->items : 0; module->function.args_offset = 1; module->function.u.lambda = lambda; return module;<commit_title>[PATCH] Refactored bound function calls according to the spec.<commit...
<vulnerable_code> njs_value_t numeric1, numeric2, primitive1, primitive2; njs_frame_t *frame; njs_jump_off_t ret; njs_vmcode_await_t *await; njs_native_frame_t *previous, *native; njs_property_next_t *next; njs_vmcod...
<vulnerable_code> { njs_str("var bArray = Array.bind(null, 10); new bArray(16)"), njs_str("10,16") }, #if 0 /* FIXME: refactor Bound calls (9.4.1.1[[Call]]). */ { njs_str("function f(x,y) {return {args:arguments,length:arguments.length}};" "var bf = f.bind({}, 'a'); var bbf = bf.bind({},'b')...
<vulnerable_code><commit_title>[PATCH] Refactored bound function calls according to the spec.<commit_description>This fixes #533, #546, #579 issues on Github.<fixed_code> /*--- includes: [compareArray.js] flags: [async] ---*/ async function f(a1, a2, a3) { var v = await a1; return [a1, a2, a3]; } f.bind(null,...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 2105, /**/<commit_title>[PATCH] patch 9.0.2106: [security]: Use-after-free in win_close()<commit_description>Problem: [security]: Use-after-free in win_close() Solution: Check window is valid, before accessing it ...
<vulnerable_code> reset_VIsual_and_resel(); // stop Visual mode other_buffer = TRUE; win->w_closing = TRUE; apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf); if (!win_valid(win))<commit_title>[PATCH] patch 9.0.2106: [security]: Use-after-free in win_close()<commit_description>Problem: ...
<vulnerable_code> buffer_len = *ret_buffer_len; buffer_offset = 0; if (se->data.server.userdb == NULL) { c_complain (LOG_NOTICE, &complain_no_users, "network plugin: Received signed network packet but can't verify it " "because no user DB has been configured. Will accept it."); return (0...
<vulnerable_code>import org.opencms.gwt.shared.CmsAdditionalInfoBean; import org.opencms.gwt.shared.CmsListInfoBean; import com.google.gwt.user.client.ui.HTML; /** } /** * Gets the image tile.<p> * */ private String generateTooltipHtml(CmsListInfoBean infoBean) { StringBuffer res...