line 42 of tab_sqrt.c
triggers a stack smashing on my Ubuntu 14.10 64bit system with pd 0.46-4.
line 42 is :
*(unsigned int *)(&f) = l;
On my system :
printf("size of t_float : %d, long : %d, unsigned int: %d\n", sizeof(t_float), sizeof(long), sizeof(unsigned int));
shows :
size of t_float : 4, long : 8, unsigned int: 4
while on 32bit long is 4 byte wide.
and obviously, one can't cast a 8 byte wide variable into a 4 byte wide one without any care.
Anonymous
erratum : line 42 is actually :
(long )(&f) = l;
see https://sourceforge.net/p/pure-data/svn/HEAD/tree/trunk/externals/iem/iem_tab/src/tab_sqrt.c#l42