diff options
author | Karel Zak | 2013-04-12 12:35:34 +0200 |
---|---|---|
committer | Karel Zak | 2013-04-12 12:35:34 +0200 |
commit | 4569bbeab783632c81ee14793da84b3e29444543 (patch) | |
tree | b165e3f418600bef11edbd962bc7f76b9d95113f /libmount/src/mountP.h | |
parent | build-sys: release++ (v2.23-rc2) (diff) | |
download | kernel-qcow2-util-linux-4569bbeab783632c81ee14793da84b3e29444543.tar.gz kernel-qcow2-util-linux-4569bbeab783632c81ee14793da84b3e29444543.tar.xz kernel-qcow2-util-linux-4569bbeab783632c81ee14793da84b3e29444543.zip |
libmount: fix mount.nfs segfault, rely on assert() rather than on nonnull
We use
mnt_optstr_append_option(&o, mnt_fs_get_vfs_options(fs), NULL);
in mount.nfs, unfortunately mnt_optstr_append_option() has been marked
ass nonnull(1, 2). That's wrong because append and prepend should
robust enough to accept NULL as option name.
The patch also removes almost all __attribute__((nonnull). It seems
better to rely on assert() to have usable feedback. In many cases
(nonnull) is premature optimization for the library. This attribute
makes sense for things like strlen() or so...
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=948274
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/mountP.h')
-rw-r--r-- | libmount/src/mountP.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libmount/src/mountP.h b/libmount/src/mountP.h index 065b815c1..e064a6849 100644 --- a/libmount/src/mountP.h +++ b/libmount/src/mountP.h @@ -26,7 +26,9 @@ #define CONFIG_LIBMOUNT_DEBUG #ifdef CONFIG_LIBMOUNT_ASSERT -#include <assert.h> +# include <assert.h> +#else +# define assert(x) #endif /* |