Email with data from config files (ESP332 Stack smashing protect failure!)

I'm using the Esp32 Email library ( ESP-Mail-Client) with success with hard coded values.
Example:
config.server.host_name = SMTP_HOST;
This is working fine!
But I need to read the configuration from a file from SD-Card.
I'm using a function, that is returning a string:

String Buffer=SD_findString(SD_KEY_CONFIG_Smtp_host);
config.server.host_name=Buffer;  <----- causes Stack smashing

The last line causes a stack smashing.
Arduino Stack was set to 8192 bytes
Stack smashing protect failure!
Backtrace: 0x40083ed5:0x3ffebd80 0x40090229:0x3ffebda0 0x4008335a:0x3ffebdc0 0x400db531:0x3ffebde0 0x400d469d:0x3ffebe30 0x400d78ef:0x3ffebf80
14:34:43.415 -> ELF file SHA256: b95a060031bdf700
14:34:43.762 -> Rebooting...

I tried now for days. Does anyone have a sollution?
Thank you!!!

What is the data type of config.server.host_name? It needs to be String.
ALSO, you need to check that SD_findString worked.

SD_Find_String is working in other situations with normal strings.
The data type of config.server.hostname is MB_String. A very complex item from the email-Library in MB_string.h.
I think the conversion should work. I tried multiple casts without success.

I'm sorry. The mistake was in another program. Everything is working fine now.