From ac8a1e43ef507df02310bb55be546bf74c935271 Mon Sep 17 00:00:00 2001 From: D Haley Date: Mon, 26 Jul 2010 17:14:33 +1000 Subject: [PATCH] * Import patches from upstream SVN to fix major bugs - Bad SVG output - large memleak for all C++ graphs --- debian/patches/series | 2 ++ debian/patches/upstream-mgl-memleak.patch | 23 +++++++++++++++++++++ debian/patches/upstream-svg-namespace.patch | 14 +++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 debian/patches/upstream-mgl-memleak.patch create mode 100644 debian/patches/upstream-svg-namespace.patch diff --git a/debian/patches/series b/debian/patches/series index 1e69804..599d111 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,5 @@ examples-ldflags.patch mglview-ldflags.patch parallel-build-png.patch +upstream-svg-namespace.patch +upstream-mgl-memleak.patch diff --git a/debian/patches/upstream-mgl-memleak.patch b/debian/patches/upstream-mgl-memleak.patch new file mode 100644 index 0000000..c4052cd --- /dev/null +++ b/debian/patches/upstream-mgl-memleak.patch @@ -0,0 +1,23 @@ +* import upstream SVN patch (r106) to fix large memleak in C++ graph object +Index: mathgl-1.10.2.1/mgl/mgl_ab.cpp +=================================================================== +--- mathgl-1.10.2.1.orig/mgl/mgl_ab.cpp 2010-07-26 17:12:49.000000000 +1000 ++++ mathgl-1.10.2.1/mgl/mgl_ab.cpp 2010-07-26 17:13:04.000000000 +1000 +@@ -44,7 +44,7 @@ + } + //----------------------------------------------------------------------------- + mglGraphAB::~mglGraphAB() +-{ if(G) { delete []G; delete []G4; } } ++{ if(G) { delete []G; delete []G4; delete []OI; } } + //----------------------------------------------------------------------------- + void mglGraphAB::Pop() + { +@@ -370,7 +370,7 @@ + if(font && strchr(font, 'a')) { Labelw(p.x, p.y, wcs,font,size,true); return; } + + wchar_t *wcl; +- int wn=0; ++ unsigned wn=0; + const wchar_t *wnl=0; + for(wn=0;wn\n"); + fprintf(fp,"\n"); +- fprintf(fp,"\n",Width,Height); ++ fprintf(fp,"\n",Width,Height); + + fprintf(fp,"\n"); + fprintf(fp,"\n\n\n",descr?descr:fname,ctime(&now)); -- 2.30.2