]> granicus.if.org Git - postgresql/commit
pageinspect: Fix unaligned struct access in GIN functions
authorPeter Eisentraut <peter_e@gmx.net>
Fri, 4 Nov 2016 16:00:00 +0000 (12:00 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Fri, 4 Nov 2016 14:05:37 +0000 (10:05 -0400)
commit84ad68d645222f534e4fe51fbba43a5c9cc382a5
treee417126023069e046f92bcd0fc42aa4b5ae2c363
parentf2e6a2ccf1247bc15f6c03895c936b28cdeff181
pageinspect: Fix unaligned struct access in GIN functions

The raw page data that is passed into the functions will not be aligned
at 8-byte boundaries.  Casting that to a struct and accessing int64
fields will result in unaligned access.  On most platforms, you get away
with it, but it will result on a crash on pickier platforms such as ia64
and sparc64.
contrib/pageinspect/ginfuncs.c