Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
79
3.72M
<vulnerable_code>import ch.digitalfondue.basicxlsx.StreamingWorkbook; import ch.digitalfondue.basicxlsx.Style; import com.opencsv.CSVWriter; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; } } public static void exportCsv(String fileName, String[] header, Strea...
<vulnerable_code>import numpy as np from tensorflow.python.framework import constant_op from tensorflow.python.ops import array_ops from tensorflow.python.platform import test padding=padding, patches=patches) if __name__ == "__main__": test.main()<commit_title>[PATCH] Fix pywrap attribut...
<vulnerable_code> RETRY_AFTER_STATUS_CODES = frozenset([413, 429, 503]) #: Default headers to be used for ``remove_headers_on_redirect`` DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset(["Authorization"]) #: Default maximum backoff time. DEFAULT_BACKOFF_MAX = 120<commit_title>[PATCH] Merge pull reque...
<vulnerable_code> def test_retry_default_remove_headers_on_redirect(self) -> None: retry = Retry() assert list(retry.remove_headers_on_redirect) == ["authorization"] def test_retry_set_remove_headers_on_redirect(self) -> None: retry = Retry(remove_headers_on_redirect=["X-API-Secret"]) ...
<vulnerable_code> "GET", f"{self.base_url}/redirect", fields={"target": f"{self.base_url_alt}/headers"}, headers={"Authorization": "foo"}, ) assert r.status == 200 data = r.json() assert "Authorization" not ...
<vulnerable_code>BRACELESS_IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT[2:-2] + "$") ZONE_ID_RE = re.compile("(" + ZONE_ID_PAT + r")\]$") SUBAUTHORITY_PAT = (u"^(?:(.*)@)?(%s|%s|%s)(?::([0-9]{0,5}))?$") % ( REG_NAME_PAT, IPV4_PAT, IPV6_ADDRZ_PAT, ) SUBAUTHORITY_RE = re.compile(SUBAUTHORITY_PAT, re.UNICO...
<vulnerable_code> fragment="hash", ), ), ] @pytest.mark.parametrize("url, expected_url", url_vulnerabilities)<commit_title>[PATCH] Improve performance of sub-authority splitting in URL<commit_description><fixed_code> fragment="hash", ), ), ...
<vulnerable_code> encoding, # https://github.com/python/mypy/issues/4374 map_dict, # type: ignore ) _predefined_cmap: Dict[str, str] = {<commit_title>[PATCH] fix early mypy<commit_description><fixed_code> encoding, # https://github.com/python/mypy/issues/4374 map_di...
<vulnerable_code> with self.assertRaises((ValueError, errors_impl.InvalidArgumentError)): self.evaluate(linalg_ops.matrix_solve(matrix, rhs)) def testNotInvertible(self): # The input should be invertible. with self.assertRaisesOpError("Input matrix is not invertible."):<commit_title>[PATCH] Fix cras...
<vulnerable_code> assert(s); assert_cc(sizeof(uid_t) == sizeof(uint32_t)); r = safe_atou32(s, &uid); if (r < 0) return r; <commit_title>[PATCH] basic/user-util: always use base 10 for user/group numbers<commit_description>We would parse numbers with base prefixes as user ...
<vulnerable_code> return -errno; } CMSG_FOREACH(cmsg, &msghdr) { if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {<commit_title>[PATCH] If the notification message length is 0, ignore the message<commit_description><fixed_code> retur...
<vulnerable_code> req_set_fail(req); io_req_set_res(req, ret, 0); /* put file to avoid an attempt to IOPOLL the req */ io_put_file(req->file); req->file = NULL; return IOU_OK; }<commit_title>[PATCH] io_uring/msg_ring: check file type before putting<commit_description>If we're invoked with a fixed file, follow the...
<vulnerable_code> SECURITY_STATUS ntlm_read_AuthenticateMessage(NTLM_CONTEXT* context, PSecBuffer buffer) { wStream* s; size_t length; UINT32 flags; NTLM_AV_PAIR* AvFlags; UINT32 PayloadBufferOffset; NTLM_AUTHENTICATE_MESSAGE* message; SSPI_CREDENTIALS* credentials = context->credentials; flags = 0; AvFlags = ...
<vulnerable_code>import { Template } from 'meteor/templating'; import { Blaze } from 'meteor/blaze'; const renderers = {}; /** html = Blaze.toHTMLWithData(Template[renderers[field.type]], { field, message }); } else { // consider the value already formatted as html html = field.value; } return `<div cl...
<vulnerable_code> if (verify_pin && rv == SC_ERROR_SECURITY_STATUS_NOT_SATISFIED) { struct sc_pkcs15_object *objs[0x10], *pin_obj = NULL; const struct sc_acl_entry *acl = sc_file_get_acl_entry(file, SC_AC_OP_READ); int ii; if (acl == NULL) { sc_file_free(file); LOG_FUNC_RETURN(ctx, SC_ERROR_INVALID_DAT...
<vulnerable_code> case NOT_READY_ERROR : return "handshake layer not ready yet, complete first"; case PMS_VERSION_ERROR : return "premaster secret version mismatch error"; case VERSION_ERROR : return "record layer version error"; #ifndef NO_RSA case rsa_...
<vulnerable_code> dev->interrupt_in_interval = interrupt_in_interval ? interrupt_in_interval : dev->interrupt_in_endpoint->bInterval; dev->interrupt_out_interval = interrupt_out_interval ? interrupt_out_interval : dev->interrupt_out_endpoint->bInterval; /* we can register the device now, as it is ready */ usb_set_i...
<vulnerable_code> while (count > 0) { // Each 13 bits encodes a 2-byte character int twoBytes = bits.readBits(13, err_handler); if (err_handler.ErrCode()) return; int assembledTwoBytes = ((twoBytes / 0x060) << 8) | (twoBytes % 0x060); if (assembledTwoBytes < 0x003BF) { ...
<vulnerable_code> if (channel->dvc_data) { /* Fragmented data */ if (Stream_GetPosition(channel->dvc_data) + dataSize > (UINT32) Stream_Capacity( channel->dvc_data)) { WLog_Print(drdynvc->log, WLOG_ERROR, "data exceeding declared length!"); Stream_Release(channel->dvc_data); return ERROR_INVAL...
<vulnerable_code> #define WINSIZE 4 #define M_POINTS 8 int first = 1, bitbuf = 0, bitcpy = 0, j; #else #define M_POINTS 4 #endif ecc_point *tG, *M[M_POINTS]; #ifdef WC_NO_CACHE_RESISTANT if (err == MP_OKAY) err = wc_ecc_copy_point(M[0], M[2]); #endif /* setup sliding window *...
<vulnerable_code> return (n >= a->used || n < 0) ? 0 : a->dp[n]; } #ifndef WC_NO_RNG int get_rand_digit(WC_RNG* rng, mp_digit* d) { return err; } #endif /* HAVE_WOLF_BIGINT */ #endif /* USE_FAST_MATH || !NO_BIG_INT */<commit_title>[PATCH] Change constant time and cache resistant ECC mulmod<commit_description...
<vulnerable_code>import org.gradle.internal.UncheckedException; import org.gradle.internal.operations.BuildOperationRef; import org.gradle.internal.operations.CurrentBuildOperationRef; import org.sonatype.aether.RepositoryException; import org.sonatype.aether.RepositorySystem; import org.sonatype.aether.RepositorySyste...
<vulnerable_code> return Lists.newArrayList(); } protected String escape(String string) { String escaped = JavaEscape.escapeJava(string); // escape $ character since it has special meaning in groovy string escaped = escaped.replace("$", "\\$");<commit_title>[PATCH] Escape pattern field of build job param to p...
<vulnerable_code> public static String getPropertyDef(InputSpec inputSpec, Map<String, Integer> indexes, String pattern, DefaultValueProvider defaultValueProvider) { int index = indexes.get(inputSpec.getName()); StringBuffer buffer = new StringBuffer(); inputSpec.appendField(buffer, index, "String"); if (p...
<vulnerable_code> @org.junit.Test public void test() { } }<commit_title>[PATCH] Escape pattern field of build job param to prevent security<commit_description><fixed_code> @org.junit.Test public void test() { } }
<vulnerable_code>#include "image_int.hpp" #include "basicio.hpp" #include "error.hpp" #include "futils.hpp" #include "types.hpp" } ++iccOffset; // +1 = 'compressed' flag zlibToDataBuf(cdataBuf.pData_ +iccOffset,dataOffset-iccOffset,iccProfile_); #ifdef DEBU...
<vulnerable_code><commit_title>[PATCH] Avoid negative integer overflow when `iccOffset ><commit_description><fixed_code> import system_tests class IntegerOverflowInPngImageReadMetadata( metaclass=system_tests.CaseMeta): """ Regression test for the bug described in: https://github.com/Exiv2/exiv2/i...
<vulnerable_code><commit_title>[PATCH] test for #1711<commit_description><fixed_code> from helper import unittest, PillowTestCase, hopper from PIL import Image class TestImagingCoreResize(PillowTestCase): #see https://github.com/python-pillow/Pillow/issues/1710 def test_overflow(self): im = hopper('L')...
<vulnerable_code>import org.xwiki.edit.EditorManager; import org.xwiki.rendering.syntax.Syntax; import org.xwiki.rendering.syntax.SyntaxContent; import org.xwiki.stability.Unstable; import com.xpn.xwiki.XWikiContext; import com.xpn.xwiki.doc.XWikiDocument; public class TextAreaClass extends StringClass { /** ...
<vulnerable_code><commit_title>[PATCH] XWIKI-20847/XWIKI-20848: Improve Velocity execution in<commit_description><fixed_code> /* * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * This is free software; you can redistribute it and/or modify it * under t...
<vulnerable_code> else: assert True if __name__ == '__main__': # Run isolated<commit_title>[PATCH] Issue 4480 - Unexpected info returned to ldap request (#4491)<commit_description>Bug description: If the bind entry does not exist, the bind result info reports that 'No such entry'. It s...
<vulnerable_code> if (attrs) { for (size_t i = 0; attrs[i]; i++) { if (ldbm_config_moved_attr(attrs[i])) { slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, "at least one required attribute has been moved to the BDB scecific configuration entry"); ...
<vulnerable_code> if (text) { pbtext = text; } else { slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &pbtext); } if (operation == NULL) {<commit_title>[PATCH] Issue 4480 - Unexpected info returned to ldap request (#4491)<commit_description>Bug description: If the bind entry does not exist, ...
<vulnerable_code> import com.google.common.base.CaseFormat; import com.google.common.collect.ImmutableSet; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; o instanceof Thread || o instanceof Method || o instanceof Field || o instanceof Const...
<vulnerable_code>import org.openmrs.annotation.Handler; import org.openmrs.module.appointmentscheduling.AppointmentType; import org.openmrs.module.appointmentscheduling.api.AppointmentService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; i...
<vulnerable_code> Mockito.verify(errors).rejectValue("name", "appointmentscheduling.AppointmentType.longName.errorMessage"); } @Test public void mustRejectAppointmentTypeDescriptionWithMoreThan1024Characters() throws Exception { String longDescription = StringUtils.repeat("*", 1025);<commit_title>[PATCH] RA-...
<vulnerable_code> return TRUE; } if (ml_open(curbuf) == OK && readfile(buf->b_ffname, buf->b_fname, (linenr_T)0, (linenr_T)0, (linenr_T)MAXLNUM, if (curbuf != newbuf) // safety check wipe_buffer(newbuf, FALSE); return differ; } <commit_title>[PATCH] patch 9.0.2010: [security] use-after-fre...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 2009, /**/<commit_title>[PATCH] patch 9.0.2010: [security] use-after-free from<commit_description><fixed_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 2010, /**/ ...
<vulnerable_code> skb_queue_walk(queue, skb) { *peeked = skb->peeked; if (flags & MSG_PEEK) { if (*off >= skb->len) { *off -= skb->len; continue; }<commit_title>[PATCH] net: fix infinite loop in __skb_recv_datagram()<commit_description>Tommi was fuzzing with trinity and reported the following p...
<vulnerable_code> { char *rootdir = get_rootdir(pid); dd_create_basic_files(dd, fsuid, (rootdir && strcmp(rootdir, "/") != 0) ? rootdir : NULL); char source_filename[sizeof("/proc/%lu/somewhat_long_name") + sizeof(long)*3]; int source_base_ofs = sprintf(source_filename, "/proc/%lu/s...
<vulnerable_code> return SASL_NOMEM; strncpy(*out + *outlen, add, addlen); *outlen += addlen; return SASL_OK; }<commit_title>[PATCH] Fix _sasl_add_string<commit_description>Issue #587 was not solved correct. _sasl_add_string adds zero terminator to the output string. This cuts log messages after the first '...
<vulnerable_code> } else { temp = b64ToByte(temp); while ((temp.length() % 8) != 0) temp.append('\0'); } if (!cipher.ok()) return cipherText; if (direction) temp2 = byteToB64(temp2); return temp2; }<commit_title>[PATCH] Check for invalid input in encrypted bu...
<vulnerable_code> /* first iteration of input using strtok */ network = strtok_r(cidrin, delim, &token); *cidrdata = cidr2cidr(network); cidr_ptr = *cidrdata; /* ipv4 mode */ memset(newmap, '\0', NEWMAP_LEN); map = strtok_r(string, ":", &token); strlcpy(newmap, "0.0.0.0...
<vulnerable_code> second = NULL; /* regex test */ if (regexec(&preg, this, 0, NULL, 0) != 0) { warnx("Unable to parse: %s", this); regfree(&preg); return 0;<commit_title>[PATCH 1/3] Add check after call strtok_r<commit_description><fixed_code> second = NULL; /* regex test */...
<vulnerable_code> memset(&tempmac[0], 0, sizeof(tempmac)); tempstr = strtok_r(ourstring, ",", &tok); if (strlen(tempstr)) { mac2hex(tempstr, tempmac, len); if (memcmp(mac, tempmac, len) == 0) { dbgx(3, "Packet matches: " MAC_FORMAT " sending out primary.\n", MAC_STR(tempmac));<c...
<vulnerable_code> /* get the first byte */ l2byte = strtok_r(string, ",", &token); sscanf(l2byte, "%x", &value); if (value > 0xff) errx(-1, "Invalid hex string byte: %s", l2byte);<commit_title>[PATCH 1/3] Add check after call strtok_r<commit_description><fixed_code> /* get the first byte */...
<vulnerable_code> /* first iteration of input */ substr = strtok_r(ourstrcpy, ",", &token); if ((*portmap = ports2PORT(substr)) == NULL) { safe_free(ourstrcpy); return 0; }<commit_title>[PATCH 1/3] Add check after call strtok_r<commit_description><fixed_code> /* first iteration of in...
<vulnerable_code> tempstr = strtok_r(ourstring, ",", &tok); if (tempstr != NULL && strlen(tempstr)) { mac2hex(tempstr, tempmac, len); if (memcmp(mac, tempmac, len) == 0) { dbgx(3, "Packet matches: " MAC_FORMAT " sending out primary.\n", MAC_STR(tempmac)); ret = TCPR_DIR_C2S; ...
<vulnerable_code> skb_frag_t *frag = skb_shinfo(head_skb)->frags; unsigned int mss = skb_shinfo(head_skb)->gso_size; unsigned int doffset = head_skb->data - skb_mac_header(head_skb); unsigned int offset = doffset; unsigned int tnl_hlen = skb_tnl_header_len(head_skb); unsigned int headroom; i = 0; nfrags = sk...
<vulnerable_code> void ModuleSQL::init() { Dispatcher = new DispatcherThread(this); ServerInstance->Threads.Start(Dispatcher); } Dispatcher->OnNotify(); delete Dispatcher; } for(ConnMap::iterator i = connections.begin(); i != connections.end(); i++) { delete i->second; } } void ModuleSQL::ReadConfig(Config...
<vulnerable_code> return -EINVAL; } cliprects = kmalloc(args->num_cliprects * sizeof(*cliprects), GFP_KERNEL); if (cliprects == NULL) {<commit_title>[PATCH] drm/i915: fix integer overflow in i915_gem_do_execbuffer()<commit_description>On 32-bit systems, a large args->num_cliprects from userspace via io...
<vulnerable_code>{ uint8_t label; read(gif->fd, &label, 1); switch (label) { case 0x01: read_plain_text_ext(gif); if (sep == '!') read_ext(gif); else return -1; read(gif->fd, &sep, 1); } if (read_image(gif) == -1) return -1;<commit_title>[PATC...
<vulnerable_code> const char *buf, size_t count) { struct platform_device *pdev = to_platform_device(dev); char *driver_override, *old = pdev->driver_override, *cp; if (count > PATH_MAX) return -EINVAL; if (cp) *cp = '\0'; if (strlen(driver_override)) { pdev->driver_override = driver_override; } e...
<vulnerable_code> buffer_caret = 0; while( bitmap_caret < image_block_size ) { if ((decompression_buffer[buffer_caret] & TGA_RLE_FLAG) == TGA_RLE_FLAG) { encoded_pixels = ( ( decompression_buffer[ buffer_caret ] & 127 ) + 1 ); buffer_caret++; for (i = 0; i < encoded_pixels; i++) { for (j = 0; ...
<vulnerable_code> g_variant_get(parameters, "(&s&s&s)", &problem_id, &element, &value); if (element == NULL || element[0] == '\0' || strlen(element) > 64) { log_notice("'%s' is not a valid element name of '%s'", element, problem_id); char *error = xasprintf(_("'%s' is no...
<vulnerable_code>int64_t MemFile::readImpl(char *buffer, int64_t length) { assertx(m_len != -1); assertx(length > 0); int64_t remaining = m_len - m_cursor; if (remaining < length) length = remaining; if (length > 0) { memcpy(buffer, (const void *)(m_data + m_cursor), length); } m_cursor += length; r...
<vulnerable_code> /* Allocate enough memory so that even if each character is quoted, we won't run out of room */ String ret(4 * str.size() + 1, ReserveString); char* out_str = ret.mutableData(); <commit_title>[PATCH] security fixes<commit_description>https://hhvm.com/blog/2021/02/25/security-update.html<fix...
<vulnerable_code> if (c == 0xFF) return 0; marker = c; length = php_jpg_get16(data+pos); if (length > ImageInfo->Thumbnail.size || pos >= ImageInfo->Thumbnail.size - length) { return 0;<commit_title>[PATCH] security fixes<commit_description>https://hhvm.com/blog/2021/02/25/security-update.htm...
<vulnerable_code> if (mme.second.m_return_value != fr) all_same = false; count += mme.second.m_count; auto ser_len = mme.second.m_return_value.length(); min_ser_len = std::min(min_ser_len, ser_len); max_ser_len = std::max(max_ser_len, ser_len); if (mme.second.m...
<vulnerable_code> int key_size; if (key.size() > max_key_size) { raise_warning("Key size too large; supplied length: %d, max: %d", key.size(), max_key_size); key_size = max_key_size; } else { memcpy(key_s, key.data(), key.size()); if (iv.size() != iv_size) { raise_warning("Iv ...
<vulnerable_code> } if (piv.size() < iv_required_len) { raise_warning("IV passed is only %d bytes long, cipher " "expects an IV of precisely %d bytes, padding with \\0", piv.size(), iv_required_len); memcpy(iv_new, piv.data(), piv.size()); return true; } raise_wa...
<vulnerable_code> sa->sun_family = AF_UNIX; if (addr.length() > sizeof(sa->sun_path)) { raise_warning( "Unix socket path length (%d) is larger than system limit (%lu)", addr.length(), sizeof(sa->sun_path) );<commit_title>[PATCH] security fixes<commit_description>...
<vulnerable_code> CHECK_HANDLE(handle, f); int64_t ret = f->write(data, length); if (ret < 0) { raise_notice("fwrite(): send of %d bytes failed with errno=%d %s", data.size(), errno, folly::errnoStr(errno).c_str()); ret = 0; }<commit_title>[PATCH] security fixes<commit_description>https:...
<vulnerable_code> lazyClassToStringHelper(value.toLazyClassVal()); auto const size = str->size(); if (size >= RuntimeOption::MaxSerializedStringSize) { throw Exception("Size of serialized string (%d) exceeds max", size); } StringBuffer sb; sb.append("s:");<commit_title>[PATC...
<vulnerable_code> return make_tv<KindOfBoolean>(false); } int cmp_len = s1_len - offset; if (cmp_len < s2_len) cmp_len = s2_len; if (cmp_len > length) cmp_len = length; const char *s1 = main_str.data(); if (case_insensitivity) { return tvReturn(bstrcasecmp(s1 + offset, cmp_len, str.data(), cmp_len)...
<vulnerable_code> assertx(isStringType(type(file_name))); strncpy(frame->file_name, val(file_name).pstr->data(), std::min(val(file_name).pstr->size(), strobelight::kFileNameMax)); frame->file_name[strobelight::kFileNameMax - 1] = '\0'; } assertx(isSt...
<vulnerable_code> * Add the terminating null here since it wasn't added incrementally above * once the whole string has been composed. */ result[outpos] = NUL; *outbuf = result; return outpos; } /*<commit_title>[PATCH] security fixes<commit_description>https://hhvm.com/blog/2021/02/25/security-update.htm...
<vulnerable_code> memset(&paddedSalt[1], '$', maxSaltLength - 1); memcpy(paddedSalt, salt, std::min(maxSaltLength, saltLen)); paddedSalt[saltLen] = '\0'; if (php_crypt_blowfish_rn(key, paddedSalt, output, sizeof(output))) { return strdup(output);<commit_title>[PATCH] security fixes<commit_descrip...
<vulnerable_code> */ private String getTableName(String str) { String[] arr = str.split("\\s+(?i)where\\s+"); String tableName = arr[0]; //【20230814】解决使用参数tableName=sys_user t&复测,漏洞仍然存在 if (tableName.contains(" ")) { tableName = tableName.substring(0, tableName.indexO...
<vulnerable_code>_logger = logging.getLogger(pathlib.Path(__file__).name) def configure() -> None: global DEMO_UUID_BASE if os.getenv("DEMO_UUID_REQUESTING_NONRANDOM") == "NONRANDOM_REQUESTED": warnings.warn( "Environment variable DEMO_UUID_REQUESTING_NONRANDOM is deprecated. See case_ut...
<vulnerable_code> DEFAULT_PREFIX = "http://example.org/kb/" # Shortcut syntax for defining an immutable named tuple is noted here: # https://docs.python.org/3/library/typing.html#typing.NamedTuple # via the "See also" box here: https://docs.python.org/3/library/collections.html#collections.namedtuple<commit_title>[PAT...
<vulnerable_code> construct_query_result = in_graph.query(construct_query_object) _logger.debug("type(construct_query_result) = %r." % type(construct_query_result)) _logger.debug("len(construct_query_result) = %d." % len(construct_query_result)) for (row_no, row) in enumerate(construct_query_result): ...
<vulnerable_code> select_query_object = rdflib.plugins.sparql.prepareQuery( select_query_text, initNs=nsdict ) for (row_no, row) in enumerate(graph.query(select_query_object)): tally = row_no + 1 record = [] for (column_no, column) in enumerate(row): if column is N...
<vulnerable_code># # We would appreciate acknowledgement if the software is used. __version__ = "0.5.0" from . import local_uuid<commit_title>[PATCH 01/23] Backport<commit_description>References: https://github.com/Cyber-Domain-Ontology/CDO-Utility-Local-UUID/pull/3 Signed-off-by: Alex Nelson <alexander.nelson@nist.g...
<vulnerable_code>This library is a wrapper for uuid, provided to generate repeatable UUIDs if requested. """ __version__ = "0.3.0" import logging import os<commit_title>[PATCH 01/23] Backport<commit_description>References: https://github.com/Cyber-Domain-Ontology/CDO-Utility-Local-UUID/pull/3 Signed-off-by: Alex Nels...
<vulnerable_code># # We would appreciate acknowledgement if the software is used. __version__ = "0.5.1" from . import local_uuid<commit_title>[PATCH 01/23] Backport<commit_description>References: https://github.com/Cyber-Domain-Ontology/CDO-Utility-Local-UUID/pull/3 Signed-off-by: Alex Nelson <alexander.nelson@nist.g...
<vulnerable_code># # We would appreciate acknowledgement if the software is used. __version__ = "0.6.0" from . import local_uuid # noqa: F401<commit_title>[PATCH 01/23] Backport<commit_description>References: https://github.com/Cyber-Domain-Ontology/CDO-Utility-Local-UUID/pull/3 Signed-off-by: Alex Nelson <alexander...
<vulnerable_code># # We would appreciate acknowledgement if the software is used. __version__ = "0.7.0" from . import local_uuid # noqa: F401<commit_title>[PATCH 01/23] Backport<commit_description>References: https://github.com/Cyber-Domain-Ontology/CDO-Utility-Local-UUID/pull/3 Signed-off-by: Alex Nelson <alexander...
<vulnerable_code> def concept_is_cdo_concept(n_concept: rdflib.URIRef) -> bool: """ This function is purposefully distinct from the function used in case_validate. Within this script, the publishing history of CASE and UCO is reviewed.""" concept_iri = str(n_concept) return ( concept_iri.starts...
<vulnerable_code># # We would appreciate acknowledgement if the software is used. __version__ = "0.8.0" from . import local_uuid # noqa: F401<commit_title>[PATCH 01/23] Backport<commit_description>References: https://github.com/Cyber-Domain-Ontology/CDO-Utility-Local-UUID/pull/3 Signed-off-by: Alex Nelson <alexander...
<vulnerable_code> select_query_object = rdflib.plugins.sparql.processor.prepareQuery( select_query_text, initNs=nsdict ) for (row_no, row) in enumerate(_graph.query(select_query_object)): tally = row_no + 1 record = [] for (column_no, column) in enumerate(row): if ...
<vulnerable_code>) def make_data_frame_to_json_table_text_parameters() -> typing.Iterator[ typing.Tuple[str, str, bool, bool] ]: for use_header in [False, True]: for use_index in [False, True]: for output_mode in ["csv", "html", "json", "md", "tsv"]:<commit_title>[PATCH 01/23] Backport<com...
<vulnerable_code># # We would appreciate acknowledgement if the software is used. __version__ = "0.9.0" from . import local_uuid # noqa: F401<commit_title>[PATCH 01/23] Backport<commit_description>References: https://github.com/Cyber-Domain-Ontology/CDO-Utility-Local-UUID/pull/3 Signed-off-by: Alex Nelson <alexander...
<vulnerable_code># # We would appreciate acknowledgement if the software is used. __version__ = "0.10.0" from . import local_uuid # noqa: F401<commit_title>[PATCH 01/23] Backport<commit_description>References: https://github.com/Cyber-Domain-Ontology/CDO-Utility-Local-UUID/pull/3 Signed-off-by: Alex Nelson <alexande...
<vulnerable_code> if kwargs.get('vpn_id'): vpn = self.vpns[kwargs['vpn_id']] self._socket_connect(vpn) if vpn['socket_connected']: release = self.send_command('version\n') version = semver(self.parse_version(release).split(' ')[1]) ...
<vulnerable_code> goto error; } if (coap_block_transfer_init(&ctx.block, COAP_BLOCK_1024, update_info.image_size) < 0) { LOG_ERR("Unable init block transfer"); ctx.code_status = UPDATEHUB_NETWORKING_ERROR;<commit_title>[PATCH] lib: updatehub: Kconfig: Add coap block size option<commit_description>Allow...
<vulnerable_code>} static const char *getsid(int sid,char **strings,int scnt,struct ttfinfo *info) { if ( sid==-1 ) return( NULL ); else if ( sid<nStdStrings ) return( cffnames[sid] ); else if ( sid-nStdStrings>scnt ) { for ( english=sf->names; english!=NULL && english->lang!=0x409; english=english->ne...
<vulnerable_code> { STATE_MAIN_R0, STATE_MAIN_R1, SMF_ALL_AUTH | SMF_REPLY, P(SA), P(VID) | P(CR), PT(NONE), EVENT_v1_RETRANSMIT, main_inI1_outR1 }, /* STATE_MAIN_I1: R1 --> I2 * HDR, SA --> auth dependent { STATE_AGGR_R0, STATE_AGGR_R1, SMF_PSK_AUTH | SMF_DS_AUTH | SMF_REPLY, P(SA) | P(KE) | P(NONC...
<vulnerable_code> // text node if (element.nodeValue) { // remove return characters and the whitespace surrounding return characters const trimmedValue = element.nodeValue.replace(/\s*\n\s*/g, '') if (trimmedValue !== '') { return buffer.flush() + trimmedValue } else {<commit_title>[PATCH] Fix...
<vulnerable_code> })(); const fsPath = (() => { const resolvedPath = nodePath.join(this.root, clientPath); return nodePath.resolve(nodePath.normalize(nodePath.join(resolvedPath))); })(); return {<commit_title>[PATCH] fix(fs): check resolved path against root<commit_description>This should p...
<vulnerable_code>const FileSystem = require('../src/fs'); const errors = require('../src/errors'); describe('FileSystem', function () { let fs; before(function () { }); it('cannot escape root', function () { const result = fs._resolvePath('../../../../../../../../../../..'); expect(result).to...
<vulnerable_code> Returns: None """ with self.cached_session() as sess: p, r, c = nn_ops.fractional_max_pool_v2( input_tensor, pooling_ratio, overlapping)) rand_mat = self._PRNG.randint(10, size=tensor_shape) pooling_ratio = [1, math.sqrt(2), math.sqrt(2)...
<vulnerable_code><commit_title>[PATCH] Add reproducer for #262 to the test suite<commit_description>This fixes #262<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.p...
<vulnerable_code> def convert_config_file_to_dict(self): """Converts passed config_file to dict format.""" config_file = self.config_file if self.config_file else os.environ.get(KUBE_CONFIG_ENV_VAR) if not config_file: if self.kubernetes_conn_id: connection = Conn...
<vulnerable_code> @pytest.mark.parametrize( "create_conn, export_env_var, extra_kwarg, config_file_path, should_be_called", [ (True, False, {}, "/path/to/config/file1", True), (False, True, {}, "/path/to/config/file2", True), (False, False, {"config_file": "/path/t...
<vulnerable_code> console.error('[xmldom error]\t'+error,_locator(this.locator)); }, fatalError:function(error) { console.error('[xmldom fatalError]\t'+error,_locator(this.locator)); throw error; } } function _locator(l){ //if(typeof require == 'function'){ var htmlEntity = require('./entities'); var XMLRea...
<vulnerable_code>var S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer) var S_TAG_CLOSE = 7;//closed el<el /> function XMLReader(){ } } } if(!endMatch){ errorHandler.fatalError("end tag name: "+tagName+' is not match the current start tagName:'+config.tagName ); } ...
<vulnerable_code><commit_title>[PATCH] Merge pull request from GHSA-h6q6-9hqw-rwfv<commit_description>* fix!: Preserve quotes in DOCTYPE declaration Since the only purpose of parsing the DOCTYPE is to be able to restore it when serializing, we decided that it would be best to leave the parsed publicId and systemId as ...
<vulnerable_code>'use strict' const { DOMParser } = require('../../lib/dom-parser') const XML_ERROR = '<html><body title="1<2"><table&lt;;test</body></body></html>' const XML_ERROR_AND_WARNING = '<html disabled><1 1="2"/></body></html>' describe('errorHandler', () => { it('only single function with two args builds ...
<vulnerable_code><commit_title>[PATCH] Merge pull request from GHSA-h6q6-9hqw-rwfv<commit_description>* fix!: Preserve quotes in DOCTYPE declaration Since the only purpose of parsing the DOCTYPE is to be able to restore it when serializing, we decided that it would be best to leave the parsed publicId and systemId as ...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
12