New device access backend.
[platform/upstream/cryptsetup.git] / lib / utils_crypt.c
index 4b1dc70..c2111c7 100644 (file)
@@ -445,7 +445,7 @@ int crypt_string_to_size(struct crypt_device *cd, const char *s, uint64_t *size)
            (errno != 0 && *size == 0))
                return -EINVAL;
 
-       if (!endp)
+       if (!endp || !*endp)
                return 0;
 
        len = strlen(endp);