mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-26 08:51:25 +02:00
24 lines
952 B
Diff
24 lines
952 B
Diff
Workaround for flaw in musl 1.1.8's CP437 char mapping
|
|
|
|
FIXME: Remove this patch after musl upgrade.
|
|
|
|
See: http://www.openwall.com/lists/musl/2017/11/22/2
|
|
--- a/tests/at-charset.c
|
|
+++ b/tests/at-charset.c
|
|
@@ -93,15 +93,6 @@
|
|
test_result(mywstrncmp(ubuffer, latin1text, sizeof(latin1text) / 2) == TRUE);
|
|
|
|
#ifdef ICONV_FOUND
|
|
- Priv->Charset = AT_CHARSET_PCCP437;
|
|
- error = ATGEN_EncodeText(s, latin1text, sizeof(latin1text) / 2, buffer, sizeof(buffer), &result);
|
|
- gammu_test_result(error, "Encode - 3");
|
|
- strconv_test_result(latin1cp437, buffer, result);
|
|
-
|
|
- error = ATGEN_DecodeText(s, buffer, result, ubuffer, sizeof(ubuffer), FALSE, FALSE);
|
|
- gammu_test_result(error, "Decode - 3");
|
|
- test_result(mywstrncmp(ubuffer, latin1text, sizeof(latin1text) / 2) == TRUE);
|
|
-
|
|
Priv->Charset = AT_CHARSET_ISO88591;
|
|
error = ATGEN_EncodeText(s, latin1text, sizeof(latin1text) / 2, buffer, sizeof(buffer), &result);
|
|
gammu_test_result(error, "Encode - 4");
|