~ubuntu-branches/ubuntu/vivid/mutt/vivid-updates

« back to all changes in this revision

Viewing changes to debian/extra/lib/debian-ldap-query

Tags: 1.5.18-6
* Grab from upstream:
  + Guard idata->mailbox read in imap_mailbox_state.
    The bug happens when a user has more than a imap mailbox, when
    he/she browses through them mutt will segfault.
    (Closes: #462266, #513230, #514309. Mutt: #3057)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
use strict;
7
7
 
8
 
my @attrs = qw(sn cn ircnick uid);
 
8
my @attrs = qw(sn mn cn ircnick uid);
9
9
my $base = 'ou=users, dc=debian, dc=org';
10
10
my $server = 'db.debian.org';
11
11
my $port = 389;
32
32
        ) or die 'Failed search';
33
33
    foreach my $entry ($mesg->entries) {
34
34
                my $uid   = $entry->get_value('uid')    || next;
35
 
                my $fname = $entry->get_value('cn')             || '';
36
 
                my $lname = $entry->get_value('sn')             || '';
 
35
                my $fname = $entry->get_value('cn')     || '';
 
36
                my $mname = $entry->get_value('mn')     || '';
 
37
                $mname .= ' ' if $mname;
 
38
                my $lname = $entry->get_value('sn')     || '';
37
39
                my $nick  = $entry->get_value('ircnick')|| '';
38
 
                push @results, "<$uid\@debian.org>\t$fname $lname\t($nick)\n";
 
40
                push @results, "<$uid\@debian.org>\t$fname $mname$lname\t($nick)\n";
39
41
    }
40
42
}
41
43