Skip to content

Commit

Permalink
compatibility fix for SASL 2.1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmurchison committed May 25, 2006
1 parent 800d25f commit 7b5dd93
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cyrus/imtest/imtest.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* imtest.c -- IMAP/POP3/NNTP/LMTP/SMTP/MUPDATE/MANAGESIEVE test client
* Ken Murchison (multi-protocol implementation)
* Tim Martin (SASL implementation)
* $Id: imtest.c,v 1.93.2.14 2006/03/15 19:24:02 murch Exp $
* $Id: imtest.c,v 1.93.2.15 2006/05/25 15:21:49 murch Exp $
*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
Expand Down Expand Up @@ -886,6 +886,12 @@ imt_stat getauthline(struct sasl_cmd_t *sasl_cmd, char **line, int *linelen)
}

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) {
Expand Down

0 comments on commit 7b5dd93

Please sign in to comment.