~ubuntu-branches/ubuntu/lucid/dovecot/lucid-security

« back to all changes in this revision

Viewing changes to debian/patches/fix-pop3-assertion.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-10-09 14:43:04 UTC
  • Revision ID: james.westby@ubuntu.com-20091009144304-4aqg1iofaj8wkfw2
Tags: 1:1.1.11-0ubuntu10
debian/patches/fix-pop3-assertion.patch: Fix assertion when logging in.
(LP: #425407)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh -e
 
2
 
 
3
. $(dirname $0)/DPATCH
 
4
exit 0
 
5
@DPATCH@
 
6
diff -Narup dovecot-1.1.11.orig/src/imap-login/client.c dovecot-1.1.11/src/imap-login/client.c
 
7
--- dovecot-1.1.11.orig/src/imap-login/client.c 2009-01-06 09:33:51.000000000 -0500
 
8
+++ dovecot-1.1.11/src/imap-login/client.c      2009-10-09 14:36:24.837635190 -0400
 
9
@@ -626,11 +626,12 @@ void clients_notify_auth_connected(void)
 
10
 
 
11
 void clients_destroy_all(void)
 
12
 {
 
13
-       struct client *client;
 
14
+       struct client *client, *next;
 
15
 
 
16
-       for (client = clients; client != NULL; client = client->next) {
 
17
+       for (client = clients; client != NULL; client = next) {
 
18
                struct imap_client *imap_client = (struct imap_client *)client;
 
19
 
 
20
+               next = client->next;
 
21
                client_destroy(imap_client, "Disconnected: Shutting down");
 
22
        }
 
23
 }
 
24
diff -Narup dovecot-1.1.11.orig/src/pop3-login/client.c dovecot-1.1.11/src/pop3-login/client.c
 
25
--- dovecot-1.1.11.orig/src/pop3-login/client.c 2009-01-06 09:33:51.000000000 -0500
 
26
+++ dovecot-1.1.11/src/pop3-login/client.c      2009-10-09 14:36:24.837635190 -0400
 
27
@@ -479,11 +479,12 @@ void clients_notify_auth_connected(void)
 
28
 
 
29
 void clients_destroy_all(void)
 
30
 {
 
31
-       struct client *client;
 
32
+       struct client *client, *next;
 
33
 
 
34
-       for (client = clients; client != NULL; client = client->next) {
 
35
+       for (client = clients; client != NULL; client = next) {
 
36
                struct pop3_client *pop3_client = (struct pop3_client *)client;
 
37
 
 
38
+               next = client->next;
 
39
                client_destroy(pop3_client, "Disconnected: Shutting down");
 
40
        }
 
41
 }