View | Details | Raw Unified
Collapse All | Expand All

(-) ssmtp-original/ssmtp.c (-28 / +33 lines)
 Lines 55-75    Link Here 
#define ARPADATE_LENGTH 32		/* Current date in RFC format */
#define ARPADATE_LENGTH 32		/* Current date in RFC format */
char arpadate[ARPADATE_LENGTH];
char arpadate[ARPADATE_LENGTH];
char *auth_user = (char)NULL;
char *auth_user = (char *)NULL;
char *auth_pass = (char)NULL;
char *auth_pass = (char *)NULL;
char *auth_method = (char)NULL;		/* Mechanism for SMTP authentication */
char *auth_method = (char *)NULL;		/* Mechanism for SMTP authentication */
char *mail_domain = (char)NULL;
char *mail_domain = (char *)NULL;
char *from = (char)NULL;		/* Use this as the From: address */
char *from = (char *)NULL;		/* Use this as the From: address */
char *hostname;
char *hostname;
char *mailhost = "mailhub";
char *mailhost = "mailhub";
char *minus_f = (char)NULL;
char *minus_f = (char *)NULL;
char *minus_F = (char)NULL;
char *minus_F = (char *)NULL;
char *gecos;
char *gecos;
char *prog = (char)NULL;
char *prog = (char *)NULL;
char *root = NULL;
char *root = NULL;
char *tls_cert = "/etc/ssl/certs/ssmtp.pem";	/* Default Certificate */
char *tls_cert = "/etc/ssl/certs/ssmtp.pem";	/* Default Certificate */
char *uad = (char)NULL;
char *uad = (char *)NULL;
char *config_file = (char)NULL;		/* alternate configuration file */
char *config_file = (char *)NULL;		/* alternate configuration file */
headers_t headers, *ht;
headers_t headers, *ht;
 Lines 261-267    Link Here 
	p = (str + strlen(str));
	p = (str + strlen(str));
	while(isspace(*--p)) {
	while(isspace(*--p)) {
		*p = (char)NULL;
		*p = '\0';
	}
	}
	return(p);
	return(p);
 Lines 287-293    Link Here 
		q++;
		q++;
		if((p = strchr(q, '>'))) {
		if((p = strchr(q, '>'))) {
			*p = (char)NULL;
			*p = '\0';
		}
		}
#if 0
#if 0
 Lines 310-316    Link Here 
	q = strip_post_ws(p);
	q = strip_post_ws(p);
	if(*q == ')') {
	if(*q == ')') {
		while((*--q != '('));
		while((*--q != '('));
		*q = (char)NULL;
		*q = '\0';
	}
	}
	(void)strip_post_ws(p);
	(void)strip_post_ws(p);
 Lines 353-359    Link Here 
	char *p;
	char *p;
	if((p = strchr(str, '\n'))) {
	if((p = strchr(str, '\n'))) {
		*p = (char)NULL;
		*p = '\0';
	}
	}
	/* Any line beginning with a dot has an additional dot inserted;
	/* Any line beginning with a dot has an additional dot inserted;
 Lines 386-392    Link Here 
		while(fgets(buf, sizeof(buf), fp)) {
		while(fgets(buf, sizeof(buf), fp)) {
			/* Make comments invisible */
			/* Make comments invisible */
			if((p = strchr(buf, '#'))) {
			if((p = strchr(buf, '#'))) {
				*p = (char)NULL;
				*p = '\0';
			}
			}
			/* Ignore malformed lines and comments */
			/* Ignore malformed lines and comments */
 Lines 485-490    Link Here 
				die("from_format() -- snprintf() failed");
				die("from_format() -- snprintf() failed");
			}
			}
		}
		}
		else {
			if(snprintf(buf, BUF_SZ, "%s", str) == -1) {
				die("from_format() -- snprintf() failed");
			}
		}
	}
	}
