]> granicus.if.org Git - neomutt/commitdiff
negative check
authorRichard Russon <rich@flatcap.org>
Wed, 17 Jan 2018 13:46:43 +0000 (13:46 +0000)
committerRichard Russon <rich@flatcap.org>
Thu, 18 Jan 2018 23:26:51 +0000 (23:26 +0000)
ncrypt/crypt_gpgme.c

index 012a70caf71a80f4efca46739a551adae270f66a..3cad2bd3a7d5d3a9d677bf92bcd113eb37b50656 100644 (file)
@@ -1801,6 +1801,8 @@ static struct Body *decrypt_part(struct Body *a, struct State *s, FILE *fpout,
   ctx = create_gpgme_context(is_smime);
 
 restart:
+  if (a->length < 0)
+    return NULL;
   /* Make a data object from the body, create context etc. */
   ciphertext = file_to_data_object(s->fpin, a->offset, a->length);
   if (!ciphertext)