summaryrefslogtreecommitdiffstats
path: root/libdivecomputer.c
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2012-09-20 01:38:40 +0300
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-09-19 18:00:38 -0700
commitf4bc0ca37b47fd731bf55bc6c4675a34092771da (patch)
tree54f8d37f61dc818301d2e21617ad38911fd482d0 /libdivecomputer.c
parentd14932058f191de2a812a9b3b9ad87c5febd2b3e (diff)
downloadsubsurface-f4bc0ca37b47fd731bf55bc6c4675a34092771da.tar.gz
Use long instead of int when retrieving DIVE_DATE via gtk_tree_model_get
The type of the DIVE_DATE field is G_TYPE_LONG, so when accessing it we have to pass gtk_tree_model_get() the proper "long *" pointer, rather than an int. On 64-bit platforms, passing a pointer to an int would otherwise result in randomly overwriting another four bytes of stack. Sadly, there are not much safety checks to warn if our passed variable to the vararg list is of the correct type, which is unlike gtk_tree_model_get_value(), which will report typed errors. This solves a bug that may potentially result in undefined behaviour on some x64 OS (e.g Ubuntu 12.04 x64). Reported-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'libdivecomputer.c')
0 files changed, 0 insertions, 0 deletions