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().
This commit is contained in:
Anton Khirnov 2012-08-12 18:58:50 +02:00 committed by Max Kellermann
parent 281cd7c057
commit 12be9e818f
2 changed files with 2 additions and 1 deletions

2
NEWS
View File

@ -1,4 +1,6 @@
ver 0.17.2 (2012/??/??)
* protocol:
- fix crash in local file check
ver 0.17.1 (2012/07/31)

View File

@ -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);