Lines 352-358
Link Here
|
352 |
deliver_to_host(struct qitem *it, struct mx_hostentry *host) |
352 |
deliver_to_host(struct qitem *it, struct mx_hostentry *host) |
353 |
{ |
353 |
{ |
354 |
struct authuser *a; |
354 |
struct authuser *a; |
355 |
char line[1000]; |
355 |
char line[MAX_LINE_RFC822]; |
356 |
size_t linelen; |
356 |
size_t linelen; |
357 |
int fd, error = 0, do_auth = 0, res = 0; |
357 |
int fd, error = 0, do_auth = 0, res = 0; |
358 |
|
358 |
|
Lines 450-458
Link Here
|
450 |
|
450 |
|
451 |
error = 0; |
451 |
error = 0; |
452 |
while (!feof(it->mailf)) { |
452 |
while (!feof(it->mailf)) { |
453 |
if (fgets(line, sizeof(line), it->mailf) == NULL) |
453 |
if (fgets(line, sizeof(line)+1, it->mailf) == NULL) |
454 |
break; |
454 |
break; |
455 |
linelen = strlen(line); |
455 |
linelen = strnlen(line, sizeof(line)); |
456 |
if (linelen == 0 || line[linelen - 1] != '\n') { |
456 |
if (linelen == 0 || line[linelen - 1] != '\n') { |
457 |
syslog(LOG_CRIT, "remote delivery failed: corrupted queue file"); |
457 |
syslog(LOG_CRIT, "remote delivery failed: corrupted queue file"); |
458 |
snprintf(errmsg, sizeof(errmsg), "corrupted queue file"); |
458 |
snprintf(errmsg, sizeof(errmsg), "corrupted queue file"); |