aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-08-12 18:58:50 +0200
committerMax Kellermann <max@duempel.org>2012-08-13 07:55:40 +0200
commit12be9e818f01777283d49c8e37f618e4e9731371 (patch)
tree6c38a9de093c0d2d86e5e741050613e9b086d810
parent281cd7c05728dcc7a6d6b4aa9a69a02dcdefca5c (diff)
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().
-rw-r--r--NEWS2
-rw-r--r--src/client_file.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index c8a53687..d2393e50 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 3dcbe750..bc64bd04 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);