blob: fix possible segfault on OOB b->cfg.file access

Also add checks for non-NULL b->cfg.file and it's len being less than
PATH_MAX.