daemon: Fixed formatting string

Limit the length of the sscanf field to prevent being attacked.

".*" conversion rule is not available in scanf/sscanf/fscanf series functions,
the only way to do this is using explicit number to limit the length of the field.

Fixes #665