aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenri Roosen <henriroosen@gmail.com>2021-03-08 15:57:10 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-22 01:24:01 +0100
commit1709a628dfc8983f7718e978676cafc3c0399a70 (patch)
tree0710ff4f4b103ac257ba2fcbab6c2533f3ed5b10
parente91700286ff531f344f4d9a1f1c96c501bfeadad (diff)
mkfs.ubifs: Fix runtime assertions when running without crypto
Running mkfs.ubifs which was build without crypto triggered the following assertion: mkfs.ubifs: ubifs-utils/mkfs.ubifs/fscrypt.h:166: inherit_fscrypt_context: Assertion `0' failed. A previous commit-cc4c5e295f54 ("mkfs.ubifs: Enable support for building without crypto") added a check for an existing fscrypt context before calling functions inherit_fscrypt_context() and free_fscrypt_context(), however did not properly do this for each call to these functions. Fixes: cc4c5e295f54 ("mkfs.ubifs: Enable support for building without crypto") Signed-off-by: Henri Roosen <henri.roosen@ginzinger.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--ubifs-utils/mkfs.ubifs/fscrypt.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ubifs-utils/mkfs.ubifs/fscrypt.h b/ubifs-utils/mkfs.ubifs/fscrypt.h
index 34b799c..ff3d326 100644
--- a/ubifs-utils/mkfs.ubifs/fscrypt.h
+++ b/ubifs-utils/mkfs.ubifs/fscrypt.h
@@ -131,7 +131,7 @@ static inline void free_fscrypt_context(struct fscrypt_context *fctx)
{
(void)fctx;
- assert(0);
+ assert(!fctx);
}
static inline int encrypt_path(void **outbuf, void *data, unsigned int data_len,
@@ -163,7 +163,7 @@ static inline struct fscrypt_context *inherit_fscrypt_context(struct fscrypt_con
{
(void)fctx;
- assert(0);
+ assert(!fctx);
return NULL;
}
#endif /* WITH_CRYPTO */