summaryrefslogtreecommitdiff
path: root/extensions/source/plugin/unx/unxmgr.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-03-30 19:23:55 +0100
committerEike Rathke <erack@redhat.com>2013-03-30 19:39:29 +0100
commit2cd4e55bb36a9a3d13971b530469188e3fb59dfe (patch)
tree900749adfc02ef6c2bcba81c3f61e4e0939484df /extensions/source/plugin/unx/unxmgr.cxx
parent31fa0633795e681035f7b9cda5747c9e2af28665 (diff)
certainly this was not meant to be _PC_NAME_MAX
_PC_NAME_MAX is a symbolic constant meant to be used as a pathconf() argument, not a buffer length. This piece of code was even "honored" in http://womble.decadent.org.uk/readdir_r-advisory.html "The code that enumerates fonts and plugins in the appropriate directories uses a stack buffer of type long[sizeof(struct dirent) + _PC_NAME_MAX + 1]. I can only assume this is the result of a programmer cutting his crack with aluminium filings." Thanks to Heiner Rechtien for pointing this out. Note: declaring the buffer of type long instead of char looks weird but probably has the reason that it is casted to struct dirent* for the readdir_r() call that might not work on architectures that forbid arbitrary alignment on non-even boundaries. Change-Id: Ie959b8905d1328c6fcaefbf6f6c915cc430e85b6
Diffstat (limited to 'extensions/source/plugin/unx/unxmgr.cxx')
0 files changed, 0 insertions, 0 deletions