From 12be9e818f01777283d49c8e37f618e4e9731371 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 12 Aug 2012 18:58:50 +0200 Subject: [PATCH] client_file: remove pure attribute from client_allow_file(). That function is not pure, it writes to error. When marked as pure, the compiler is allowed to assume it does not do anything to error, so it can remain NULL, which would result in an invalid read in print_error(). --- NEWS | 2 ++ src/client_file.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index c8a536873..d2393e502 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.17.2 (2012/??/??) +* protocol: + - fix crash in local file check ver 0.17.1 (2012/07/31) diff --git a/src/client_file.h b/src/client_file.h index 3dcbe7500..bc64bd041 100644 --- a/src/client_file.h +++ b/src/client_file.h @@ -35,7 +35,6 @@ struct client; * @param path_fs the absolute path name in filesystem encoding * @return true if access is allowed */ -G_GNUC_PURE bool client_allow_file(const struct client *client, const char *path_fs, GError **error_r);