diff options
author | marha <marha@users.sourceforge.net> | 2014-03-28 17:32:23 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-03-28 17:32:23 +0100 |
commit | d02e6760412c7a96abbc4d0add5dd8d5e83bbe27 (patch) | |
tree | 4b6d1589095565bbd7064aa6b7217b69910bbae3 /libXfont/src/FreeType/ftfuncs.c | |
parent | 13d96866ca5d0e2be51f20a72da9e0f7032a16ea (diff) | |
download | vcxsrv-d02e6760412c7a96abbc4d0add5dd8d5e83bbe27.tar.gz vcxsrv-d02e6760412c7a96abbc4d0add5dd8d5e83bbe27.tar.bz2 vcxsrv-d02e6760412c7a96abbc4d0add5dd8d5e83bbe27.zip |
Update following packages:
libXfont-1.4.7
xproto-7.0.25
Diffstat (limited to 'libXfont/src/FreeType/ftfuncs.c')
-rw-r--r-- | libXfont/src/FreeType/ftfuncs.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libXfont/src/FreeType/ftfuncs.c b/libXfont/src/FreeType/ftfuncs.c index 918e3f37e..44e5e0288 100644 --- a/libXfont/src/FreeType/ftfuncs.c +++ b/libXfont/src/FreeType/ftfuncs.c @@ -2050,7 +2050,7 @@ restrict_code_range_by_str(int count,unsigned short *refFirstCol, { int nRanges = 0; int result = 0; - fsRange *ranges = NULL; + fsRange *ranges = NULL, *oldRanges; char const *p, *q; p = q = str; @@ -2119,10 +2119,13 @@ restrict_code_range_by_str(int count,unsigned short *refFirstCol, fflush(stderr); #endif nRanges++; + oldRanges = ranges; ranges = realloc(ranges, nRanges*sizeof(*ranges)); - if (NULL == ranges) + if (NULL == ranges) { + free(oldRanges); break; - { + } + else { fsRange *r = ranges+nRanges-1; r->min_char_low = minpoint & 0xff; @@ -2204,7 +2207,7 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals, strcpy(*dynStrRealFileName+dirLen, p2+1); capHead = p1; } else { - *dynStrRealFileName = xstrdup(fileName); + *dynStrRealFileName = strdup(fileName); if( *dynStrRealFileName == NULL ) { result = AllocError; goto quit; @@ -2289,13 +2292,11 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals, } } else{ - *dynStrFTFileName = malloc(strlen(*dynStrRealFileName)+1); + *dynStrFTFileName = strdup(*dynStrRealFileName); if( *dynStrFTFileName == NULL ){ result = AllocError; goto quit; } - **dynStrFTFileName = '\0'; - strcat(*dynStrFTFileName,*dynStrRealFileName); } } /* @@ -2549,7 +2550,7 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals, if (SPropRecValList_search_record(&listPropRecVal, &contRecValue, "CodeRange")) { - *dynStrTTCapCodeRange = xstrdup(SPropContainer_value_str(contRecValue)); + *dynStrTTCapCodeRange = strdup(SPropContainer_value_str(contRecValue)); if( *dynStrTTCapCodeRange == NULL ) { result = AllocError; goto quit; |