[vlc-commits] freetype: use MAXPATHLEN instead of 1024 for ATS font file lookup

Felix Paul Kühne git at videolan.org
Wed May 30 02:43:52 CEST 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed May 30 00:11:26 2012 +0200| [780bc86907509205c3d0335350aeed909a427a2b] | committer: Felix Paul Kühne

freetype: use MAXPATHLEN instead of 1024 for ATS font file lookup

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=780bc86907509205c3d0335350aeed909a427a2b
---

 modules/text_renderer/freetype.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
index 19e2baa..a7c7afd 100644
--- a/modules/text_renderer/freetype.c
+++ b/modules/text_renderer/freetype.c
@@ -81,6 +81,7 @@
 /* apple stuff */
 #ifdef __APPLE__
 #include <Carbon/Carbon.h>
+#include <sys/param.h>                         /* for MAXPATHLEN */
 #undef HAVE_FONTCONFIG
 #define HAVE_STYLES
 #endif
@@ -713,7 +714,7 @@ static char* MacLegacy_Select( filter_t *p_filter, const char* psz_fontname,
     VLC_UNUSED( b_italic );
     VLC_UNUSED( i_size );
     FSRef ref;
-    unsigned char path[1024];
+    unsigned char path[MAXPATHLEN];
     char * psz_path;
 
     CFStringRef  cf_fontName;



More information about the vlc-commits mailing list