Fixed cod_seq length issue.
Fixed insecure sprintf calls.
Fixed inputfilename length issue.