From: Joey Schulze Date: Mon, 22 Nov 2004 14:34:06 +0000 (+0000) Subject: No need to reduce the size by one since this is done in copystring() X-Git-Tag: upstream_newmail_0-3~11 X-Git-Url: https://git.infodrom.org/?p=infodrom%2Fnewmail;a=commitdiff_plain;h=f0d140c206f3cae4aa189a0d1e3c69ac87090532 No need to reduce the size by one since this is done in copystring() --- diff --git a/mbox.c b/mbox.c index 63fd0a3..fb63e49 100644 --- a/mbox.c +++ b/mbox.c @@ -94,22 +94,21 @@ int inspect_mbox(char *path, char *prefix, off_t size) priority = 0; } else { if (strncasecmp(buf, "From ", 5) == 0) - stringcopy(from_, buf+5, sizeof(from_)-1); + stringcopy(from_, buf+5, sizeof(from_)); else if (strncasecmp(buf, "From: ", 6) == 0) - stringcopy(from, buf+6, sizeof(from)-1); + stringcopy(from, buf+6, sizeof(from)); #ifdef FROM_DETECTION else if (strncasecmp(buf, "To: ", 4) == 0) - stringcopy(to, buf+4, sizeof(to)-1); + stringcopy(to, buf+4, sizeof(to)); #endif else if (strncasecmp(buf, "Subject: ", 9) == 0) - stringcopy(subject, buf+9, sizeof(subject)-1); + stringcopy(subject, buf+9, sizeof(subject)); else if (strncasecmp(buf, "Priority: ", 10) == 0) priority = 1; } } else if (strncasecmp(buf, "From ", 5) == 0) { inheader = 1; - strncpy(from_, buf+5, sizeof(from_)-1); - from[sizeof(from_)-1] = '\0'; + stringcopy(from_, buf+5, sizeof(from_)); } }