aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/module/unicode
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2023-01-25 18:50:29 +0000
committerMartin Matuska <mm@FreeBSD.org>2023-01-25 18:50:29 +0000
commit15f0b8c309dea1dcb14d3e374686576ff68ac43f (patch)
tree8deb5ea3d3e71ae088585ae5d9081d647edf2b3c /sys/contrib/openzfs/module/unicode
parentda52fc464a4c80fdbed551824064d203831b4e7b (diff)
parent9cd71c8604d52def22ffaddc35755712f0fb9349 (diff)
downloadsrc-15f0b8c309dea1dcb14d3e374686576ff68ac43f.tar.gz
src-15f0b8c309dea1dcb14d3e374686576ff68ac43f.zip
zfs: merge openzfs/zfs@9cd71c860 (master)
Notable upstream pull request merges: #13805 Configure zed's diagnosis engine with vdev properties #14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode #14121 Batch enqueue/dequeue for bqueue #14123 arc_read()/arc_access() refactoring and cleanup #14159 Bypass metaslab throttle for removal allocations #14243 Implement uncached prefetch #14251 Cache dbuf_hash() calculation #14253 Allow reciever to override encryption property in case of replication #14254 Restrict visibility of per-dataset kstats inside FreeBSD jails #14255 Zero end of embedded block buffer in dump_write_embedded() #14263 Cleanups identified by CodeQL and Coverity #14264 Miscellaneous fixes #14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names #14287 FreeBSD: Remove stray debug printf #14288 Colorize zfs diff output #14289 deadlock between spa_errlog_lock and dp_config_rwlock #14291 FreeBSD: Fix potential boot panic with bad label #14292 Add tunable to allow changing micro ZAP's max size #14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs #14295 zed: add hotplug support for spare vdevs #14304 Activate filesystem features only in syncing context #14311 zpool: do guid-based comparison in is_vdev_cb() #14317 Pack zrlock_t by 8 bytes #14320 Update arc_summary and arcstat outputs #14328 FreeBSD: catch up to 1400077 #14376 Use setproctitle to report progress of zfs send #14340 Remove some dead ARC code #14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole #14360 libzpool: fix ddi_strtoull to update nptr #14364 Fix unprotected zfs_znode_dmu_fini #14379 zfs_receive_one: Check for the more likely error first #14380 Cleanup of dead code suggested by Clang Static Analyzer #14397 Avoid passing an uninitialized index to dsl_prop_known_index #14404 Fix reading uninitialized variable in receive_read #14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report #14418 Introduce minimal ZIL block commit delay #14422 x86 assembly: fix .size placement and replace .align with .balign Obtained from: OpenZFS OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349
Diffstat (limited to 'sys/contrib/openzfs/module/unicode')
-rw-r--r--sys/contrib/openzfs/module/unicode/u8_textprep.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/sys/contrib/openzfs/module/unicode/u8_textprep.c b/sys/contrib/openzfs/module/unicode/u8_textprep.c
index 1940ee510d2c..49e22c88cde7 100644
--- a/sys/contrib/openzfs/module/unicode/u8_textprep.c
+++ b/sys/contrib/openzfs/module/unicode/u8_textprep.c
@@ -23,6 +23,9 @@
* Use is subject to license terms.
*/
+/*
+ * Copyright 2022 MNX Cloud, Inc.
+ */
@@ -213,10 +216,10 @@ static const int8_t u8_number_of_bytes[0x100] = {
/* 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F */
I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_,
-/* 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F */
+/* 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F */
I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_,
-/* A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF */
+/* A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF */
I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_, I_,
/* B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF */
@@ -1286,8 +1289,12 @@ TRY_THE_NEXT_MARK:
saved_l = l - disp[last];
while (p < oslast) {
- size = u8_number_of_bytes[*p];
- if (size <= 1 || (p + size) > oslast)
+ int8_t number_of_bytes = u8_number_of_bytes[*p];
+
+ if (number_of_bytes <= 1)
+ break;
+ size = number_of_bytes;
+ if ((p + size) > oslast)
break;
saved_p = p;
@@ -1378,8 +1385,10 @@ SAFE_RETURN:
*/
static size_t
collect_a_seq(size_t uv, uchar_t *u8s, uchar_t **source, uchar_t *slast,
- boolean_t is_it_toupper, boolean_t is_it_tolower,
- boolean_t canonical_decomposition, boolean_t compatibility_decomposition,
+ boolean_t is_it_toupper,
+ boolean_t is_it_tolower,
+ boolean_t canonical_decomposition,
+ boolean_t compatibility_decomposition,
boolean_t canonical_composition,
int *errnum, u8_normalization_states_t *state)
{