Prevent potential buffer overflow in sscanf

Unbounded `sscanf` reads can cause a buffer overflow when given an overly long string.

In this case, an adversary capable of modifying the .ini file would be able to trigger a buffer overflow in dolphin.