Backport r4621 - Core:
- add additional checks for valid firmware config file size;