gentoo/net-mail/vpopmail/files/vpopmail-double-free.patch
Rolf Eike Beer cf9877fcfd
net-mail/vpopmail: make patches apply with -p1
Both ebuilds still are able to apply them afterwards.

Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
Closes: https://github.com/gentoo/gentoo/pull/12929
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2019-09-15 17:19:26 +02:00

14 lines
399 B
Diff

diff --git a/trunk/vpalias.c b/trunk/vpalias.c
index 9853f14..e9bd81f 100644
--- a/vpalias.c
+++ b/vpalias.c
@@ -369,7 +369,7 @@ char *valias_select_names( char *domain )
}
}
}
- if (num_names < max_names) {
+ if (num_names < max_names && num_names > 0) {
new_names = realloc( names, num_names * sizeof(char *) );
if (new_names != NULL)
names = new_names;