|
|
@ -1,4 +1,4 @@
|
|
|
|
From 7808571acdea1c66705d5296c57eb7e0de8ed4c2 Mon Sep 17 00:00:00 2001
|
|
|
|
From e35ddf55d3b731452ac33fabd811b3a830f0e626 Mon Sep 17 00:00:00 2001
|
|
|
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
|
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
|
|
Date: Tue, 29 Sep 2015 10:31:58 +0200
|
|
|
|
Date: Tue, 29 Sep 2015 10:31:58 +0200
|
|
|
|
Subject: [PATCH] Cast char* and U8* where needed
|
|
|
|
Subject: [PATCH] Cast char* and U8* where needed
|
|
|
@ -11,23 +11,14 @@ mismatching signess. This patch corrects it.
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
|
---
|
|
|
|
---
|
|
|
|
XS.xs | 12 ++++++------
|
|
|
|
XS.xs | 10 +++++-----
|
|
|
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/XS.xs b/XS.xs
|
|
|
|
diff --git a/XS.xs b/XS.xs
|
|
|
|
index 25e2b9e..2aa6c57 100644
|
|
|
|
index 91ca74b..28e298f 100644
|
|
|
|
--- a/XS.xs
|
|
|
|
--- a/XS.xs
|
|
|
|
+++ b/XS.xs
|
|
|
|
+++ b/XS.xs
|
|
|
|
@@ -802,7 +802,7 @@ decode_he (dec_t *dec, HV *hv)
|
|
|
|
@@ -1112,7 +1112,7 @@ decode_str (dec_t *dec, int utf8)
|
|
|
|
dec->cur += len;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ecb_expect_false (dec->cbor.flags & F_VALIDATE_UTF8))
|
|
|
|
|
|
|
|
- if (!is_utf8_string (key, len))
|
|
|
|
|
|
|
|
+ if (!is_utf8_string ((U8*)key, len))
|
|
|
|
|
|
|
|
ERR ("corrupted CBOR data (invalid UTF-8 in map key)");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hv_store (hv, key, -len, decode_sv (dec), 0);
|
|
|
|
|
|
|
|
@@ -891,7 +891,7 @@ decode_str (dec_t *dec, int utf8)
|
|
|
|
|
|
|
|
STRLEN len = decode_uint (dec);
|
|
|
|
STRLEN len = decode_uint (dec);
|
|
|
|
|
|
|
|
|
|
|
|
WANT (len);
|
|
|
|
WANT (len);
|
|
|
@ -36,7 +27,7 @@ index 25e2b9e..2aa6c57 100644
|
|
|
|
dec->cur += len;
|
|
|
|
dec->cur += len;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -900,7 +900,7 @@ decode_str (dec_t *dec, int utf8)
|
|
|
|
@@ -1121,7 +1121,7 @@ decode_str (dec_t *dec, int utf8)
|
|
|
|
STRLEN len = decode_uint (dec);
|
|
|
|
STRLEN len = decode_uint (dec);
|
|
|
|
|
|
|
|
|
|
|
|
WANT (len);
|
|
|
|
WANT (len);
|
|
|
@ -45,16 +36,16 @@ index 25e2b9e..2aa6c57 100644
|
|
|
|
dec->cur += len;
|
|
|
|
dec->cur += len;
|
|
|
|
|
|
|
|
|
|
|
|
if (ecb_expect_false (dec->stringref)
|
|
|
|
if (ecb_expect_false (dec->stringref)
|
|
|
|
@@ -911,7 +911,7 @@ decode_str (dec_t *dec, int utf8)
|
|
|
|
@@ -1132,7 +1132,7 @@ decode_str (dec_t *dec, int utf8)
|
|
|
|
if (utf8)
|
|
|
|
if (utf8)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (ecb_expect_false (dec->cbor.flags & F_VALIDATE_UTF8))
|
|
|
|
if (ecb_expect_false (dec->cbor.flags & F_VALIDATE_UTF8))
|
|
|
|
- if (!is_utf8_string (SvPVX (sv), SvCUR (sv)))
|
|
|
|
- if (!cbor_is_utf8_string (SvPVX (sv), SvCUR (sv)))
|
|
|
|
+ if (!is_utf8_string ((U8*)SvPVX (sv), SvCUR (sv)))
|
|
|
|
+ if (!cbor_is_utf8_string ((U8*)SvPVX (sv), SvCUR (sv)))
|
|
|
|
ERR ("corrupted CBOR data (invalid UTF-8 in text string)");
|
|
|
|
ERR ("corrupted CBOR data (invalid UTF-8 in text string)");
|
|
|
|
|
|
|
|
|
|
|
|
SvUTF8_on (sv);
|
|
|
|
SvUTF8_on (sv);
|
|
|
|
@@ -1221,7 +1221,7 @@ decode_cbor (SV *string, CBOR *cbor, char **offset_return)
|
|
|
|
@@ -1452,7 +1452,7 @@ decode_cbor (SV *string, CBOR *cbor, char **offset_return)
|
|
|
|
sv = decode_sv (&dec);
|
|
|
|
sv = decode_sv (&dec);
|
|
|
|
|
|
|
|
|
|
|
|
if (offset_return)
|
|
|
|
if (offset_return)
|
|
|
@ -63,7 +54,7 @@ index 25e2b9e..2aa6c57 100644
|
|
|
|
|
|
|
|
|
|
|
|
if (!(offset_return || !sv))
|
|
|
|
if (!(offset_return || !sv))
|
|
|
|
if (dec.cur != dec.end && !dec.err)
|
|
|
|
if (dec.cur != dec.end && !dec.err)
|
|
|
|
@@ -1271,7 +1271,7 @@ incr_parse (CBOR *self, SV *cborstr)
|
|
|
|
@@ -1506,7 +1506,7 @@ incr_parse (CBOR *self, SV *cborstr)
|
|
|
|
1, 2, 4, 8,-1,-1,-1,-2
|
|
|
|
1, 2, 4, 8,-1,-1,-1,-2
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -73,5 +64,5 @@ index 25e2b9e..2aa6c57 100644
|
|
|
|
IV count = SvIVX (AvARRAY (self->incr_count)[AvFILLp (self->incr_count)]);
|
|
|
|
IV count = SvIVX (AvARRAY (self->incr_count)[AvFILLp (self->incr_count)]);
|
|
|
|
I8 ilen = incr_len[m];
|
|
|
|
I8 ilen = incr_len[m];
|
|
|
|
--
|
|
|
|
--
|
|
|
|
2.5.5
|
|
|
|
2.31.1
|
|
|
|
|
|
|
|
|