From fa3e7e6fa61d3b75de39dc2e7c9198bc56193d2d Mon Sep 17 00:00:00 2001 From: Paul Flo Williams Date: Feb 07 2013 20:30:58 +0000 Subject: Merge branch 'f18' Cleanup of patches wasn't committed to master --- diff --git a/fontforge-20100501-CVE-2010-4259.patch b/fontforge-20100501-CVE-2010-4259.patch deleted file mode 100644 index 0719761..0000000 --- a/fontforge-20100501-CVE-2010-4259.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- fontforge/fontforge/fvimportbdf.c 15 Apr 2010 10:47:36 -0000 1.58 -+++ fontforge/fontforge/fvimportbdf.c 3 Dec 2010 21:03:38 -0000 -@@ -560,7 +560,7 @@ - } - - if ( strcmp(tok,"FONT")==0 ) { -- if ( sscanf(buf,"-%*[^-]-%[^-]-%[^-]-%[^-]-%*[^-]-", family, weight, italic )!=0 ) { -+ if ( sscanf(buf,"-%*[^-]-%99[^-]-%99[^-]-%99[^-]-%*[^-]-", family, weight, italic )!=0 ) { - char *pt=buf; - int dcnt=0; - while ( *pt=='-' && dcnt<7 ) { ++pt; ++dcnt; } -@@ -616,26 +616,30 @@ - sscanf(buf, "%d", &defs->metricsset ); - else if ( strcmp(tok,"VVECTOR")==0 ) - sscanf(buf, "%*d %d", &defs->vertical_origin ); -+ /* For foundry, fontname and encname, only copy up to the buffer size */ - else if ( strcmp(tok,"FOUNDRY")==0 ) -- sscanf(buf, "%[^\"]", foundry ); -+ sscanf(buf, "%99[^\"]", foundry ); - else if ( strcmp(tok,"FONT_NAME")==0 ) -- sscanf(buf, "%[^\"]", fontname ); -+ sscanf(buf, "%99[^\"]", fontname ); - else if ( strcmp(tok,"CHARSET_REGISTRY")==0 ) -- sscanf(buf, "%[^\"]", encname ); -+ sscanf(buf, "%99[^\"]", encname ); - else if ( strcmp(tok,"CHARSET_ENCODING")==0 ) { - enc = 0; - if ( sscanf(buf, " %d", &enc )!=1 ) - sscanf(buf, "%d", &enc ); -+ /* These properties should be copied up to the buffer length too */ - } else if ( strcmp(tok,"FAMILY_NAME")==0 ) { -- strcpy(family,buf); -+ strncpy(family,buf,99); - } else if ( strcmp(tok,"FULL_NAME")==0 || strcmp(tok,"FACE_NAME")==0 ) { -- strcpy(full,buf); -+ strncpy(full,buf,99); - } else if ( strcmp(tok,"WEIGHT_NAME")==0 ) -- strcpy(weight,buf); -+ strncpy(weight,buf,99); - else if ( strcmp(tok,"SLANT")==0 ) -- strcpy(italic,buf); -+ strncpy(italic,buf,99); - else if ( strcmp(tok,"COPYRIGHT")==0 ) { -- strcpy(comments,buf); -+ /* LS: Assume the size of the passed-in buffer is 1000, see below in -+ * COMMENT */ -+ strncpy(comments,buf,999); - found_copyright = true; - } else if ( strcmp(tok,"COMMENT")==0 && !found_copyright ) { - char *pt = comments+strlen(comments); diff --git a/fontforge-20100501-python27.patch b/fontforge-20100501-python27.patch deleted file mode 100644 index dd4de07..0000000 --- a/fontforge-20100501-python27.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur fontforge-20100501.orig/fontforge/ffpython.h fontforge-20100501/fontforge/ffpython.h ---- fontforge-20100501.orig/fontforge/ffpython.h 2010-04-05 14:10:26.000000000 -0600 -+++ fontforge-20100501/fontforge/ffpython.h 2011-02-16 20:28:37.608104668 -0700 -@@ -62,7 +62,7 @@ - #define PyMODINIT_FUNC void - #endif - --#if PY_MAJOR_VERSION < 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 5) -+#if PY_MAJOR_VERSION < 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 7) - #define PyBytesObject PyStringObject - #define PyBytes_Type PyString_Type - diff --git a/fontforge-20100501-select-points-crash.patch b/fontforge-20100501-select-points-crash.patch deleted file mode 100644 index 90c9bde..0000000 --- a/fontforge-20100501-select-points-crash.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- fontforge-20100501.orig/fontforge/charview.c 2010-04-15 03:26:28.000000000 +0100 -+++ fontforge-20100501/fontforge/charview.c 2011-03-01 15:09:22.821753002 +0000 -@@ -8597,7 +8597,7 @@ - static int CVNumForePointsSelected(CharView *cv, BasePoint **bp) { - SplineSet *spl; - SplinePoint *test, *first; -- BasePoint *bps[4]; -+ BasePoint *bps[5]; - int i, cnt; - - if ( cv->b.drawmode!=dm_fore ) diff --git a/fontforge-20100501-splinesets.patch b/fontforge-20100501-splinesets.patch deleted file mode 100644 index 497758e..0000000 --- a/fontforge-20100501-splinesets.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -Nur fontforge-20100501.orig/fontforge/splineutil.c fontforge-20100501/fontforge/splineutil.c ---- fontforge-20100501.orig/fontforge/splineutil.c 2010-04-21 18:53:25.000000000 -0600 -+++ fontforge-20100501/fontforge/splineutil.c 2010-07-16 16:26:34.000000000 -0600 -@@ -4629,14 +4629,14 @@ - if ( r==NULL ) - return( NULL ); - spl = r->layers[0].splines; -- r = r->next; -+ do { r = r->next; } while ( r!=NULL && r->layers[0].splines==NULL ); - } - while ( r!=NULL ) { - while ( spl!=NULL && spl->next!=r->layers[0].splines ) - spl = spl->next; - spl->next = NULL; - spl = r->layers[0].splines; -- r = r->next; -+ do { r = r->next; } while ( r!=NULL && r->layers[0].splines==NULL ); - } - return( layer->splines ); - } diff --git a/fontforge-20100501-unicode-crash.patch b/fontforge-20100501-unicode-crash.patch deleted file mode 100644 index c3ec6a4..0000000 --- a/fontforge-20100501-unicode-crash.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur fontforge-20100501/fontforge/fvcomposit.c fontforge-20100501.orig/fontforge/fvcomposit.c ---- fontforge-20100501/fontforge/fvcomposit.c 2011-02-16 20:33:29.632880857 -0700 -+++ fontforge-20100501.orig/fontforge/fvcomposit.c 2010-04-05 14:10:26.000000000 -0600 -@@ -1337,7 +1337,7 @@ - unicodeenc==0x1fef || unicodeenc==0x1ffd || unicodeenc==0x1ffe)) - return( false ); - -- if ( iszerowidth(unicodeenc) || -+ if ((unicodeenc <= 0xffff && iszerowidth(unicodeenc)) || - (unicodeenc>=0x2000 && unicodeenc<=0x2015 )) - return( !onlyaccents ); - diff --git a/fontforge-20110222-libpng15.patch b/fontforge-20110222-libpng15.patch deleted file mode 100644 index 156e3c1..0000000 --- a/fontforge-20110222-libpng15.patch +++ /dev/null @@ -1,176 +0,0 @@ -From e76a8a537dbf8c47024f5863f9f18ed55ad686d3 Mon Sep 17 00:00:00 2001 -From: michal-n -Date: Sat, 17 Dec 2011 15:24:12 +0100 -Subject: [PATCH] There was no need to panic... - The patch from Paul contained errant reference to 'png_color16'. - The correct form is 'png_color_16'. So, patch reapplied. - ---- - gutils/gimagewritepng.c | 100 +++++++++++++++++++++++----------------------- - 1 files changed, 50 insertions(+), 50 deletions(-) - -diff --git a/gutils/gimagewritepng.c b/gutils/gimagewritepng.c -index 43fa097..a88ec63 100644 ---- a/gutils/gimagewritepng.c -+++ b/gutils/gimagewritepng.c -@@ -236,6 +236,7 @@ return(false); - } - } else { - if ( base->trans!=-1 ) { -+ trans_color = galloc(sizeof(png_color_16)); - trans_color->red = COLOR_RED(base->trans); - trans_color->green = COLOR_GREEN(base->trans); - trans_color->blue = COLOR_BLUE(base->trans); -@@ -258,6 +259,7 @@ return(false); - _png_write_end(png_ptr, info_ptr); - - if ( trans_alpha!=NULL ) gfree(trans_alpha); -+ if ( trans_color!=NULL ) gfree(trans_color); - if ( palette!=NULL ) gfree(palette); - _png_destroy_write_struct(&png_ptr, &info_ptr); - gfree(rows); -@@ -296,7 +298,7 @@ static void user_error_fn(png_structp png_ptr, png_const_charp error_msg) { - #if (PNG_LIBPNG_VER < 10500) - longjmp(png_ptr->jmpbuf,1); - #else -- _png_longjmp (png_ptr, 1); -+ png_longjmp (png_ptr, 1); - #endif - } - -@@ -310,6 +312,12 @@ int GImageWrite_Png(GImage *gi, FILE *fp, int progressive) { - png_infop info_ptr; - png_byte **rows; - int i; -+ int bit_depth; -+ int color_type; -+ int num_palette; -+ png_bytep trans_alpha = NULL; -+ png_color_16p trans_color = NULL; -+ png_colorp palette = NULL; - - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, - (void *)NULL, user_error_fn, user_warning_fn); -@@ -336,65 +344,60 @@ return(false); - - png_init_io(png_ptr, fp); - -- info_ptr->width = base->width; -- info_ptr->height = base->height; -- info_ptr->bit_depth = 8; -- info_ptr->valid = 0; -- info_ptr->interlace_type = progressive; -- if ( base->trans!=-1 ) { -- info_ptr->num_trans = 1; -- info_ptr->valid |= PNG_INFO_tRNS; -+ bit_depth = 8; -+ num_palette = base->clut==NULL?2:base->clut->clut_len; -+ if ( base->image_type==it_index || base->image_type==it_bitmap ) { -+ color_type = PNG_COLOR_TYPE_PALETTE; -+ if ( num_palette<=2 ) -+ bit_depth=1; -+ else if ( num_palette<=4 ) -+ bit_depth=2; -+ else if ( num_palette<=16 ) -+ bit_depth=4; -+ } else { -+ color_type = PNG_COLOR_TYPE_RGB; -+ if ( base->image_type == it_rgba ) -+ color_type = PNG_COLOR_TYPE_RGB_ALPHA; - } -+ -+ png_set_IHDR(png_ptr, info_ptr, base->width, base->height, -+ bit_depth, color_type, progressive, -+ PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); - if ( base->image_type==it_index || base->image_type==it_bitmap ) { -- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE; -- info_ptr->valid |= PNG_INFO_PLTE; -- info_ptr->num_palette = base->clut==NULL?2:base->clut->clut_len; -- info_ptr->palette = (png_color *) galloc(info_ptr->num_palette*sizeof(png_color)); -+ palette = (png_color *) galloc(num_palette*sizeof(png_color)); - if ( base->clut==NULL ) { -- info_ptr->palette[0].red = info_ptr->palette[0].green = info_ptr->palette[0].blue = 0; -- info_ptr->palette[1].red = info_ptr->palette[1].green = info_ptr->palette[1].blue = 0xff; -+ palette[0].red = palette[0].green = palette[0].blue = 0; -+ palette[1].red = palette[1].green = palette[1].blue = 0xff; - } else { -- for ( i=0; inum_palette; ++i ) { -+ for ( i=0; iclut->clut[i]; -- info_ptr->palette[i].red = COLOR_RED(col); -- info_ptr->palette[i].green = COLOR_GREEN(col); -- info_ptr->palette[i].blue = COLOR_BLUE(col); -+ palette[i].red = COLOR_RED(col); -+ palette[i].green = COLOR_GREEN(col); -+ palette[i].blue = COLOR_BLUE(col); - } - } -- if ( info_ptr->num_palette<=2 ) -- info_ptr->bit_depth=1; -- else if ( info_ptr->num_palette<=4 ) -- info_ptr->bit_depth=2; -- else if ( info_ptr->num_palette<=16 ) -- info_ptr->bit_depth=4; -- if ( info_ptr->num_palette<=16 ) -+ png_set_PLTE(png_ptr, info_ptr, palette, num_palette); -+ if ( num_palette<=16 ) - png_set_packing(png_ptr); -+ - if ( base->trans!=-1 ) { --#if ( PNG_LIBPNG_VER_MAJOR > 1 || PNG_LIBPNG_VER_MINOR > 2 ) -- info_ptr->trans_alpha = galloc(1); -- info_ptr->trans_alpha[0] = base->trans; --#else -- info_ptr->trans = galloc(1); -- info_ptr->trans[0] = base->trans; --#endif -+ trans_alpha = galloc(1); -+ trans_alpha[0] = base->trans; - } - } else { -- info_ptr->color_type = PNG_COLOR_TYPE_RGB; - if ( base->trans!=-1 ) { --#if ( PNG_LIBPNG_VER_MAJOR > 1 || PNG_LIBPNG_VER_MINOR > 2 ) -- info_ptr->trans_color.red = COLOR_RED(base->trans); -- info_ptr->trans_color.green = COLOR_GREEN(base->trans); -- info_ptr->trans_color.blue = COLOR_BLUE(base->trans); --#else -- info_ptr->trans_values.red = COLOR_RED(base->trans); -- info_ptr->trans_values.green = COLOR_GREEN(base->trans); -- info_ptr->trans_values.blue = COLOR_BLUE(base->trans); --#endif -+ trans_color = galloc(sizeof(png_color_16)); -+ trans_color->red = COLOR_RED(base->trans); -+ trans_color->green = COLOR_GREEN(base->trans); -+ trans_color->blue = COLOR_BLUE(base->trans); - } - } -+ if ( base->trans!=-1 ) { -+ png_set_tRNS(png_ptr, info_ptr, trans_alpha, 1, trans_color); -+ } - png_write_info(png_ptr, info_ptr); - -- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB) -+ if (color_type == PNG_COLOR_TYPE_RGB) - png_set_filler(png_ptr, '\0', PNG_FILLER_BEFORE); - - rows = galloc(base->height*sizeof(png_byte *)); -@@ -405,12 +408,9 @@ return(false); - - png_write_end(png_ptr, info_ptr); - --#if ( PNG_LIBPNG_VER_MAJOR > 1 || PNG_LIBPNG_VER_MINOR > 2 ) -- if ( info_ptr->trans_alpha!=NULL ) gfree(info_ptr->trans_alpha); --#else -- if ( info_ptr->trans!=NULL ) gfree(info_ptr->trans); --#endif -- if ( info_ptr->palette!=NULL ) gfree(info_ptr->palette); -+ if ( trans_alpha!=NULL ) gfree(trans_alpha); -+ if ( trans_color!=NULL ) gfree(trans_color); -+ if ( palette!=NULL ) gfree(palette); - png_destroy_write_struct(&png_ptr, &info_ptr); - gfree(rows); - return( 1 ); --- -1.7.4.1 - diff --git a/fontforge-20110222-multilib.patch b/fontforge-20110222-multilib.patch deleted file mode 100644 index 79e5bc1..0000000 --- a/fontforge-20110222-multilib.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.bak 2011-02-19 00:55:16.000000000 +0530 -+++ configure 2011-04-07 10:43:26.442012820 +0530 -@@ -4676,7 +4676,7 @@ - LIBS="-Wl,/System/Library/Frameworks/CoreServices.framework/CoreServices $LIBS" - - ;; --powerpc-*-*linux*) -+powerpc*-*-*linux*) - $as_echo "#define _Keyboard 3" >>confdefs.h - - ;;