diff options
author | Tobias Brunner <tobias@strongswan.org> | 2015-11-11 19:30:04 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2015-11-12 14:12:13 +0100 |
commit | 9e81f33b5521448f6f6314c4e869a4e02fef1634 (patch) | |
tree | 9d80f709f0c505738afde1e3c04f458b97c6382c /scripts/bin2sql.c | |
parent | a50f3037ad30fa6020a4ec56e6afe3da7ca1731d (diff) | |
download | strongswan-9e81f33b5521448f6f6314c4e869a4e02fef1634.tar.bz2 strongswan-9e81f33b5521448f6f6314c4e869a4e02fef1634.tar.xz |
android: Properly handle shorter types in BufferedByteWriter
In Java all integer types are signed, when a negative integer is casted
to a larger type (e.g. int to long) then due to sign extension the upper
bytes are not 0. So writing that value to a byte array does not produce
the expected result. By overloading the putX() methods we make sure to
upcast the values correctly.
Diffstat (limited to 'scripts/bin2sql.c')
0 files changed, 0 insertions, 0 deletions