daemon: Fixed formatting string

Limit the length of the sscanf field to prevent being attacked.

Fixes #665