diff options
Diffstat (limited to 'src/r-gpgme.c')
-rw-r--r-- | src/r-gpgme.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/r-gpgme.c b/src/r-gpgme.c index cfa2f98..4641e60 100644 --- a/src/r-gpgme.c +++ b/src/r-gpgme.c @@ -175,6 +175,10 @@ char *decrypt_data(const char *path) } data = malloc(sizeof(char) * (maxlen_pass + 1)); + if (!data) { + print_error("Unable to allocate space for the decrypted data.\n"); + goto out_release_plain; + } gpgme_data_read(plain, data, maxlen_pass); out_release_plain: |