summaryrefslogtreecommitdiff
path: root/psprint
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-03-30 12:47:25 +0000
committerRüdiger Timm <rt@openoffice.org>2004-03-30 12:47:25 +0000
commita2f5ec83a52401808d9493234ccbc70e9e864473 (patch)
tree38fb971a7c9c53a89dbe5d769613602015b799f3 /psprint
parent457300a06a39520fe50933a1ab5e7b2f10401e86 (diff)
INTEGRATION: CWS vcl20 (1.3.116); FILE MERGED
2004/02/23 17:02:07 pl 1.3.116.1: #115528# do not use strcpy and friends
Diffstat (limited to 'psprint')
-rw-r--r--psprint/source/fontmanager/parseAFM.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/psprint/source/fontmanager/parseAFM.cxx b/psprint/source/fontmanager/parseAFM.cxx
index adca6868dc99..562b5d5c67da 100644
--- a/psprint/source/fontmanager/parseAFM.cxx
+++ b/psprint/source/fontmanager/parseAFM.cxx
@@ -37,9 +37,9 @@
*
* $RCSfile: parseAFM.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: obo $ $Date: 2004-03-17 10:49:26 $
+ * last change: $Author: rt $ $Date: 2004-03-30 13:47:25 $
*
************************************************************************/
@@ -787,8 +787,7 @@ static int parseCharMetrics( FILE* fp, register FontInfo* fi)
break;
case CHARNAME:
keyword = token(fp);
- temp->name = (char *) malloc(strlen(keyword) + 1);
- strcpy(temp->name, keyword);
+ temp->name = (char *)strdup(keyword);
break;
case CHARBBOX:
temp->charBBox.llx = atoi(token(fp));
@@ -809,11 +808,9 @@ static int parseCharMetrics( FILE* fp, register FontInfo* fi)
*tail = (Ligature *) calloc(1, sizeof(Ligature));
keyword = token(fp);
- (*tail)->succ = (char *) malloc(strlen(keyword) + 1);
- strcpy((*tail)->succ, keyword);
+ (*tail)->succ = (char *)strdup(keyword);
keyword = token(fp);
- (*tail)->lig = (char *) malloc(strlen(keyword) + 1);
- strcpy((*tail)->lig, keyword);
+ (*tail)->lig = (char *)strdup(keyword);
break; }
case ENDCHARMETRICS:
cont = false;;