To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=51967 Issue #:|51967 Summary:|unzip: implicit declaration of functions and - |D_FORTIFY_SOURCE=2 Component:|porting Version:|680m116 Platform:|PC URL:| OS/Version:|Linux Status:|NEW Status whiteboard:| Keywords:| Resolution:| Issue type:|PATCH Priority:|P3 Subcomponent:|code Assigned to:|mh Reported by:|pmladek
------- Additional comments from [EMAIL PROTECTED] Thu Jul 14 06:56:53 -0700 2005 ------- gcc4 together with the latest versions of glibc provides a new feature. It allows to check some buffer overflows in functions like memcpy, memmove, ... at compile time. The feature is enabled by -D_FORTIFY_SOURCE=2 in CFLAGS. If the feature is enabled, the affected functions are redefined, such as memcpy is redefined in /usr/include/bits/string3.h: --- cut --- #define memmove(dest, src, len) \ ((__bos0 (dest) != (size_t) -1) \ ? __builtin___memmove_chk (dest, src, len, __bos0 (dest)) \ : __memmove_ichk (dest, src, len)) --- cut --- It means that it only works if the affected functions are not declared implicitely. Therefore we wants to remove all the implicit declarations of the affected functions. I will attach a patch that fixes the problem in the module unzip. The patch also removes implicit declaration of functions like malloc because it could make problems on 64-bit architectures. malloc returns pointer but the implicit declaration makes it to return integer. Integer is 32-bit even on most of the 64-bit architectures. So, the 64-bit pointer is converted to 32-bit value, the information is lost and the aplication would crash. I am not sure if the includes are added to the right place. Maybe, there should be more complicated #ifdef around or they should be included later or ... --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
