diff options
author | Cem Keylan <cem@ckyln.com> | 2020-06-25 09:58:38 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-06-25 09:58:38 +0300 |
commit | 2ac055d2850e4cadd8e0e7b789d5694937c3c0d0 (patch) | |
tree | 5d7ca6d65e00169d89d55dff659860154506546a /extra/efivar/patches/05-4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e.patch | |
parent | f24fd83d42ffbc0dc843f55e381b130833fea74d (diff) | |
download | repository-2ac055d2850e4cadd8e0e7b789d5694937c3c0d0.tar.gz |
efivar: link statically
Diffstat (limited to 'extra/efivar/patches/05-4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e.patch')
-rw-r--r-- | extra/efivar/patches/05-4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/extra/efivar/patches/05-4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e.patch b/extra/efivar/patches/05-4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e.patch new file mode 100644 index 00000000..176e3fd1 --- /dev/null +++ b/extra/efivar/patches/05-4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e.patch @@ -0,0 +1,28 @@ +From 4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e Mon Sep 17 00:00:00 2001 +From: Javier Martinez Canillas <javierm@redhat.com> +Date: Tue, 5 Mar 2019 17:23:32 +0100 +Subject: [PATCH] ucs2.h: fix logic that checks for UCS-2 string termination + +Currently the loop to count the lenght of the UCS-2 string ends if either +of the two bytes are 0, but 0 is a valid value for UCS-2 character codes. + +So only break the loop when 0 is the value for both UCS-2 char bytes. + +Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> +--- + src/ucs2.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ucs2.h b/src/ucs2.h +index e0390c3..fd8b056 100644 +--- a/src/ucs2.h ++++ b/src/ucs2.h +@@ -29,7 +29,7 @@ ucs2len(const void *vs, ssize_t limit) + const uint8_t *s8 = vs; + + for (i = 0; +- i < (limit >= 0 ? limit : i+1) && s8[0] != 0 && s8[1] != 0; ++ i < (limit >= 0 ? limit : i+1) && !(s8[0] == 0 && s8[1] == 0); + i++, s8 += 2) + ; + return i; |