Re: [PATCH 1/2] imap-send: fix bug causing cfg->folder being set to NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 22, 2025 at 05:27:15PM +0000, Aditya Garg wrote:

> Upon setting up imap-send config file, I encountered the very first bug.
> An error showing "no imap store specified" was being displayed on the
> terminal. Upon investigating further, in static int git_imap_config,
> cfg->folder was being incorrectly set to NULL in case imap.user, imap.pass,
> imap.tunnel and imap.authmethod were defined, and the values that these configs
> intended to set were not being set at all.

I read "these configs[...]were not being set at all" as imap.user, etc.
But I think the only thing affected was imap.folder, which was
incorrectly being reset when we saw the other fields (and of course the
leak-fix for those fields was not kicking in correctly).

So:

  [imap]
  host = example.com
  user = foo
  folder = INBOX

was fine, but:

  [imap]
  host = example.com
  folder = INBOX
  user = foo

was not (we end up with a NULL folder variable).

> Because of this, git imap-send was basically not usable at all. The
> bug seems to be there for quite a while, and has not yet been
> detected, likely due to better options like git send-email being
> available.

I think that probably explains why it was not detected (by users or the
tests). It was dependent on the usage and ordering of particular config
options.

(The patch is still doing the right thing, of course; I'm just trying to
add more context to the commit message).

-Peff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux