On error path, do not set the signature len if a NULL pointer was given.
Comment out loops not being executed.