#if 0
#if 0
 Lines 516-522    Link Here 
#endif
#endif
	/* Ignore missing usernames */
	/* Ignore missing usernames */
	if(*str == (char)NULL) {
	if(*str == '\0') {
		return;
		return;
	}
	}
 Lines 573-579    Link Here 
		}
		}
		/* End of string? */
		/* End of string? */
		if(*(q + 1) == (char)NULL) {
		if(*(q + 1) == '\0') {
			got_addr = True;
			got_addr = True;
		}
		}
 Lines 581-587    Link Here 
		if((*q == ',') && (in_quotes == False)) {
		if((*q == ',') && (in_quotes == False)) {
			got_addr = True;
			got_addr = True;
			*q = (char)NULL;
			*q = '\0';
		}
		}
		if(got_addr) {
		if(got_addr) {
 Lines 673-679    Link Here 
	if(strncasecmp(ht->string, "From:", 5) == 0) {
	if(strncasecmp(ht->string, "From:", 5) == 0) {
#if 1
#if 1
		/* Hack check for NULL From: line */
		/* Hack check for NULL From: line */
		if(*(p + 6) == (char)NULL) {
		if(*(p + 6) == '\0') {
			return;
			return;
		}
		}
#endif
#endif
 Lines 738-744    Link Here 
	size_t size = BUF_SZ, len = 0;
	size_t size = BUF_SZ, len = 0;
	char *p = (char *)NULL, *q;
	char *p = (char *)NULL, *q;
	bool_t in_header = True;
	bool_t in_header = True;
	char l = (char)NULL;
	char l = '\0';
	int c;
	int c;
	while(in_header && ((c = fgetc(stream)) != EOF)) {
	while(in_header && ((c = fgetc(stream)) != EOF)) {
 Lines 773-781    Link Here 
						in_header = False;
						in_header = False;
				default:
				default:
						*q = (char)NULL;
						*q = '\0';
						if((q = strrchr(p, '\n'))) {
						if((q = strrchr(p, '\n'))) {
							*q = (char)NULL;
							*q = '\0';
						}
						}
						header_save(p);
						header_save(p);
 Lines 806-814    Link Here 
						in_header = False;
						in_header = False;
				default:
				default:
						*q = (char)NULL;
						*q = '\0';
						if((q = strrchr(p, '\n'))) {
						if((q = strrchr(p, '\n'))) {
							*q = (char)NULL;
							*q = '\0';
						}
						}
						header_save(p);
						header_save(p);
 Lines 882-888    Link Here 
		char *rightside;
		char *rightside;
		/* Make comments invisible */
		/* Make comments invisible */
		if((p = strchr(buf, '#'))) {
		if((p = strchr(buf, '#'))) {
			*p = (char)NULL;
			*p = '\0';
		}
		}
		/* Ignore malformed lines and comments */
		/* Ignore malformed lines and comments */
 Lines 1301-1307    Link Here 
	int i = 0;
	int i = 0;
	char c;
	char c;
	while((i < size) && (fd_getc(fd, &c) == 1)) {
	while((i < size - 1) && (fd_getc(fd, &c) == 1)) {
		if(c == '\r');	/* Strip <CR> */
		if(c == '\r');	/* Strip <CR> */
		else if(c == '\n') {
		else if(c == '\n') {
			break;
			break;
 Lines 1310-1316    Link Here 
			buf[i++] = c;
			buf[i++] = c;
		}
		}
	}
	}
	buf[i] = (char)NULL;
	buf[i] = '\0';
	return(buf);
	return(buf);
}
}
 Lines 1723-1729    Link Here 
		j = 0;
		j = 0;
		add = 1;
		add = 1;
		while(argv[i][++j] != (char)NULL) {
		while(argv[i][++j] != '\0') {
			switch(argv[i][j]) {
			switch(argv[i][j]) {
#ifdef INET6
#ifdef INET6
			case '6':
			case '6':