Commit 1080f72c 1080f72c46c54957078bd93a14a745699278c7c9 by Sergey Poznyakoff

(maildir_gethostname): Fixed a gross memory allocation bug.

1 parent 44bed5ec
...@@ -95,6 +95,7 @@ static struct info_map { ...@@ -95,6 +95,7 @@ static struct info_map {
95 }; 95 };
96 #define info_map_size (sizeof (info_map) / sizeof (info_map[0])) 96 #define info_map_size (sizeof (info_map) / sizeof (info_map[0]))
97 97
98 /* FIXME: is not used */
98 static int 99 static int
99 info_map_letter (int c) 100 info_map_letter (int c)
100 { 101 {
...@@ -200,7 +201,7 @@ maildir_gethostname () ...@@ -200,7 +201,7 @@ maildir_gethostname ()
200 { 201 {
201 char *q; 202 char *q;
202 203
203 hp = malloc (strlen (hostname)) + s + 1; 204 hp = malloc (strlen (hostname) + s + 1);
204 for (p = hostname, q = hp; *p; p++) 205 for (p = hostname, q = hp; *p; p++)
205 switch (*p) 206 switch (*p)
206 { 207 {
......