openbsd-ports/security/libnipper/patches/patch-device_crypto_crypto-base64_cpp
steven 6162e4a100 import libnipper 0.12.1
Nipper enables network administrators, security professionals and auditors
to quickly produce reports on key network infrastructure devices.

testing by rui and Nigel J. Taylor who also provided a patch

ok rui@
2008-09-20 20:26:05 +00:00

19 lines
852 B
Plaintext

let it build with base gcc
$OpenBSD: patch-device_crypto_crypto-base64_cpp,v 1.1.1.1 2008/09/20 20:26:05 steven Exp $
--- device/crypto/crypto-base64.cpp.orig Sun Sep 7 23:03:17 2008
+++ device/crypto/crypto-base64.cpp Sun Sep 7 23:03:17 2008
@@ -110,9 +110,9 @@ const char *Device::base64Decode(const char *encodedSt
offset++;
// Convert 4 6 bit characters into 3 8 bit ones...
- base64TempString.append(1, ((inter1 << 2) | (inter2 >> 4)));
- base64TempString.append(1, (((inter2 << 4) & 240) | (inter3 >> 2)));
- base64TempString.append(1, (((inter3 << 6) & 192)| inter4));
+ base64TempString.append(1, (char) ((inter1 << 2) | (inter2 >> 4)));
+ base64TempString.append(1, (char) (((inter2 << 4) & 240) | (inter3 >> 2)));
+ base64TempString.append(1, (char) (((inter3 << 6) & 192)| inter4));
}
return base64TempString.c_str();