gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master ed40369c: NoiseChisel: freed tile-checking poi


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master ed40369c: NoiseChisel: freed tile-checking pointer set to NULL
Date: Thu, 24 Feb 2022 19:41:24 -0500 (EST)

branch: master
commit ed40369cac88508414e35c52e85d8bd88cb37a99
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    NoiseChisel: freed tile-checking pointer set to NULL
    
    Until now, we were simply freeing the 'tilecheckname' element of the
    tessellation structure (which is used with the '--checktiles' option) after
    it wasn't necessary, but not setting it to NULL. As a result, when
    '--checktiles' was called with '--continueaftercheck', NoiseChisel would
    crash.
    
    With this commit, after freeing the pointer, it is set to NULL and this
    avoids any segmentation fault at freeing time.
    
    This bug was reported by Giulia Golini.
    
    This fixes bug #62112.
---
 NEWS                         | 3 +++
 bin/noisechisel/ui.c         | 1 +
 doc/announce-acknowledge.txt | 1 +
 3 files changed, 5 insertions(+)

diff --git a/NEWS b/NEWS
index 147ab26e..eba6c4d2 100644
--- a/NEWS
+++ b/NEWS
@@ -220,6 +220,9 @@ See the end of the file for license conditions.
               columns are requested and the requested number of rows given
               to '--tail' is more than half of the number of rows; reported
               by Manuel Sánchez-Benavente.
+  bug #62112: NoiseChisel crash when '--checktiles' and
+              '--continueaftercheck' called together, reported by Giulia
+              Golini.
 
 
 
diff --git a/bin/noisechisel/ui.c b/bin/noisechisel/ui.c
index 2593beb8..89717cc8 100644
--- a/bin/noisechisel/ui.c
+++ b/bin/noisechisel/ui.c
@@ -559,6 +559,7 @@ ui_prepare_tiles(struct noisechiselparams *p)
 
       /* Free the name. */
       free(tl->tilecheckname);
+      tl->tilecheckname=NULL;
     }
 }
 
diff --git a/doc/announce-acknowledge.txt b/doc/announce-acknowledge.txt
index 7561e69e..1f478ac3 100644
--- a/doc/announce-acknowledge.txt
+++ b/doc/announce-acknowledge.txt
@@ -7,6 +7,7 @@ Alessandro Ederoclite
 Sepideh Eskandarlou
 Juan Antonio Fernández Ontiveros
 Zohreh Ghaffari
+Giulia Golini
 Martin Guerrero Roncel
 Zahra Hosseini
 Raúl Infante-Sainz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]