Debian 1.2.20-2
[survex.git] / debian / patches / fix-use-after-free-after-solve.patch
blobc326ee23f3808038074aa83de91f74b20ea44b15
1 Description: Fix use after free after *solve
2 This only occurs if a leg between the two exact same stations appears right
3 before and right after the *solve, which is unlikely in real data, but the
4 testsuite has an instance of this.
5 Author: Olly Betts <olly@survex.com>
6 Origin: upstream
7 Forwarded: yes
8 Last-Update: 2015-06-26
10 --- survex-1.2.20.orig/src/netskel.c
11 +++ survex-1.2.20/src/netskel.c
12 @@ -86,6 +86,8 @@ solve_network(void /*node *stnlist*/)
13 static int first_solve = 1;
14 node *stn;
16 + clear_last_leg();
18 if (stnlist == NULL) {
19 if (first_solve) fatalerror(/*No survey data*/43);
20 /* We've had a *solve followed by another *solve (or the implicit