diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2008-05-13 17:26:57 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2008-05-13 17:26:57 -0700 |
commit | 1ab07ce0eec4f6c7ed66c7aba3edf8c4315dd907 (patch) | |
tree | 7413478f2575631991ec84bf3c1d6f8ba4f92ae3 | |
parent | 0f9db4aa7de6e0644ac9c5811b949e5f936c9d61 (diff) |
FontFileDirectoryChanged: check length of "fonts.alias" as well as "fonts.dir"
-rwxr-xr-x | src/fontfile/dirfile.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fontfile/dirfile.c b/src/fontfile/dirfile.c index a13798a..1489938 100755 --- a/src/fontfile/dirfile.c +++ b/src/fontfile/dirfile.c @@ -176,6 +176,9 @@ FontFileDirectoryChanged(FontDirectoryPtr dir) } if (dir->dir_mtime != statb.st_mtime) return TRUE; + + if ((strlen(dir->directory) + sizeof(FontAliasFile)) > sizeof(dir_file)) + return FALSE; strcpy (dir_file, dir->directory); strcat (dir_file, FontAliasFile); if (stat (dir_file, &statb) == -1) |