]> granicus.if.org Git - neomutt/commitdiff
unchecked returns
authorRichard Russon <rich@flatcap.org>
Wed, 17 Jan 2018 15:47:32 +0000 (15:47 +0000)
committerRichard Russon <rich@flatcap.org>
Thu, 18 Jan 2018 23:26:52 +0000 (23:26 +0000)
browser.c
imap/command.c
rfc1524.c

index 30c66c8f2a10181c13c11dd45c2e234ca0a31cbd..b68f82889039017492b91f1f09d76b26a74f0737 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -1646,7 +1646,12 @@ void mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfi
           struct ImapMbox mx;
           int nentry = menu->current;
 
-          imap_parse_path(state.entry[nentry].name, &mx);
+          if (imap_parse_path(state.entry[nentry].name, &mx) < 0)
+          {
+            mutt_debug(1, "imap_parse_path failed\n");
+            mutt_error(_("Mailbox deletion failed."));
+            break;
+          }
           if (!mx.mbox)
           {
             mutt_error(_("Cannot delete root folder"));
index 03548090e2318317bcb73e036bf2b64960f70052..ad36a483465a7dbef753835a40771348ecd1d414 100644 (file)
@@ -823,7 +823,7 @@ static int cmd_handle_untagged(struct ImapData *idata)
 {
   char *s = NULL;
   char *pn = NULL;
-  unsigned int count;
+  unsigned int count = 0;
 
   s = imap_next_word(idata->buf);
   pn = imap_next_word(s);
@@ -841,7 +841,10 @@ static int cmd_handle_untagged(struct ImapData *idata)
       mutt_debug(2, "Handling EXISTS\n");
 
       /* new mail arrived */
-      mutt_atoui(pn, &count);
+      if (mutt_atoui(pn, &count) < 0)
+      {
+        mutt_debug(1, "Malformed EXISTS: '%s'\n", pn);
+      }
 
       if (!(idata->reopen & IMAP_EXPUNGE_PENDING) && count < idata->max_msn)
       {
index bef66ccf8b93b036a39de8f40bbc78f22836eae0..fc65db7444c5032141faaf2da41bb10d0ea0e0a4 100644 (file)
--- a/rfc1524.c
+++ b/rfc1524.c
@@ -300,7 +300,10 @@ static int rfc1524_mailcap_parse(struct Body *a, char *filename, char *type,
           {
             len = mutt_str_strlen(test_command) + STRING;
             mutt_mem_realloc(&test_command, len);
-            rfc1524_expand_command(a, a->filename, type, test_command, len);
+            if (rfc1524_expand_command(a, a->filename, type, test_command, len) == 1)
+            {
+              mutt_debug(1, "Command is expecting to be piped\n");
+            }
             if (mutt_system(test_command) != 0)
             {
               /* a non-zero exit code means test failed */