Commit c00e6db2 c00e6db2910935d81783f0fe681d3cf8bb743dab by Wojciech Polak

(get_personal): Fixed

1 parent c49a7e4c
...@@ -229,12 +229,13 @@ get_personal (header_t hdr, const char *field, char *personal, size_t buflen) ...@@ -229,12 +229,13 @@ get_personal (header_t hdr, const char *field, char *personal, size_t buflen)
229 { 229 {
230 address_t address = NULL; 230 address_t address = NULL;
231 size_t len = 0; 231 size_t len = 0;
232
233 frm_rfc2047_decode (hfield, sizeof (hfield));
234
232 address_create (&address, hfield); 235 address_create (&address, hfield);
233 address_get_personal (address, 1, personal, buflen, &len); 236 address_get_personal (address, 1, personal, buflen, &len);
234 address_destroy (&address); 237 address_destroy (&address);
235 238
236 frm_rfc2047_decode (personal, buflen);
237
238 if (len == 0) 239 if (len == 0)
239 strncpy (personal, hfield, buflen)[buflen - 1] = '\0'; 240 strncpy (personal, hfield, buflen)[buflen - 1] = '\0';
240 } 241 }
......