https://bugs.freedesktop.org/show_bug.cgi?id=56015
Priority: medium
Bug ID: 56015
Assignee: [email protected]
Summary: Insane use of _PC_NAME_MAX
Severity: normal
Classification: Unclassified
OS: All
Reporter: [email protected]
Hardware: All
Status: UNCONFIRMED
Version: unspecified
Component: Libreoffice
Product: LibreOffice
As described on the page at
http://womble.decadent.org.uk/readdir_r-advisory.html (last modified in
December 2007), OpenOffice.org (at least version 1.1.3) used _PC_NAME_MAX in an
insane way (described in a slightly more colorful way in the aforementioned
page). Looking at the current LibreOffice git master, I see the insane code is
still there, on at least two different files (found with "git grep _PC_NAME_MAX
HEAD"):
HEAD:extensions/source/plugin/unx/unxmgr.cxx: char aBuffer[ sizeof( struct
dirent ) + _PC_NAME_MAX +1 ];
HEAD:vcl/generic/fontmanager/fontmanager.cxx: long aDirEntBuffer[
(sizeof(struct dirent)+_PC_NAME_MAX)+1 ];
This does not make much sense, since (at least on my system) _PC_NAME_MAX is an
enum value, meant to be passed as an argument to pathconf/fpathconf. The use of
the "long" type in one of these two files is even more baffling.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs