< prev index next >

src/java.desktop/unix/native/common/awt/fontpath.c

Print this page
rev 16167 : 8170525: Fix minor issues in awt coding

*** 241,252 **** tempFontPath++; } appendDirList[index] = 0; if ( doNotAppend == 0 ) { ! strcpy ( fontDirPath, fDirP->name[index] ); ! strcat ( fontDirPath, "/fonts.dir" ); dirFile = open ( fontDirPath, O_RDONLY, 0 ); if ( dirFile == -1 ) { doNotAppend = 1; } else { close ( dirFile ); --- 241,253 ---- tempFontPath++; } appendDirList[index] = 0; if ( doNotAppend == 0 ) { ! strncpy(fontDirPath, fDirP->name[index], sizeof(fontDirPath)); ! fontDirPath[sizeof(fontDirPath)-1] = '\0'; ! strncat(fontDirPath, "/fonts.dir", sizeof(fontDirPath) - strlen(fontDirPath)); dirFile = open ( fontDirPath, O_RDONLY, 0 ); if ( dirFile == -1 ) { doNotAppend = 1; } else { close ( dirFile );
< prev index next >