Subversion Repositories libdkim

Compare Revisions

Ignore whitespace Rev 55 → Rev 56

/trunk/debian/changelog
1,3 → 1,10
libdkim (1:1.0.21-4) unstable; urgency=low
 
* fix_warnings.patch: fix narrowing conversion in DecodeBase64()
(Closes: #811734).
 
-- Magnus Holmgren <holmgren@debian.org> Sat, 02 Jul 2016 17:32:44 +0200
 
libdkim (1:1.0.21-3) unstable; urgency=low
 
* Completely correct order of object files and libraries (Closes:
/trunk/debian/patches/fix_warnings.patch
202,6 → 202,29
--- a/src/dkimverify.cpp
+++ b/src/dkimverify.cpp
@@ -210,7 +210,7 @@ void DecodeQuotedPrintable(char *ptr)
////////////////////////////////////////////////////////////////////////////////
unsigned DecodeBase64(char *ptr)
{
- static const unsigned char base64_table[256] = {
+ static const signed char base64_table[256] = {
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,
@@ -227,10 +227,10 @@ unsigned DecodeBase64(char *ptr)
while (*s != '\0')
{
- unsigned char value = base64_table[*s++];
- if ( (signed char)value >= 0 )
+ signed char value = base64_table[*s++];
+ if ( value >= 0 )
{
- b64accum = (b64accum << 6) | value;
+ b64accum = (b64accum << 6) | (unsigned char)value;
b64shift += 6;
if (b64shift >= 8)
{
@@ -442,7 +442,7 @@ int CDKIMVerify::GetResults(void)
{
ProcessFinal();