Fix broken import
This commit is contained in:
parent
30d3ce8ca4
commit
7330c213d9
11
.gitignore
vendored
11
.gitignore
vendored
@ -1,3 +1,8 @@
|
|||||||
SOURCES/hivex-1.3.18.tar.gz
|
/.build-*
|
||||||
SOURCES/libguestfs.keyring
|
/clog
|
||||||
/hivex-1.3.18.tar.gz
|
/hivex-*.tar.gz
|
||||||
|
/hivex-1.3.14.tar.gz.sig
|
||||||
|
/hivex-1.3.15.tar.gz.sig
|
||||||
|
/hivex-1.3.16.tar.gz.sig
|
||||||
|
/hivex-1.3.17.tar.gz.sig
|
||||||
|
/hivex-1.3.18.tar.gz.sig
|
||||||
|
@ -1,80 +0,0 @@
|
|||||||
From d5a522c0bb738efdd7cc1e762840b579fc9ea3de Mon Sep 17 00:00:00 2001
|
|
||||||
From: Laszlo Ersek <lersek@redhat.com>
|
|
||||||
Date: Fri, 10 Sep 2021 01:06:17 +0200
|
|
||||||
Subject: [PATCH] lib: write: improve key collation compatibility with Windows
|
|
||||||
|
|
||||||
There are multiple problems with using strcasecmp() for ordering registry
|
|
||||||
keys:
|
|
||||||
|
|
||||||
(1) strcasecmp() is influenced by LC_CTYPE.
|
|
||||||
|
|
||||||
(2) strcasecmp() cannot implement case conversion for multibyte UTF-8
|
|
||||||
sequences.
|
|
||||||
|
|
||||||
(3) Even with LC_CTYPE=POSIX and key names consisting solely of ASCII
|
|
||||||
characters, strcasecmp() converts characters to lowercase, for
|
|
||||||
comparison. But on Windows, the CompareStringOrdinal() function
|
|
||||||
converts characters to uppercase. This makes a difference when
|
|
||||||
comparing a letter to one of the characters that fall between 'Z'
|
|
||||||
(0x5A) and 'a' (0x61), namely {'[', '\\', ']', '^', '_', '`'}. For
|
|
||||||
example,
|
|
||||||
|
|
||||||
'c' (0x63) > '_' (0x5F)
|
|
||||||
'C' (0x43) < '_' (0x5F)
|
|
||||||
|
|
||||||
Compare key names byte for byte, eliminating problems (1) and (3).
|
|
||||||
|
|
||||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1648520
|
|
||||||
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
|
||||||
Message-Id: <20210909230617.31256-1-lersek@redhat.com>
|
|
||||||
Acked-by: Richard W.M. Jones <rjones@redhat.com>
|
|
||||||
---
|
|
||||||
lib/write.c | 32 +++++++++++++++++++++++++++++++-
|
|
||||||
1 file changed, 31 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/lib/write.c b/lib/write.c
|
|
||||||
index 70105c9d9907..d9a13a3c18b6 100644
|
|
||||||
--- a/lib/write.c
|
|
||||||
+++ b/lib/write.c
|
|
||||||
@@ -462,7 +462,37 @@ compare_name_with_nk_name (hive_h *h, const char *name, hive_node_h nk_offs)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- int r = strcasecmp (name, nname);
|
|
||||||
+ /* Perform a limited case-insensitive comparison. ASCII letters will be
|
|
||||||
+ * *upper-cased*. Multibyte sequences will produce nonsensical orderings.
|
|
||||||
+ */
|
|
||||||
+ int r = 0;
|
|
||||||
+ const char *s1 = name;
|
|
||||||
+ const char *s2 = nname;
|
|
||||||
+
|
|
||||||
+ for (;;) {
|
|
||||||
+ unsigned char c1 = *(s1++);
|
|
||||||
+ unsigned char c2 = *(s2++);
|
|
||||||
+
|
|
||||||
+ if (c1 >= 'a' && c1 <= 'z')
|
|
||||||
+ c1 = 'A' + (c1 - 'a');
|
|
||||||
+ if (c2 >= 'a' && c2 <= 'z')
|
|
||||||
+ c2 = 'A' + (c2 - 'a');
|
|
||||||
+ if (c1 < c2) {
|
|
||||||
+ /* Also covers the case when "name" is a prefix of "nname". */
|
|
||||||
+ r = -1;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ if (c1 > c2) {
|
|
||||||
+ /* Also covers the case when "nname" is a prefix of "name". */
|
|
||||||
+ r = 1;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ if (c1 == '\0') {
|
|
||||||
+ /* Both strings end. */
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
free (nname);
|
|
||||||
|
|
||||||
return r;
|
|
||||||
--
|
|
||||||
2.19.1.3.g30247aa5d201
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
|||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- rhel-9
|
|
||||||
decision_context: osci_compose_gate
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: xen-ci.brew-build.tier1.functional}
|
|
@ -1,17 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
|
|
||||||
iQJFBAABCAAvFiEE93dPsa0HSn6Mh2fqkXOPc+G3aKAFAlxJfxkRHHJpY2hAYW5u
|
|
||||||
ZXhpYS5vcmcACgkQkXOPc+G3aKCZBRAAqXBbrDyf+TtXCLZBIrs0MkfrYtQFDxps
|
|
||||||
nTNz6sdNXftYl0LKJ6dhEkNwVg0QP31ifX1mQfU4EmJiEOI7qW6xqNLPlwhkKaIP
|
|
||||||
qoB7ctesELb3LBhcgjI9lUjaCeGXrWkIHxp9SWC3esGqHIxWVu+BwKmFt1DfAZtH
|
|
||||||
KE9gtVO6g5sbCdZEP2b4d/PwsL1vO0glekCkEZ0n3PcOgf0isVU0IUSz2IVhcy6e
|
|
||||||
DqY4puYFwopVEpPzzRI9oW/y2XJTTssCM9F420HDnemtUQpx0Uw637MiCRLoN6Or
|
|
||||||
PA1IkTzx/01Ub6OKl3gbMoY3s27yOFJToBVkTmYDvZHUJpNRCj7ytaKAIiZ4aan7
|
|
||||||
WOi+7h9cvkjcr0OhomN+5bDLg6XpaVj9SPuM3W/AgDaYu6PeSvpr5yAtg3VEArJ3
|
|
||||||
Lh4y8b+fh1pzdkLJsvGxK+YpL+ollgTP2y2CAXxgTDv0oMrUI9O4vrNKaOSE4Qnl
|
|
||||||
TinMMFaYvuBWzzTKfjhtnFOMI8YvAFHHVDhBSWost2ZR5W6SCd9xXAvMdUQDL3aD
|
|
||||||
ReesInrLptdklyKL+4l8miokUfq+U0ASi1PC3+Ek/yk13LtUXHEvXfb9rQlPhOc3
|
|
||||||
Fp1278JziKQd7xlkvMuo+Q2PSRGSDaBACqmqjwBaLsPDoz8jsiZOZ/qPg6qcx0kM
|
|
||||||
y93C/w1pCcA=
|
|
||||||
=YBlx
|
|
||||||
-----END PGP SIGNATURE-----
|
|
2
sources
2
sources
@ -1,2 +1,2 @@
|
|||||||
SHA512 (hivex-1.3.18.tar.gz) = 1851351118921e81df9e505f90d00048a178572c2edd3de40194a69915176bdb615e2eb5afea408d57063e98257c8d1e3d0cd6730407153892cc9e3befc4aa3a
|
SHA512 (hivex-1.3.18.tar.gz) = 1851351118921e81df9e505f90d00048a178572c2edd3de40194a69915176bdb615e2eb5afea408d57063e98257c8d1e3d0cd6730407153892cc9e3befc4aa3a
|
||||||
SHA512 (libguestfs.keyring) = 297a15edc7c220222b9f650e0a9361ae132d3f0fed04aeb2237a1d9c3f6dac6f336846434f66480faed72635a33f659e849b052e74b88d1508aeff03f8c9a2ac
|
SHA512 (hivex-1.3.18.tar.gz.sig) = 3b35181ed780456e21da48ef4c1ad630adf6e4db56a88711c0e9fe189806932d0bfcfde40d037488c7e512a8bc515c258c11e09853e448cae09e6bc8b9635341
|
||||||
|
Loading…
Reference in New Issue
Block a user