aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/bin2sql.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2015-11-11 19:30:04 +0100
committerTobias Brunner <tobias@strongswan.org>2015-11-12 14:12:13 +0100
commit9e81f33b5521448f6f6314c4e869a4e02fef1634 (patch)
tree9d80f709f0c505738afde1e3c04f458b97c6382c /scripts/bin2sql.c
parenta50f3037ad30fa6020a4ec56e6afe3da7ca1731d (diff)
downloadstrongswan-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