summaryrefslogtreecommitdiff
path: root/mail/teapop/files/patch-ab
blob: aad97bbbecfe980914d968338cc715aa6796f038 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- teapop/pop_auth.c.orig	Mon Nov 13 02:03:11 2000
+++ teapop/pop_auth.c	Wed Mar 28 23:58:33 2001
@@ -111,7 +111,11 @@
 #endif /* ALLOW_APOP */
 				pop_cmd_capa(NULL, pinfo);
 				continue;
+#ifdef ALLOW_APOP
 			case 4:
+#else
+			case 3:
+#endif /* ALLOW_APOP */
 				return 1;
 			}
 			/* If we get this far we have a good USER or APOP */
@@ -158,7 +162,14 @@
 
 #ifdef VPOP
 		ptr = pop_string_find(pinfo->userid, DIVIDERS);
-		if (ptr != NULL) {
+		if (ptr == NULL) {
+			syslog(LOG_ERR, "pop_auth: malloc failure");
+			pop_socket_send(pinfo->out, "%s %s", POP_ERR,
+				POP_WRONG);
+			exit(0);
+		}
+		if (*ptr != '\0') {
+			/* domain delimiters found */
 			strcpy(pinfo->domain, ptr+1);
 			*ptr = '\0';
 		} else