freebsd-ports/mail/fetchmail/files/patch-netrc.c
Simon Barner 3cd0edaa2b - Prevent fetchmail from crashing if the .netrc file does not contain
a password for a particular account.

- Bump PORTREVISION

Submitted by:	Craig Leres via Matthias Andree
2006-01-30 12:47:53 +00:00

15 lines
378 B
C

--- netrc.c (Revision 4683)
+++ netrc.c (Revision 4684)
@@ -314,8 +314,10 @@
free_netrc(netrc_entry *a) {
while(a) {
netrc_entry *n = a->next;
- memset(a->password, 0x55, strlen(a->password));
- xfree(a->password);
+ if (a->password != NULL) {
+ memset(a->password, 0x55, strlen(a->password));
+ free(a->password);
+ }
xfree(a->login);
xfree(a->host);
xfree(a);