From dd74c429b043d42fa98ae23e191a52e203bc5954 Mon Sep 17 00:00:00 2001 From: Martijn van Brummelen Date: Fri, 5 Oct 2018 22:35:41 +0200 Subject: [PATCH] fix segfault by initializing nwipe_gui_thread --- README | 1 + src/nwipe.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README b/README index 70a0426..1cc143d 100644 --- a/README +++ b/README @@ -20,6 +20,7 @@ RELEASE NOTES v0.25 - Correct J=Up K=Down in footer(Thanks PartialVolume) +- Fix segfault initialize nwipe_gui_thread (Thanks PartialVolume) v0.24 - use include values for version 0.17 diff --git a/src/nwipe.c b/src/nwipe.c index 08bda65..c31b956 100644 --- a/src/nwipe.c +++ b/src/nwipe.c @@ -48,7 +48,7 @@ int main( int argc, char** argv ) int nwipe_enumerated; /* The number of contexts that have been enumerated. */ int nwipe_error = 0; /* An error counter. */ int nwipe_selected = 0; /* The number of contexts that have been selected. */ - pthread_t nwipe_gui_thread; /* The thread ID of the GUI thread. */ + pthread_t nwipe_gui_thread = 0; /* The thread ID of the GUI thread. */ pthread_t nwipe_sigint_thread; /* The thread ID of the sigint handler. */ /* The entropy source file handle. */