mirror of
https://git.freebsd.org/ports.git
synced 2025-06-29 16:40:31 -04:00
Obtained from: https://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imtest/imtest.c.diff?r1=1.107&r2=1.108&f=u
36 lines
827 B
C
36 lines
827 B
C
Index: imtest/imtest.c
|
|
diff -u imtest/imtest.c.orig imtest/imtest.c
|
|
--- imtest/imtest.c.orig Sun Jul 13 05:10:56 2003
|
|
+++ imtest/imtest.c Fri Jul 18 00:52:29 2003
|
|
@@ -51,6 +51,7 @@
|
|
#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
|
|
+#include <limits.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
@@ -419,8 +420,8 @@
|
|
}
|
|
|
|
|
|
-char *var_tls_CAfile="";
|
|
-char *var_tls_CApath="";
|
|
+static char *var_tls_CAfile="";
|
|
+static char *var_tls_CApath="";
|
|
/*
|
|
* This is the setup routine for the SSL client.
|
|
*
|
|
@@ -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) {
|