<<< Date Index >>>     <<< Thread Index >>>

Re: [voss@xxxxxxxxxx: Bug#400831: logic error in mutt-1.5.13/account.c]



fixed

On 2006-12-02 17:05:47 -0500, Kyle Wheeler wrote:
> From: Kyle Wheeler <kyle-mutt-dev@xxxxxxxxxxxxxx>
> To: mutt-dev@xxxxxxxx
> Date: Sat, 2 Dec 2006 17:05:47 -0500
> Subject: [voss@xxxxxxxxxx: Bug#400831: logic error in
>       mutt-1.5.13/account.c]
> X-Spam-Level: 
> Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
> 
> I came across this posting to the Debian mutt list.
> 
> ~Kyle
> -- 
> I love America more than any other country in this world, and, exactly 
> for this reason, I insist on the right to criticize her perpetually.
>                               -- James Baldwin, Notes of a Native Son

> From: Jochen Voss <voss@xxxxxxxxxx>
> To: Debian Bug Tracking System <submit@xxxxxxxxxxxxxxx>
> Date: Tue, 28 Nov 2006 23:00:29 +0000
> Subject: Bug#400831: logic error in mutt-1.5.13/account.c
> Reply-To: Jochen Voss <voss@xxxxxxxxxx>, 400831@xxxxxxxxxxxxxxx
> X-Spam-Level: 
> DomainKey-Status: no signature
> 
> Package: mutt
> Version: 1.5.13-1
> Severity: normal
> 
> Hi,
> 
> recently I came across the following bit of code in the source file
> mutt-1.5.13/account.c (near the end of the file):
> 
>     void mutt_account_unsetpass (ACCOUNT* account)
>     {
>       account->flags &= !M_ACCT_PASS;
>     }
> 
> Since the flags field is used as a collection of separate bit, this is
> a bug in the program.  Since M_ACCT_PASS equals 8, !M_ACCT_PASS equals
> 0 and the 'mutt_account_unsetpass' function erroneously clears all
> flags instead of only M_ACCT_PASS.
> 
> This bug can be fixed by using bitwise negation instead of logical
> negation:
> 
>       account->flags &= ~M_ACCT_PASS;
> 
> I hope this helps,
> Jochen
> 
> -- System Information:
> Debian Release: 4.0
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: i386 (i686)
> Shell:  /bin/sh linked to /bin/bash
> Kernel: Linux 2.6.18.3
> Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
> 
> Versions of packages mutt depends on:
> ii  exim4                     4.63-10        metapackage to ease exim MTA 
> (v4) 
> ii  exim4-daemon-light [mail- 4.63-10        lightweight exim MTA (v4) daemon
> ii  libc6                     2.3.6.ds1-8    GNU C Library: Shared libraries
> ii  libdb4.4                  4.4.20-8       Berkeley v4.4 Database Libraries 
> [
> ii  libgnutls13               1.4.4-3        the GNU TLS library - runtime 
> libr
> ii  libidn11                  0.6.5-1        GNU libidn library, 
> implementation
> ii  libncursesw5              5.5-5          Shared libraries for terminal 
> hand
> ii  libsasl2                  2.1.22.dfsg1-4 Authentication abstraction 
> library
> 
> Versions of packages mutt recommends:
> ii  locales                      2.3.6.ds1-8 GNU C Library: National Language 
> (
> ii  mime-support                 3.37-1      MIME files 'mime.types' & 
> 'mailcap
> 
> -- no debconf information




-- 
Thomas Roessler   <roessler@xxxxxxxxxxxxxxxxxx>