2010/11/22 Cristian Rodríguez
El 21/11/10 11:34, Sebastian Siebert escribió:
I would be glad if someone can look into the source code.
I sent submit request #53627 to your project with a possible workaround, but.. if it messes stuff up, dont look at me ! it wasnt me! :P
The code is fundamentally, crazy.
I would not really touch it. The code is "good"*, there is no real overflows since there are 21 bytes of space at destination and the biggest offender is 5 bytes. The code comments make clear they know they were doing it... but it fails to explain why it was done that way, But I expect them to have a good cause. Hey, they are playing with functions pointer in that part of the code... The funny thing is that gcc is only complaining about the STRCPYs that have this comment before: /* Set l:self to "selfdict". Use "name" to avoid a warning from * some compiler that checks the destination size. */ It seems that with name = v->di_key; STRCPY(name, "self"); gcc fails to see the extra space, but with STRCPY(v->di_key, "self"); the warning would dissapear (I didn't test). Apparently those changes were made because of the crash reported in the vim_dev mail Sebastian linked before. So... IMHO your "#ifdef _FORTIFY_SOURCE" fix would be the better. * At http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38136#c5 it's said the code violates 6.7.2.1/2 from C99. But it's my understanding that since it uses "di_key[1]" instead of "di_key[]" it's OK. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org