diff -Nru snaphu-1.4.2/debian/changelog snaphu-1.4.2/debian/changelog --- snaphu-1.4.2/debian/changelog 2013-07-12 20:47:05.000000000 +0000 +++ snaphu-1.4.2/debian/changelog 2017-08-07 21:51:10.000000000 +0000 @@ -1,3 +1,25 @@ +snaphu (1.4.2-3) unstable; urgency=medium + + [ Antonio Valentino ] + * debian/control + - Standard version bumped to 4.0.0 (no change) + - fixed VCS fields + - reformatted by cme + * debian/copyright + - use secure URI for copyright format + - checked with cme + * debian/patches + - refresh all patches + - renumber patches + - fix spelling error in snaphu.1 + * debian/rules + - enable hardening flags + + [ Bas Couwenberg ] + * Add gbp.conf to use pristine-tar by default. + + -- Antonio Valentino Mon, 07 Aug 2017 21:51:10 +0000 + snaphu (1.4.2-2) unstable; urgency=low * Updated homapage URL and watch file diff -Nru snaphu-1.4.2/debian/control snaphu-1.4.2/debian/control --- snaphu-1.4.2/debian/control 2013-07-12 20:47:05.000000000 +0000 +++ snaphu-1.4.2/debian/control 2017-08-07 21:51:10.000000000 +0000 @@ -1,17 +1,19 @@ Source: snaphu -Section: non-free/science -Priority: optional Maintainer: Debian GIS Project Uploaders: Antonio Valentino +Section: non-free/science +XS-Autobuild: no +Priority: optional Build-Depends: debhelper (>= 9.0.0) -Standards-Version: 3.9.4 +Standards-Version: 4.0.0 +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-grass/snaphu.git +Vcs-Git: https://anonscm.debian.org/git/pkg-grass/snaphu.git Homepage: http://www.stanford.edu/group/radar/softwareandlinks/sw/snaphu/ -Vcs-Git: git://anonscm.debian.org/pkg-grass/snaphu.git -Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-grass/snaphu.git Package: snaphu Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, + ${misc:Depends} Description: Statistical-Cost, Network-Flow Algorithm for 2D Phase Unwrapping Two-dimensional phase unwrapping is the process of recovering unambiguous phase data from a 2-D array of phase values known only diff -Nru snaphu-1.4.2/debian/copyright snaphu-1.4.2/debian/copyright --- snaphu-1.4.2/debian/copyright 2013-07-12 20:47:05.000000000 +0000 +++ snaphu-1.4.2/debian/copyright 2017-08-07 21:51:10.000000000 +0000 @@ -1,10 +1,10 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: snaphu Source: http://www-star.stanford.edu/sar_group/snaphu Files: * Copyright: 2002 Board of Trustees, Leland Stanford Jr. University -License: +License: other Except as noted below, permission to use, copy, modify, and distribute, this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice @@ -50,7 +50,7 @@ Files: src/snaphu_cs2* Copyright: 1995 IG Systems, Inc -License: +License: igsys Permission to use for evaluation purposes is granted provided that proper acknowledgments are given. For a commercial licence, contact igsys@eclipse.net. @@ -82,4 +82,3 @@ . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". - diff -Nru snaphu-1.4.2/debian/gbp.conf snaphu-1.4.2/debian/gbp.conf --- snaphu-1.4.2/debian/gbp.conf 1970-01-01 00:00:00.000000000 +0000 +++ snaphu-1.4.2/debian/gbp.conf 2017-08-07 21:51:10.000000000 +0000 @@ -0,0 +1,16 @@ +[DEFAULT] + +# The default name for the upstream branch is "upstream". +# Change it if the name is different (for instance, "master"). +upstream-branch = upstream + +# The default name for the Debian branch is "master". +# Change it if the name is different (for instance, "debian/unstable"). +debian-branch = master + +# git-import-orig uses the following names for the upstream tags. +# Change the value if you are not using git-import-orig +upstream-tag = upstream/%(version)s + +# Always use pristine-tar. +pristine-tar = True diff -Nru snaphu-1.4.2/debian/patches/0001-fix-compilation-warnings.patch snaphu-1.4.2/debian/patches/0001-fix-compilation-warnings.patch --- snaphu-1.4.2/debian/patches/0001-fix-compilation-warnings.patch 1970-01-01 00:00:00.000000000 +0000 +++ snaphu-1.4.2/debian/patches/0001-fix-compilation-warnings.patch 2017-08-07 21:51:10.000000000 +0000 @@ -0,0 +1,164 @@ +From: Debian GIS Project +Date: Mon, 7 Aug 2017 21:34:46 +0000 +Subject: fix-compilation-warnings + +Fix a few compilation warning and also prevent a segfault when logging is enabled. +--- + src/snaphu_cost.c | 8 ++++---- + src/snaphu_cs2.c | 1 + + src/snaphu_io.c | 1 + + src/snaphu_solver.c | 4 ++-- + src/snaphu_tile.c | 18 +++++++++--------- + src/snaphu_util.c | 1 + + 6 files changed, 18 insertions(+), 15 deletions(-) + +diff --git a/src/snaphu_cost.c b/src/snaphu_cost.c +index f7a14e1..339137b 100644 +--- a/src/snaphu_cost.c ++++ b/src/snaphu_cost.c +@@ -40,11 +40,11 @@ void BuildCostArrays(void ***costsptr, short ***mstcostsptr, + outfileT *outfiles){ + + long row, col, maxcol, tempcost; +- long poscost, negcost, costtypesize; ++ long poscost, negcost, costtypesize=0; + float **pwr, **corr; +- short **weights, **rowweight, **colweight, **scalarcosts; +- void **costs, **rowcost, **colcost; +- void (*CalcStatCost)(); ++ short **weights, **rowweight, **colweight, **scalarcosts=NULL; ++ void **costs, **rowcost=NULL, **colcost=NULL; ++ void (*CalcStatCost)()=NULL; + + /* read weights */ + weights=NULL; +diff --git a/src/snaphu_cs2.c b/src/snaphu_cs2.c +index 0c3f9b2..a9f4641 100644 +--- a/src/snaphu_cs2.c ++++ b/src/snaphu_cs2.c +@@ -637,6 +637,7 @@ register double p_max, /* current maximal price */ + i_price, /* price of node i */ + dp; /* current arc partial residual cost */ + ++a_max = NULL; + p_max = price_min; + i_price = i -> price; + +diff --git a/src/snaphu_io.c b/src/snaphu_io.c +index 812b79b..9f0beb1 100644 +--- a/src/snaphu_io.c ++++ b/src/snaphu_io.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/snaphu_solver.c b/src/snaphu_solver.c +index 09e284c..8c86c6f 100644 +--- a/src/snaphu_solver.c ++++ b/src/snaphu_solver.c +@@ -53,7 +53,7 @@ long TreeSolve(nodeT **nodes, nodesuppT **nodesupp, nodeT *ground, + candidateT *candidatelist, *candidatebag, *tempcandidateptr; + nodeT *from, *to, *cycleapex, *node1, *node2, *leavingparent, *leavingchild; + nodeT *root, *mntpt, *oldmntpt, *skipthread, *tempnode1, *tempnode2; +- nodeT *firstfromnode, *firsttonode; ++ nodeT *firstfromnode=NULL, *firsttonode=NULL; + nodeT **apexlist; + float **unwrappedphase; + +@@ -2203,7 +2203,7 @@ long DischargeTree(nodeT *source, short **mstcosts, short **flows, + signed char **residue, signed char **arcstatus, + nodeT **nodes, nodeT *ground, long nrow, long ncol){ + +- long row, col, todir, arcrow, arccol, arcdir; ++ long row, col=0, todir=0, arcrow, arccol, arcdir; + long arcnum, upperarcnum, ngroundarcs; + nodeT *from, *to, *nextnode; + nodesuppT **nodesupp; +diff --git a/src/snaphu_tile.c b/src/snaphu_tile.c +index 096040f..61719aa 100644 +--- a/src/snaphu_tile.c ++++ b/src/snaphu_tile.c +@@ -172,9 +172,9 @@ void GrowRegions(void **costs, short **flows, long nrow, long ncol, + long i, row, col, maxcol; + long arcrow, arccol, arcnum, fromdist, arcdist; + long regioncounter, *regionsizes, regionsizeslen, *thisregionsize; +- long closestregiondist, closestregion, lastfromdist; ++ long closestregiondist, closestregion=0, lastfromdist; + long costthresh, minsize, maxcost; +- short **regions; ++ short **regions=NULL; + nodeT **nodes; + nodeT *source, *from, *to, *ground; + char regionfile[MAXSTRLEN]; +@@ -887,8 +887,8 @@ void AssembleTiles(outfileT *outfiles, paramT *params, + long nlines, long linelen){ + + long tilerow, tilecol, ntilerow, ntilecol, ntiles, rowovrlp, colovrlp; +- long i, j, k, ni, nj, dummylong, costtypesize; +- long nrow, ncol, prevnrow, prevncol, nextnrow, nextncol; ++ long i, j, k, ni, nj, dummylong, costtypesize=0; ++ long nrow, ncol, prevnrow=0, prevncol, nextnrow, nextncol; + long n, ncycle, nflowdone, nflow, candidatelistsize, candidatebagsize; + long nnodes, maxnflowcycles, arclen, narcs, sourcetilenum, flowmax; + long *totarclens; +@@ -1195,7 +1195,7 @@ void ReadNextRegion(long tilerow, long tilecol, long nlines, long linelen, + void ***nextcostsptr, + long *nextnrowptr, long *nextncolptr){ + +- long nexttilelinelen, nexttilenlines, costtypesize; ++ long nexttilelinelen, nexttilenlines, costtypesize=0; + tileparamT nexttileparams[1]; + outfileT nexttileoutfiles[1]; + char nextfile[MAXSTRLEN], tempstring[MAXTMPSTRLEN]; +@@ -1315,7 +1315,7 @@ void ReadEdgesAboveAndBelow(long tilerow, long tilecol, long nlines, + float *unwphaseabove, float *unwphasebelow, + void *costsabove, void *costsbelow){ + +- long ni, nj, readtilelinelen, readtilenlines, costtypesize; ++ long ni, nj, readtilelinelen, readtilenlines, costtypesize=0; + long ntilerow, ntilecol, rowovrlp, colovrlp; + tileparamT tileparams[1]; + outfileT outfilesabove[1], outfilesbelow[1]; +@@ -1487,7 +1487,7 @@ void TraceRegions(short **regions, short **nextregions, short **lastregions, + short *nscndryarcs, long *totarclens, short **bulkoffsets, + paramT *params){ + +- long i, j, row, col, nnrow, nncol, tilenum, costtypesize; ++ long i, j, row, col, nnrow, nncol, tilenum, costtypesize=0; + long nnewnodes, nnewarcs, npathsout, flowmax, totarclen; + long nupdatednontilenodes, updatednontilenodesize, ntilecol; + short **flows; +@@ -2383,7 +2383,7 @@ void TraceSecondaryArc(nodeT *primaryhead, nodeT **scndrynodes, + long mincost, mincostflow; + long *scndrycostarr; + long double templongdouble; +- double sigsq, sumsigsqinv, tempdouble, tileedgearcweight; ++ double sigsq=0, sumsigsqinv, tempdouble, tileedgearcweight; + short **flows; + void **costs; + nodeT *tempnode, *primarytail, *scndrytail, *scndryhead; +@@ -2922,7 +2922,7 @@ void IntegrateSecondaryFlows(long linelen, long nlines, nodeT **scndrynodes, + FILE *outfp; + float **unwphase, **tileunwphase, **mag, **tilemag; + float *outline; +- long row, col, colstart, nrow, ncol, nnrow, nncol, maxcol; ++ long row, col, colstart, nrow=0, ncol, nnrow, nncol, maxcol; + long readtilelinelen, readtilenlines, nextcoloffset, nextrowoffset; + long tilerow, tilecol, ntilerow, ntilecol, rowovrlp, colovrlp; + long ni, nj, tilenum; +diff --git a/src/snaphu_util.c b/src/snaphu_util.c +index bb1422d..e66189b 100644 +--- a/src/snaphu_util.c ++++ b/src/snaphu_util.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff -Nru snaphu-1.4.2/debian/patches/0002-man-page-hyphens.patch snaphu-1.4.2/debian/patches/0002-man-page-hyphens.patch --- snaphu-1.4.2/debian/patches/0002-man-page-hyphens.patch 1970-01-01 00:00:00.000000000 +0000 +++ snaphu-1.4.2/debian/patches/0002-man-page-hyphens.patch 2017-08-07 21:51:10.000000000 +0000 @@ -0,0 +1,124 @@ +From: Debian GIS Project +Date: Mon, 7 Aug 2017 21:34:46 +0000 +Subject: man-page-hyphens + +Escape hyphens in the manpage. +--- + man/man1/snaphu.1 | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) + +diff --git a/man/man1/snaphu.1 b/man/man1/snaphu.1 +index 8cf83f1..f1befef 100644 +--- a/man/man1/snaphu.1 ++++ b/man/man1/snaphu.1 +@@ -348,15 +348,15 @@ file whose name is compiled into the program): + .fi + + Unwrap the same file as above, but use brightness information from the +-file ``ampfile,'' set the perpendicular baseline to -165 m at ++file ``ampfile,'' set the perpendicular baseline to \-165 m at + midswath, and place the output in a file called ``unwrappedfile'' + (coherence data are generated automatically if ``wrappedfile'' + contains complex data and ``ampfile'' contains amplitude data from + both SAR images): + + .nf +- snaphu wrappedfile 1024 -a ampfile \\\ +- -b -165 -o unwrappedfile ++ snaphu wrappedfile 1024 \-a ampfile \\\ ++ \-b \-165 \-o unwrappedfile + .fi + + Unwrap the interferogram as above, but read correlation +@@ -364,8 +364,8 @@ information from the file ``corrfile'' instead of generating it from + the interferogram and amplitude data: + + .nf +- snaphu wrappedfile 1024 -a ampfile -c corrfile \\\ +- -b -165 -o unwrappedfile ++ snaphu wrappedfile 1024 \-a ampfile \-c corrfile \\\ ++ \-b \-165 \-o unwrappedfile + .fi + + The following is equivalent to the previous example, but input +@@ -377,29 +377,29 @@ displayed: + # This is a comment line which will be ignored + AMPFILE ampfile + CORRFILE corrfile +- BPERP -165 ++ BPERP \-165 + OUTFILE unwrappedfile + + +- snaphu -v -f configfile wrappedfile 1024 ++ snaphu \-v \-f configfile wrappedfile 1024 + .fi + + Unwrap the same interferogram, but use only the MST initialization + (with scalar statistical weights) and write the output to ``mstfile'': + + .nf +- snaphu -f configfile -i wrappedfile 1024 -o mstfile ++ snaphu \-f configfile \-i wrappedfile 1024 \-o mstfile + .fi + + Read the unwrapped data in ``mstfile'' and use that as the + initialization to the modified network-simplex solver: + + .nf +- snaphu -f configfile -u mstfile 1024 -o unwrappedfile ++ snaphu \-f configfile \-u mstfile 1024 \-o unwrappedfile + .fi + + Note that in the previous two examples, the output file name in the +-configuration file is overrided by the one given on the command line. ++configuration file is overridden by the one given on the command line. + The previous two commands together are in principle equivalent to the + preceding one, although round-off errors in flow-to-phase conversions + may cause minor differences +@@ -408,7 +408,7 @@ Unwrap the interferogram as above, but use the MCF algorithm for + initialization: + + .nf +- snaphu -f configfile wrappedfile 1024 --mcf ++ snaphu \-f configfile wrappedfile 1024 \--mcf + .fi + + Unwrap the interferogram once again, but first flatten it with the +@@ -416,7 +416,7 @@ unwrapped data in ``estfile,'' then reinsert the subtracted phase + after unwrapping: + + .nf +- snaphu -f configfile wrappedfile 1024 -e estfile ++ snaphu \-f configfile wrappedfile 1024 \-e estfile + .fi + + The following assumes that the wrapped input interferogram measures +@@ -424,14 +424,14 @@ deformation, not topography. Unwrap the interferogram with the given + correlation data: + + .nf +- snaphu -d wrappedfile 1024 -c corrfile ++ snaphu \-d wrappedfile 1024 \-c corrfile + .fi + + Unwrap the input interferogram by minimizing the unweighted congruent + L2 norm: + + .nf +- snaphu -p 2 -n wrappedfile 1024 ++ snaphu \-p 2 \-n wrappedfile 1024 + .fi + + Unwrap the interferogram as a three-by-four set of tiles that overlap +@@ -439,8 +439,8 @@ by 30 pixels, with the specified configuration file, using two + processors: + + .nf +- snaphu wrappedfile 1024 -f configfile \\\ +- --tile 3 4 30 30 --nproc 2 ++ snaphu wrappedfile 1024 \-f configfile \\\ ++ \--tile 3 4 30 30 \--nproc 2 + .fi + + .SH "HINTS AND TIPS" diff -Nru snaphu-1.4.2/debian/patches/0003-hardening.patch snaphu-1.4.2/debian/patches/0003-hardening.patch --- snaphu-1.4.2/debian/patches/0003-hardening.patch 1970-01-01 00:00:00.000000000 +0000 +++ snaphu-1.4.2/debian/patches/0003-hardening.patch 2017-08-07 21:51:10.000000000 +0000 @@ -0,0 +1,35 @@ +From: Debian GIS Project +Date: Mon, 7 Aug 2017 21:34:46 +0000 +Subject: hardening + +CFLAGS setup has been modified to extent the settings of the external +environment. +CPPFLAGS and LDFLAGS are now used during the build phase. +--- + src/Makefile | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index d008a0b..93b3762 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -13,8 +13,8 @@ + # If you specify -D NO_CS2, the program will be compiled without the + # CS2 MCF solver module. + +-CC = cc +-CFLAGS = -O3 # -D NO_CS2 ++#CC = cc ++CFLAGS += -O3 # -D NO_CS2 + LIBS = -lm + BINDIR = ../bin + INSTALLDIR = /usr/local/bin +@@ -32,7 +32,7 @@ OBJS = snaphu_tile.o \ + all: $(SNAPHU) + + $(SNAPHU): snaphu.c $(OBJS) snaphu.h Makefile +- $(CC) $(CFLAGS) \ ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \ + snaphu.c \ + $(OBJS) \ + -o $(SNAPHU) \ diff -Nru snaphu-1.4.2/debian/patches/fix-compilation-warnings.patch snaphu-1.4.2/debian/patches/fix-compilation-warnings.patch --- snaphu-1.4.2/debian/patches/fix-compilation-warnings.patch 2013-07-12 20:47:05.000000000 +0000 +++ snaphu-1.4.2/debian/patches/fix-compilation-warnings.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,139 +0,0 @@ -Fix a few compilation warning and also prevent a segfault when logging is enabled. ---- a/src/snaphu_cost.c -+++ b/src/snaphu_cost.c -@@ -40,11 +40,11 @@ - outfileT *outfiles){ - - long row, col, maxcol, tempcost; -- long poscost, negcost, costtypesize; -+ long poscost, negcost, costtypesize=0; - float **pwr, **corr; -- short **weights, **rowweight, **colweight, **scalarcosts; -- void **costs, **rowcost, **colcost; -- void (*CalcStatCost)(); -+ short **weights, **rowweight, **colweight, **scalarcosts=NULL; -+ void **costs, **rowcost=NULL, **colcost=NULL; -+ void (*CalcStatCost)()=NULL; - - /* read weights */ - weights=NULL; ---- a/src/snaphu_io.c -+++ b/src/snaphu_io.c -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include - #include - #include ---- a/src/snaphu_util.c -+++ b/src/snaphu_util.c -@@ -18,6 +18,7 @@ - #include - #include - #include -+#include - #include - #include - #include ---- a/src/snaphu_solver.c -+++ b/src/snaphu_solver.c -@@ -53,7 +53,7 @@ - candidateT *candidatelist, *candidatebag, *tempcandidateptr; - nodeT *from, *to, *cycleapex, *node1, *node2, *leavingparent, *leavingchild; - nodeT *root, *mntpt, *oldmntpt, *skipthread, *tempnode1, *tempnode2; -- nodeT *firstfromnode, *firsttonode; -+ nodeT *firstfromnode=NULL, *firsttonode=NULL; - nodeT **apexlist; - float **unwrappedphase; - -@@ -2203,7 +2203,7 @@ - signed char **residue, signed char **arcstatus, - nodeT **nodes, nodeT *ground, long nrow, long ncol){ - -- long row, col, todir, arcrow, arccol, arcdir; -+ long row, col=0, todir=0, arcrow, arccol, arcdir; - long arcnum, upperarcnum, ngroundarcs; - nodeT *from, *to, *nextnode; - nodesuppT **nodesupp; ---- a/src/snaphu_tile.c -+++ b/src/snaphu_tile.c -@@ -172,9 +172,9 @@ - long i, row, col, maxcol; - long arcrow, arccol, arcnum, fromdist, arcdist; - long regioncounter, *regionsizes, regionsizeslen, *thisregionsize; -- long closestregiondist, closestregion, lastfromdist; -+ long closestregiondist, closestregion=0, lastfromdist; - long costthresh, minsize, maxcost; -- short **regions; -+ short **regions=NULL; - nodeT **nodes; - nodeT *source, *from, *to, *ground; - char regionfile[MAXSTRLEN]; -@@ -887,8 +887,8 @@ - long nlines, long linelen){ - - long tilerow, tilecol, ntilerow, ntilecol, ntiles, rowovrlp, colovrlp; -- long i, j, k, ni, nj, dummylong, costtypesize; -- long nrow, ncol, prevnrow, prevncol, nextnrow, nextncol; -+ long i, j, k, ni, nj, dummylong, costtypesize=0; -+ long nrow, ncol, prevnrow=0, prevncol, nextnrow, nextncol; - long n, ncycle, nflowdone, nflow, candidatelistsize, candidatebagsize; - long nnodes, maxnflowcycles, arclen, narcs, sourcetilenum, flowmax; - long *totarclens; -@@ -1195,7 +1195,7 @@ - void ***nextcostsptr, - long *nextnrowptr, long *nextncolptr){ - -- long nexttilelinelen, nexttilenlines, costtypesize; -+ long nexttilelinelen, nexttilenlines, costtypesize=0; - tileparamT nexttileparams[1]; - outfileT nexttileoutfiles[1]; - char nextfile[MAXSTRLEN], tempstring[MAXTMPSTRLEN]; -@@ -1315,7 +1315,7 @@ - float *unwphaseabove, float *unwphasebelow, - void *costsabove, void *costsbelow){ - -- long ni, nj, readtilelinelen, readtilenlines, costtypesize; -+ long ni, nj, readtilelinelen, readtilenlines, costtypesize=0; - long ntilerow, ntilecol, rowovrlp, colovrlp; - tileparamT tileparams[1]; - outfileT outfilesabove[1], outfilesbelow[1]; -@@ -1487,7 +1487,7 @@ - short *nscndryarcs, long *totarclens, short **bulkoffsets, - paramT *params){ - -- long i, j, row, col, nnrow, nncol, tilenum, costtypesize; -+ long i, j, row, col, nnrow, nncol, tilenum, costtypesize=0; - long nnewnodes, nnewarcs, npathsout, flowmax, totarclen; - long nupdatednontilenodes, updatednontilenodesize, ntilecol; - short **flows; -@@ -2383,7 +2383,7 @@ - long mincost, mincostflow; - long *scndrycostarr; - long double templongdouble; -- double sigsq, sumsigsqinv, tempdouble, tileedgearcweight; -+ double sigsq=0, sumsigsqinv, tempdouble, tileedgearcweight; - short **flows; - void **costs; - nodeT *tempnode, *primarytail, *scndrytail, *scndryhead; -@@ -2922,7 +2922,7 @@ - FILE *outfp; - float **unwphase, **tileunwphase, **mag, **tilemag; - float *outline; -- long row, col, colstart, nrow, ncol, nnrow, nncol, maxcol; -+ long row, col, colstart, nrow=0, ncol, nnrow, nncol, maxcol; - long readtilelinelen, readtilenlines, nextcoloffset, nextrowoffset; - long tilerow, tilecol, ntilerow, ntilecol, rowovrlp, colovrlp; - long ni, nj, tilenum; ---- a/src/snaphu_cs2.c -+++ b/src/snaphu_cs2.c -@@ -637,6 +637,7 @@ - i_price, /* price of node i */ - dp; /* current arc partial residual cost */ - -+a_max = NULL; - p_max = price_min; - i_price = i -> price; - diff -Nru snaphu-1.4.2/debian/patches/hardening.patch snaphu-1.4.2/debian/patches/hardening.patch --- snaphu-1.4.2/debian/patches/hardening.patch 2013-07-12 20:47:05.000000000 +0000 +++ snaphu-1.4.2/debian/patches/hardening.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -CFLAGS setup has been modified to extent the settings of the external -environment. -CPPFLAGS and LDFLAGS are now used during the build phase. ---- a/src/Makefile -+++ b/src/Makefile -@@ -13,8 +13,8 @@ - # If you specify -D NO_CS2, the program will be compiled without the - # CS2 MCF solver module. - --CC = cc --CFLAGS = -O3 # -D NO_CS2 -+#CC = cc -+CFLAGS += -O3 # -D NO_CS2 - LIBS = -lm - BINDIR = ../bin - INSTALLDIR = /usr/local/bin -@@ -32,7 +32,7 @@ - all: $(SNAPHU) - - $(SNAPHU): snaphu.c $(OBJS) snaphu.h Makefile -- $(CC) $(CFLAGS) \ -+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \ - snaphu.c \ - $(OBJS) \ - -o $(SNAPHU) \ diff -Nru snaphu-1.4.2/debian/patches/man-page-hyphens.patch snaphu-1.4.2/debian/patches/man-page-hyphens.patch --- snaphu-1.4.2/debian/patches/man-page-hyphens.patch 2013-07-12 20:47:05.000000000 +0000 +++ snaphu-1.4.2/debian/patches/man-page-hyphens.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ -Escape hyphens in the manpage. ---- a/man/man1/snaphu.1 -+++ b/man/man1/snaphu.1 -@@ -348,15 +348,15 @@ - .fi - - Unwrap the same file as above, but use brightness information from the --file ``ampfile,'' set the perpendicular baseline to -165 m at -+file ``ampfile,'' set the perpendicular baseline to \-165 m at - midswath, and place the output in a file called ``unwrappedfile'' - (coherence data are generated automatically if ``wrappedfile'' - contains complex data and ``ampfile'' contains amplitude data from - both SAR images): - - .nf -- snaphu wrappedfile 1024 -a ampfile \\\ -- -b -165 -o unwrappedfile -+ snaphu wrappedfile 1024 \-a ampfile \\\ -+ \-b \-165 \-o unwrappedfile - .fi - - Unwrap the interferogram as above, but read correlation -@@ -364,8 +364,8 @@ - the interferogram and amplitude data: - - .nf -- snaphu wrappedfile 1024 -a ampfile -c corrfile \\\ -- -b -165 -o unwrappedfile -+ snaphu wrappedfile 1024 \-a ampfile \-c corrfile \\\ -+ \-b \-165 \-o unwrappedfile - .fi - - The following is equivalent to the previous example, but input -@@ -377,25 +377,25 @@ - # This is a comment line which will be ignored - AMPFILE ampfile - CORRFILE corrfile -- BPERP -165 -+ BPERP \-165 - OUTFILE unwrappedfile - - -- snaphu -v -f configfile wrappedfile 1024 -+ snaphu \-v \-f configfile wrappedfile 1024 - .fi - - Unwrap the same interferogram, but use only the MST initialization - (with scalar statistical weights) and write the output to ``mstfile'': - - .nf -- snaphu -f configfile -i wrappedfile 1024 -o mstfile -+ snaphu \-f configfile \-i wrappedfile 1024 \-o mstfile - .fi - - Read the unwrapped data in ``mstfile'' and use that as the - initialization to the modified network-simplex solver: - - .nf -- snaphu -f configfile -u mstfile 1024 -o unwrappedfile -+ snaphu \-f configfile \-u mstfile 1024 \-o unwrappedfile - .fi - - Note that in the previous two examples, the output file name in the -@@ -408,7 +408,7 @@ - initialization: - - .nf -- snaphu -f configfile wrappedfile 1024 --mcf -+ snaphu \-f configfile wrappedfile 1024 \--mcf - .fi - - Unwrap the interferogram once again, but first flatten it with the -@@ -416,7 +416,7 @@ - after unwrapping: - - .nf -- snaphu -f configfile wrappedfile 1024 -e estfile -+ snaphu \-f configfile wrappedfile 1024 \-e estfile - .fi - - The following assumes that the wrapped input interferogram measures -@@ -424,14 +424,14 @@ - correlation data: - - .nf -- snaphu -d wrappedfile 1024 -c corrfile -+ snaphu \-d wrappedfile 1024 \-c corrfile - .fi - - Unwrap the input interferogram by minimizing the unweighted congruent - L2 norm: - - .nf -- snaphu -p 2 -n wrappedfile 1024 -+ snaphu \-p 2 \-n wrappedfile 1024 - .fi - - Unwrap the interferogram as a three-by-four set of tiles that overlap -@@ -439,8 +439,8 @@ - processors: - - .nf -- snaphu wrappedfile 1024 -f configfile \\\ -- --tile 3 4 30 30 --nproc 2 -+ snaphu wrappedfile 1024 \-f configfile \\\ -+ \--tile 3 4 30 30 \--nproc 2 - .fi - - .SH "HINTS AND TIPS" diff -Nru snaphu-1.4.2/debian/patches/series snaphu-1.4.2/debian/patches/series --- snaphu-1.4.2/debian/patches/series 2013-07-12 20:47:05.000000000 +0000 +++ snaphu-1.4.2/debian/patches/series 2017-08-07 21:51:10.000000000 +0000 @@ -1,3 +1,3 @@ -fix-compilation-warnings.patch -man-page-hyphens.patch -hardening.patch +0001-fix-compilation-warnings.patch +0002-man-page-hyphens.patch +0003-hardening.patch diff -Nru snaphu-1.4.2/debian/rules snaphu-1.4.2/debian/rules --- snaphu-1.4.2/debian/rules 2013-07-12 20:47:05.000000000 +0000 +++ snaphu-1.4.2/debian/rules 2017-08-07 21:51:10.000000000 +0000 @@ -4,6 +4,10 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +export DEB_BUILD_MAINT_OPTIONS=hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + DH_OPTIONS=--sourcedirectory=src %: