forked from enlightenment/efl
Fix stringshare on 64bits platforms.
sizeof(Eina_Stringshare_Node) is now 24 bytes on 64bits platforms, but str[] was pointing to before that, to the 20th byte, causing out of bounds access. Adding the padding will cause str[] to use the correct position. It wastes 4 more bytes, like pre-optimizations, but it's just on big machines. SVN revision: 37305
This commit is contained in:
parent
de996636ba
commit
f22f587bab
|
@ -123,6 +123,11 @@ struct _Eina_Stringshare_Node
|
|||
|
||||
unsigned short length;
|
||||
unsigned short references;
|
||||
|
||||
#if __WORDSIZE == 64
|
||||
unsigned int __padding;
|
||||
#endif
|
||||
|
||||
char str[];
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue