text
stringlengths
79
3.72M
<vulnerable_code>package com.dotcms.visitor.business; import com.dotcms.visitor.domain.Visitor; import com.dotmarketing.portlets.languagesmanager.business.LanguageAPI; import javax.servlet.http.HttpServletRequest; import java.util.Optional; public interface VisitorAPI { void setLanguageAPI(LanguageAPI languageA...
<vulnerable_code>import com.dotcms.util.HttpRequestDataUtil; import com.dotcms.visitor.domain.Visitor; import com.dotmarketing.business.APILocator; import com.dotmarketing.portlets.languagesmanager.business.LanguageAPI; import com.dotmarketing.portlets.languagesmanager.model.Language; import com.dotmarketing.util.Confi...
<vulnerable_code>package com.dotcms.visitor.domain; import com.dotmarketing.portlets.personas.model.IPersona; import eu.bitwalker.useragentutils.UserAgent; private InetAddress ipAddress; private long selectedLanguageId; private Locale locale; this.ipAddress = ipAddress; } public long ...
<vulnerable_code> sb.append("#set($dotPageContent = $dotcontent.find(\"" + htmlPage.getInode() + "\" ))"); } // set the visitor object if present sb.append("#if($UtilMethods.isSet($request.getSession(false)) && $request.session.getAttribute(\""+ WebKeys.VISITOR+"\"))"); sb.append("#set ($visitor = $request....
<vulnerable_code>import javax.servlet.http.HttpSession; import com.dotcms.enterprise.LicenseUtil; import com.dotmarketing.beans.Identifier; import com.dotmarketing.business.DotStateException; import com.dotmarketing.exception.DotSecurityException; import com.dotmarketing.portlets.contentlet.model.Contentlet; import co...
<vulnerable_code> @SuppressWarnings("unchecked") public void doPreviewMode(HttpServletRequest request, HttpServletResponse response) throws Exception { Optional<Visitor> visitor = visitorAPI.getVisitor(request); String uri = URLDecoder.decode(request.getRequestURI(), UtilMethods.getCharsetConfiguration()); ...
<vulnerable_code>package com.dotcms.visitor; import com.dotcms.visitor.domain.Visitor; import com.dotmarketing.business.APILocator; import com.dotmarketing.portlets.languagesmanager.business.LanguageAPI; import com.dotmarketing.portlets.languagesmanager.model.Language; import com.dotmarketing.util.WebKeys; import java...
<vulnerable_code>package com.dotcms.rest.api.v1.system.i18n; import com.dotcms.repackage.com.google.common.annotations.VisibleForTesting; import com.dotcms.repackage.com.google.common.collect.Maps; import com.dotcms.repackage.javax.ws.rs.GET; import com.dotcms.repackage.javax.ws.rs.Path;<commit_title>[PATCH 01/30] Cre...
<vulnerable_code> package com.liferay.portal.struts; import com.dotcms.repackage.org.apache.struts.util.MessageResourcesFactory; import com.dotcms.repackage.com.oroad.stxx.util.PropertyMessageResources; import com.dotmarketing.business.APILocator; } public Map getMessages() { return messages; } public void set...
<vulnerable_code> return -EIO; } return le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize); } static int sd_isoc_init(struct gspca_dev *gspca_dev) { struct usb_host_interface *alt; int max_packet_size; break; } /* Start isoc bandwidth "negotiation" at max isoc bandwidth */ alt = &gspca_dev->dev->actconfig...
<vulnerable_code> break; sprintf(szV, "%c%c", string[j], string[j+1]); sscanf(szV, "%x", &v); value[i] = v; i++; } } if (i != 16) {<commit_title>[PATCH] fix buffer overrun in gf_bin128_parse<commit_description>closes #1204 closes #1205<fixed_code> break; sprintf(szV, "%c%c", string[j], string[...
<vulnerable_code>import org.gradle.internal.hash.ChecksumService; import org.gradle.util.internal.GFileUtils; import org.gradle.util.internal.RelativePathUtil; import java.io.File; import java.util.Collections; import java.util.HashSet; import java.util.Set; import static org.gradle.internal.FileUtils.hasExtension; ...
<vulnerable_code>from system_tests import CaseMeta, path class MrmImageLargeAllocation(metaclass=CaseMeta): """ Regression test for the bug described in: https://github.com/Exiv2/exiv2/pull/943 """ url = "https://github.com/Exiv2/exiv2/issues/1530" <commit_title>[PATCH] Fix test name<commit_descri...
<vulnerable_code> return -EIO; } packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize); err = stv06xx_write_bridge(sd, STV_ISO_SIZE_L, packet_size); if (err < 0) static int stv06xx_isoc_init(struct gspca_dev *gspca_dev) { struct usb_host_interface *alt; struct sd *sd = (struct sd *) gspca_dev; /* S...
<vulnerable_code> alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); if (!alt) return -ENODEV; packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize); /* If we don't have enough bandwidth use a lower framerate */<commit_title>[PATCH] media: stv06xx: add missing descriptor sanity checks<commit_descr...
<vulnerable_code> return next.split('?')[0] } return next } <commit_title>[PATCH] account: Prevent open redirects after login<commit_description><fixed_code> return next.split('?')[0] } // Only allow relative redirects to prevent open redirects. if (!next.startsWith('/') || next.startsWith('//')) { ...
<vulnerable_code> oscore_value_t *value) { const char *begin = *start; const char *end; const char *split; size_t i; retry: end = memchr(begin, '\n', size); if (end == NULL) return 0; if (begin[0] == '#' || (end - begin) == 0) { /* Skip comment / blank line */ size -= end - b...
<vulnerable_code> else if (0x00 == (byteMain & 0x20)) { // 2 byte int val = (int)(((byteMain & 0x1F) << 6) | (pBuffer[lIndex + 1] & 0x3F)); pUnicodeString[lIndexUnicode++] = (WCHAR)(val); lIndex += 2; ...
<vulnerable_code> if (bIsOldBmp){ // convert a old color table (3 byte entries) to a new // color table (4 byte entries) hFile->Read((void*)pRgb,DibNumColors(&bmpHeader) * sizeof(RGBTRIPLE),1); for (int32_t i=DibNumColors(&head)-1; i>=0; i--){ pRg...
<vulnerable_code>void CxImage::Startup(uint32_t imagetype) { //init pointers pDib = pSelection = pAlpha = NULL; ppLayers = ppFrames = NULL; //init structures memset(&head,0,sizeof(BITMAPINFOHEADER)); strcpy(info.szLastError,"CxImage::Create can't allocate memory"); return NULL; } //clear the palette RGBQUA...
<vulnerable_code> // read the palette RGBQUAD pal[256]; if (bih.biClrUsed) hFile->Read(pal,bih.biClrUsed*sizeof(RGBQUAD), 1); else hFile->Read(pal,head.biClrUsed*sizeof(RGBQUAD), 1); SetPalette(pal,head.biClrUsed); //palette assign <commit_title>[PATCH] Fix 25 errors<commit_description><fi...
<vulnerable_code>{ return pDib; } //////////////////////////////////////////////////////////////////////////////// uint32_t CxImage::GetHeight() const {<commit_title>[PATCH] Fix 25 errors<commit_description><fixed_code> { return pDib; } void* CxImage::GetDIBLimit() const { return pDibLimit; } ////////////////////...
<vulnerable_code> info.xDPI = pcxHeader.Hres; info.yDPI = pcxHeader.Vres; if (info.nEscape == -1){ head.biWidth = Width; head.biHeight= Height; //Read the image and check if it's ok nbytes = pcxHeader.BytesPerLine * pcxHeader.ColorPlanes * Height; lpHead1 = pcximage = (uint8_t*)malloc(nbytes); whil...
<vulnerable_code> tilebuf = (uint8_t*)malloc(TIFFTileSize(m_tif)); } bits = (uint8_t*)malloc(bitspersample==16? bitsize*2 : bitsize); // * VK uint8_t * bits16 = NULL; // + VK int32_t line16 = 0; // + VK line16 = line; line = CalculateLine(width, 8 * samplesperpixel); b...
<vulnerable_code> return m_pBuffer; } ////////////////////////////////////////////////////////// size_t CxMemFile::Read(void *buffer, size_t size, size_t count) { if (buffer==NULL) return 0; if (m_Position >= (int32_t)m_Size){ m_bEOF = true; return 0; } int32_t nCount = (int32_t)(count*size); if (nCount == 0...
<vulnerable_code> int inspt; int i; for (i = 0; i < tab->numents; ++i) { if (tab->ents[i]->ind > ent->ind) { break; }<commit_title>[PATCH] Fix 25 errors<commit_description><fixed_code> int inspt; int i; // check on MAX_INT int correct_num_ents = tab->numents; if (correct_num_ents > 0x7FFFFFFE) ...
<vulnerable_code>{ double cam_rgb[4][3], inverse[4][3], num; int i, j, k; for (i=0; i < p->colors; i++) /* Multiply out XYZ colorspace */ for (j=0; j < 3; j++) for (cam_rgb[i][j] = k=0; k < 3; k++) cam_rgb[i][j] += cam_xyz[i][k] * xyz_rgb[k][j]; for (i=0; i < p->colors; i++) { /* Normalize cam_rgb so t...
<vulnerable_code> && fix < tif->tif_nfields) { if (fip->field_type == TIFF_ANY) /* wildcard */ break; fip = tif->tif_fieldinfo[++fix]; if (fix >= tif->tif_nfields || fip->field_tag != dp->tdir_tag) { TIFFWarningExt(tif->tif_clientdata, module, && fix < tif->tif_nfields) { if (fip->...
<vulnerable_code> sp->in_buffer_file_pos=0; else { sp->in_buffer_file_togo=sp->tif->tif_dir.td_stripbytecount[sp->in_buffer_next_strile]; if (sp->in_buffer_file_togo==0) sp->in_buffer_file_pos=0; else if (sp->in_buffer_file_pos+sp->in_buffer_file_togo>sp->file_size)<comm...
<vulnerable_code> // (пробел, таб, перенос каретки или перенос строки). unsigned char *sCur = (unsigned char*)(*ppEexecBuffer); while( sCur < (unsigned char*)(*ppEexecBuffer) + nLen && ( ' ' == *sCur || '\t' == *sCur || '\r' == *sCur || '\n' == *sCur ) ) ++sCur; // Теперь нам...
<vulnerable_code> if (!capable(CAP_NET_ADMIN)) return -EPERM; if (len != set_arglen[SET_CMDID(cmd)]) { pr_err("set_ctl: len %u != %u\n", len, set_arglen[SET_CMDID(cmd)]); { unsigned char arg[128]; int ret = 0; if (!capable(CAP_NET_ADMIN)) return -EPERM; if (*len < get_arglen[GET_CMDID(cmd)]) { ...
<vulnerable_code> if (strlen(s) >= UNIT_NAME_MAX) /* Return a slightly more descriptive error for this specific condition */ return -ENAMETOOLONG; /* Refuse this if this got too long or for some other reason didn't result in a valid name */ if (!unit_name_is_valid(s, UNIT_NAME_PL...
<vulnerable_code> renderer_process_terminated = pyqtSignal(TerminationStatus, int) predicted_navigation = pyqtSignal(QUrl) def __init__(self, *, win_id, mode_manager, private, parent=None): self.private = private self.win_id = win_id self._layout = miscwidgets.WrapperLayout(self) ...
<vulnerable_code>def _base_get_object(obj, key, default=UNSET): value = _base_get_item(obj, key, default=UNSET) if value is UNSET: value = default try: value = getattr(obj, key) return value def base_set(obj, key, value, allow_override=True): """ Set an object's `key` t...
<vulnerable_code> assert data == {} @parametrize( "case,expected", [<commit_title>[PATCH] fix: don't allow object paths that reference dunder-method<commit_description><fixed_code> assert data == {} @parametrize( "obj,path", [ (helpers.Object(), "__init__"), (helpers.Object(su...
<vulnerable_code>{ UINT32 SrcSize = length; rdpGdi* gdi = context->gdi; bitmap->compressed = FALSE; bitmap->format = gdi->dstFormat; bitmap->length = DstWidth * DstHeight * GetBytesPerPixel(bitmap->format); bitmap->data = (BYTE*) _aligned_malloc(bitmap->length, 16); if (!bitmap->data)<commit_title>[PATCH] Fixed...
<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> struct queue *req_queue; /* Queued ATT protocol requests */ struct queue *ind_queue; /* Queued ATT protocol indications */ struct queue *write_queue; /* Queue of PDUs ready to send */ bt_att_timeout_func_t timeout_callback; bt_att_destroy_func_t timeout_destroy; free(op); } static void cancel_a...
<vulnerable_code> }, formatResult: function(circle) { return circle.name; }, formatSelection: function(circle) { return circle.name; }, sortResults: function(results) {<commit_title>[PATCH] escape html<commit_description>Signed-off-by: Maxence Lange <maxence@artificial-owl.co...
<vulnerable_code> workItem->GetJITFunctionBody()->GetProfileInfo()->DisableSwitchOpt(); outputData->disableSwitchOpt = TRUE; } else { Assert(ex.Reason() == RejitReason::TrackIntOverflowDisabled);<commit_title>[PATCH] [CVE-2017-266] Prote...
<vulnerable_code> return doArrayLengthHoist; } bool GlobOpt::DoEliminateArrayAccessHelperCall() const {<commit_title>[PATCH] [CVE-2017-266] Protect store-element to a float typed array<commit_description><fixed_code> return doArrayLengthHoist; } bool GlobOpt::DoEliminateArrayAccessHelperCall(Func *const func) ...
<vulnerable_code> m_profileData.flags |= isLoopBody ? Flags_disableAggressiveIntTypeSpec_jitLoopBody : Flags_disableAggressiveIntTypeSpec; } void JITTimeProfileInfo::DisableStackArgOpt() {<commit_title>[PATCH] [CVE-2017-266] Protect store-element to a float typed array<commit_description><fixed_code> m_profileD...
<vulnerable_code> const IR::AutoReuseOpnd autoReuseReg(reg, m_func); InsertMove(reg, src, stElem); // Convert to float, and assign to indirOpnd if (baseValueType.IsLikelyOptimizedVirtualTypedArray()) { IR::RegOpnd* dstRe...
<vulnerable_code>} IR::RegOpnd * LowererMD::EmitLoadFloat(IR::Opnd *dst, IR::Opnd *src, IR::Instr *insertInstr) { IR::LabelInstr *labelDone; IR::Instr *instr; return nullptr; } IR::Opnd *memAddress = dst; if (dst->IsRegOpnd())<commit_title>[PATCH] [CVE-2017-266] Protect store-element to a...
<vulnerable_code> if (body->HasDynamicProfileInfo()) { if (jitWriteData.disableAggressiveIntTypeSpec) { body->GetAnyDynamicProfileInfo()->DisableAggressiveIntTypeSpec(workItem->Type() == JsLoopBodyWorkItemType);<commit_title>[PATCH] [CVE-2017-266] Protect store-element to a float typ...
<vulnerable_code> // Known to be non-integer. If we are required to bail out on helper call, just re-jit. if (!doFloatToIntFastPath && bailOutOnHelper) { if(!GlobOpt::DoAggressiveIntTypeSpec(this->m_func)) { // Aggressive int type specialization is already ...
<vulnerable_code>} IR::RegOpnd * LowererMD::EmitLoadFloat(IR::Opnd *dst, IR::Opnd *src, IR::Instr *insertInstr) { IR::LabelInstr *labelDone; IR::Instr *instr; return nullptr; } IR::Opnd *memAddress = dst; if (dst->IsRegOpnd()) { // Known to be non-integer. If we are require...
<vulnerable_code><commit_title>[PATCH] [CVE-2017-266] Protect store-element to a float typed array<commit_description><fixed_code> var evil_array = new Array(0x38/*dataview type id*/,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); g_lo = 0; g_hi = 0; var b = [1.1,2.2]; dv = new DataView(new ArrayBuffer(8)); var vt_to_chakrabas...
<vulnerable_code>from flask_security import login_required, current_user from pgadmin.misc.bgprocess.processes import BatchProcess, IProcessDesc from pgadmin.utils import PgAdminModule, get_storage_directory, html, \ fs_short_path, document_dir, does_utility_exist, get_server from pgadmin.utils.ajax import make_jso...
<vulnerable_code>from flask_security import login_required, current_user from pgadmin.misc.bgprocess.processes import BatchProcess, IProcessDesc from pgadmin.utils import PgAdminModule, get_storage_directory, html, \ fs_short_path, document_dir, IS_WIN, does_utility_exist from pgadmin.utils.ajax import make_json_re...
<vulnerable_code>from pgadmin.utils import PgAdminModule from pgadmin.utils.ajax import bad_request from pgadmin.utils.constants import MIMETYPE_APP_JS from pgadmin.utils.ajax import make_json_response, internal_server_error from pgadmin.model import ServerGroup, Server from pgadmin.utils import clear_database_servers,...
<vulnerable_code>from flask_security import login_required, current_user from pgadmin.misc.bgprocess.processes import BatchProcess, IProcessDesc from pgadmin.utils import PgAdminModule, get_storage_directory, html, \ fs_short_path, document_dir, does_utility_exist, get_server from pgadmin.utils.ajax import make_jso...
<vulnerable_code> return file def does_utility_exist(file): """ This function will check the utility file exists on given path. object_dict["Servers"] = server_dict # retrieve storage directory path storage_manager_path = None if not from_setup: storage_manager_path = get_stor...
<vulnerable_code>static MagickBooleanType WriteMSLImage(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { assert(image_info != (const ImageInfo *) NULL); assert(image_info->signature == MagickCoreSignature); assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); ...
<vulnerable_code># Import Python libs import logging import os # Import Salt libs import salt.utils def _default_logfile(exe_name): if salt.utils.is_windows(): logfile = salt.utils.path_join( os.environ['TMP'], '{0}.log'.format(exe_name) ) else: logfile = salt...
<vulnerable_code>package org.datatransferproject.spi.cloud.storage; import java.io.IOException; import java.io.InputStream; import java.io.File; import java.nio.file.Files; import java.nio.file.StandardCopyOption; import java.util.UUID;<commit_title>[PATCH] fix import order<commit_description><fixed_code> package org....
<vulnerable_code>/* * Copyright (C) 2014-2018 Yubico AB - See COPYING */ /* Define which PAM interfaces we provide */ #endif static void parse_cfg(int flags, int argc, const char **argv, cfg_t *cfg) { int i; memset(cfg, 0, sizeof(cfg_t)); cfg->debug_file = stderr; cfg->debug_file = (FILE *)-1; ...
<vulnerable_code>/* * Copyright (C) 2014-2018 Yubico AB - See COPYING */ #include "util.h" /* Ensure we never return uninitialized count. */ *n_devs = 0; fd = open(authfile, O_RDONLY, 0); if (fd < 0) { if (verbose) D(debug_file, "Cannot open file: %s (%s)", authfile, strerror(errno)); if (verb...
<vulnerable_code> return TRUE; } static gboolean option_own_name_cb (const gchar *option_name, const gchar *value, { "filesystem", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_filesystem_cb, N_("Expose filesystem to app (:ro for read-only)"), N_("FILESYSTEM[:ro]") }, { "nofilesyste...
<vulnerable_code> #ifdef __FreeBSD__ #include <sys/cdefs.h> __FBSDID("$FreeBSD: head/sys/netinet/sctp_auth.c 352438 2019-09-17 09:46:42Z tuexen $"); #endif #include <netinet/sctp_os.h> ptype = ntohs(phdr->param_type); plen = ntohs(phdr->param_length); if ((plen == 0) || (offset + plen > length)) break; if...
<vulnerable_code> #ifdef __FreeBSD__ #include <sys/cdefs.h> __FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 353477 2019-10-13 16:14:04Z markj $"); #endif #include <netinet/sctp_os.h> if (offset + plen > limit) { break; } if (plen == 0) { break; } #ifdef INET if (plen > sizeof(lstore)) { return (-2...
<vulnerable_code> const doc = YAML.parseDocument(src, { prettyErrors: true }) expect(doc.warnings).toMatchObject([{ name: 'YAMLWarning' }]) }) }) describe('tags on invalid nodes', () => {<commit_title>[PATCH] fix: Corner case failure in error pretty-printer<commit_description><fixed_code> const doc = YAML...
<vulnerable_code> var CSS_SEARCH_CHOSEN = A.getClassName('search', 'chosen'); var CSS_SELECT_BADGE_ITEM_CLOSE = A.getClassName('trigger', 'badge', 'item', 'close'); var CSS_SELECT_OPTION_ITEM = A.getClassName('select', 'option', 'item'); } }, getTemplateContext: function() { var instance ...
<vulnerable_code> (w->bbox.xMin + w->pos.x)); if (DIFF(l1_new, l2_new) < DIFF(l1, l2)) { w->linebreak = 1; s2->linebreak = 0; exit = 0; }<commit_title>[PATCH] Fix line wrapping mode 0/...
<vulnerable_code> } if (!migratedMetadata && !checkMetadataKeyChecksum(metadataKey, metadataKeyChecksum)) { _metadataKey.clear(); _files.clear(); return;<commit_title>[PATCH] display some logs when checksum verification is failed<commit_description>Signed-off-by: Matthieu Gallien <matthi...
<vulnerable_code> sdb_free(sdb_version); verneed_offset += verneed_entry.vn_next; } <commit_title>[PATCH] ELF: added vn_next break condition (#3214)<commit_description>if the dynamic section's verneednum mismatches the true number of entries then the for loop in get_gnu_verneed will continue to iterate on the las...
<vulnerable_code> } if (ci->cci > CINFO_NONE) { ci = cipop(mrb); mrb_gc_arena_restore(mrb, ai); mrb->c->vmexec = FALSE; mrb->exc = (struct RObject*)break_new(mrb, RBREAK_TAG_BREAK, proc, v); mrb->jmp = prev_jmp; MRB_THROW(prev_jm...
<vulnerable_code> } // slashes and backslashes have lost all meaning for the web protocols (https, http, wss, ws) string = string.replace(/^(https?|ftp|wss?)?:[/\\]*/, '$1://'); // extract protocol if (string.substring(0, 2) === '//') {<commit_title>[PATCH] fix(parse): case insensitive scheme - #41...
<vulnerable_code>"%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decod...
<vulnerable_code> idn: false, punycode: false } }, { name: 'no slash protocol ftp', url: 'ftp:attacker.com',<commit_title>[PATCH] fix(parse): case insensitive scheme - #412<commit_description><fixed_code> idn: false, punycode: false } }, { name: 'exce...
<vulnerable_code> if (!(the->collectFlag & XS_SKIPPED_COLLECT_FLAG)) { txSize modulo = theSize % the->minimumChunksSize; if (modulo) fxAddChunkSizes(the, theSize, the->minimumChunksSize - modulo); } theSize = fxAddChunkSizes(the, theSize, sizeof(txBlock)); aData = fxAllocateChunks(the, theSize);<commit_title>...
<vulnerable_code> (long)(the->peakHeapCount * sizeof(txSlot)), the->collectFlag & XS_TRASHING_FLAG); #endif #ifdef mxInstrument the->garbageCollectionCount++; #endif #ifdef mxProfile<commit_title>[PATCH 1/4] XS: fxGrowChunks() should respect the->minimumChunksSize<commit_description>refs https://github.com/Moddable...
<vulnerable_code> address = &slot->next; } } return 1; } } txSlot* first; txSlot* last; txSlot* slot; while ((entry = *address)) { if (entry->value.entry.sum == sum) { first = entry->value.entry.slot; return; } } address = &entry->next; } first = fxNewSlot(the); first->kind...
<vulnerable_code> } } #ifdef __XSNAP__ the->mapSetRemoveCount += 1; #endif return 1; } txSlot* last; txSlot* slot; #ifdef __XSNAP__ txUnsigned qty = 0; #endif while ((entry = *address)) { if (entry->value.entry.sum == sum) { } } #ifdef __XSNAP__ ...
<vulnerable_code> } if (total_data[0] == 'users') { document.getElementById("staff").innerHTML = total_data[0] + " " + total_data[1] + " " + total_data[2] + " " + total_data[3]; document.getElementById("staff").setAttribute("class", rollover_class); document.getElementById("staff").setAt...
<vulnerable_code> } } function hide_filter_modal() { window.$('#modal_filter_edit').modal('toggle'); window.$('#'+modal_ID).modal('toggle'); } }<commit_title>[PATCH] Commit with security and bug fixes<commit_description><fixed_code> } } function hide_filter_modal() { window.$('#modal_filte...
<vulnerable_code>function formcheck_school_setup_school(this_DET) { var this_button_id = this_DET.id; var frmvalidator = new Validator("school", this_button_id); frmvalidator.addValidation("values[TITLE]", "req", "Please enter the title"); frmvalidator.addValidation( return true; } function validate_block_...
<vulnerable_code> if(typeof submitBtn !== 'undefined' && submitBtn != '') { document.getElementById(submitBtn).disabled = true; } return true;<commit_title>[PATCH] Commit with security and bug fixes<commit_description><fixed_code> if(typeof submitBtn !== 'undefined' && submitBtn != ''...
<vulnerable_code><commit_title>[PATCH] Commit with security and bug fixes<commit_description><fixed_code> function toggleWriteability(id_of_patient, checked) { document.getElementById(id_of_patient).disabled = checked; } // vim: et sw=4 sts=4
<vulnerable_code> kref_get(&reservations->refs); } static void hugetlb_vm_op_close(struct vm_area_struct *vma) { struct hstate *h = hstate_vma(vma); reserve = (end - start) - region_count(&reservations->regions, start, end); kref_put(&reservations->refs, resv_map_release); if (reserve) { hugetlb_acct_m...
<vulnerable_code> return value === '?' ? CONF.default_theme : value; }; exports.set = function(obj, path, value) { var cachekey = 'S+' + path; if (F.temporary.other[cachekey]) return F.temporary.other[cachekey](obj, value); var arr = parsepath(path); var builder = []; var ispush = v.lastIndexOf('[]') !== -1;...
<vulnerable_code> WRITE_ERROR, std::make_unique<SSLException>(SSLError::INVALID_RENEGOTIATION)); } else { if (zero_return(error, rc, errno)) { return WriteResult(0); } auto errError = ERR_get_error(); VLOG(3) << "ERROR: AsyncSSLSocket(fd=" << fd_ << ", state=" << int(state_) ...
<vulnerable_code> cerr << "SSLClientTimeoutTest test completed" << endl; } /** * Verify Client Ciphers obtained using SSL MSG Callback. */<commit_title>[PATCH] Handle close_notify as standard writeErr in AsyncSSLSocket.<commit_description>Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: ...
<vulnerable_code> ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); for (i=0; i < (ssize_t) length; i++) chunk[i]=(unsigned char) ReadBlobByte(image); p=chunk; } ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); for ...
<vulnerable_code> ccline.cmdindent = (firstc > 0 ? indent : 0); // alloc initial ccline.cmdbuff alloc_cmdbuff(exmode_active ? 250 : indent + 1); if (ccline.cmdbuff == NULL) return FAIL; ccline.cmdlen = ccline.cmdpos = 0;<commit_title>[PATCH] patch 8.2.4214: illegal memory access with large 'tabstop...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 4213, /**/<commit_title>[PATCH] patch 8.2.4214: illegal memory access with large 'tabstop' in<commit_description><fixed_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ ...
<vulnerable_code> EventProcessor = Callable[[Event, Hint], Optional[Event]] ErrorProcessor = Callable[[Event, ExcInfo], Optional[Event]] BreadcrumbProcessor = Callable[[Breadcrumb, BreadcrumbHint], Optional[Breadcrumb]] TracesSampler = Callable[[SamplingContext], Union[float, int, bool]] <commit_title>[...
<vulnerable_code> ) event = new_event # type: ignore return event def _is_ignored_error(self, event, hint):<commit_title>[PATCH] Add `before_send_transaction` (#1840)<commit_description>* Added before_send_transaction Co-authored-by: Neel Shah <neel.shah@sentry.io><fixed_c...
<vulnerable_code> Event, EventProcessor, TracesSampler, ) # Experiments are feature flags to enable and disable certain unstable SDK _experiments={}, # type: Experiments # noqa: B006 proxy_headers=None, # type: Optional[Dict[str, str]] instrumenter=INSTRUMENTER...
<vulnerable_code> assert Hub.current.last_event_id() == event_id def test_option_callback(sentry_init, capture_events, monkeypatch): drop_events = False drop_breadcrumbs = False reports = []<commit_title>[PATCH] Add `before_send_transaction` (#1840)<commit_description>* Added before_send_transaction C...
<vulnerable_code> if (tmp.size() > maxConnections) { logger.trace("We are at over limit, unable to purge enough old connections, closing this connection"); conn.close(); } else if (tmp.size() == maxConnections) { logger.trace("We are exactly at maximum connect...
<vulnerable_code> setState(CloseableObjectState.Opening); s.getStateMonitor().addStateListener(socketListener); s.getInputStream().createMonitor(8, inputListener); if(rh == null) { timeoutTimer = TimerUtil.schedule( timer, timeout, StackUtils.getBlockingWorkExecutor(), Sy...
<vulnerable_code> ret = -EINVAL; if (!vma_can_userfault(cur)) goto out_unlock; /* * If this vma contains ending address, and huge pages * check alignment. BUG_ON(!vma_can_userfault(vma)); BUG_ON(vma->vm_userfaultfd_ctx.ctx && vma->vm_userfaultfd_ctx.ctx != ctx); /* * Nothing to do: this...
<vulnerable_code> if (!dst_vma || !is_vm_hugetlb_page(dst_vma)) goto out_unlock; /* * Only allow __mcopy_atomic_hugetlb on userfaultfd * registered ranges. */ if (!dst_vma->vm_userfaultfd_ctx.ctx) goto out_unlock; if (!dst_vma) goto out_unlock; /* * Be strict and only allow __mcopy_atomic on u...
<vulnerable_code>__license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' import cPickle from PyQt5.Qt import ( Qt, QListWidget, QListWidgetItem, QItemSelectionModel, QAction, self.edited.emit(bm) def bm_to_item(self, bm): return bytearray(cPickle.dumps(bm, -1)) ...
<vulnerable_code>from calibre.srv.routes import endpoint, json from calibre.srv.utils import get_library_data, get_use_roman from calibre.utils.config import prefs, tweaks from calibre.utils.icu import sort_key from calibre.utils.localization import get_lang from calibre.utils.search_query_parser import ParseException ...
<vulnerable_code> // -> Check for page access if (!WIKI.auth.checkAccess(opts.user, ['write:pages'], { locale: opts.locale, path: opts.path })) { throw new WIKI.Error.PageUpdateForbidden() } // -> Perform move? if ((opts.locale && opts.locale !== page.localeCode) || (opts.path...
<vulnerable_code> # to be sent. basehost = options.get("system.base-hostname") if basehost and origin: if origin.endswith(basehost): response["Access-Control-Allow-Credentials"] = "true" return response<commit_title>[PATCH] fix GHSA-4xqm-4p72-87h6<commit_descr...
<vulnerable_code> org = self.create_organization() apikey = ApiKey.objects.create(organization_id=org.id, allowed_origins="*") request = self.make_request(method="GET") request.META["HTTP_ORIGIN"] = "http://acme.example.com" request.META["HTTP_AUTHORIZATION"] = b"Basic " + base64...
<vulnerable_code> * GPAC - Multimedia Framework C SDK * * Authors: Jean Le Feuvre * Copyright (c) Telecom ParisTech 2005-2022 * All rights reserved * * This file is part of GPAC / LASeR codec sub-project } else { da->type=SVG_STROKEDASHARRAY_ARRAY; da->array.count = lsr_read_vluimsbf5(lsr, "...