Sophie

Sophie

distrib > Mandriva > cs4.0 > i586 > by-pkgid > c919e73e89042c823ded3ad64347498f > files > 7

cyrus-imapd-2.2.13-2mdv2007.0.src.rpm

diff -u -r1.107 -r1.108
--- src/cyrus/imtest/imtest.c	2006/01/20 20:31:23	1.107
+++ src/cyrus/imtest/imtest.c	2006/05/25 15:23:07	1.108
@@ -886,6 +886,12 @@
     }
     
     if (*str != '\r') {
+	/* trim CRLF */
+	char *p = str + strlen(str) - 1;
+	if (p >= str && *p == '\n') *p-- = '\0';
+	if (p >= str && *p == '\r') *p-- = '\0';
+
+	/* alloc space for decoded response */
 	len = strlen(str) + 1;
 	*line = malloc(len);
 	if ((*line) == NULL) {