diff --git a/Source/exehead/util.c b/Source/exehead/util.c index e1202185..0146713f 100644 --- a/Source/exehead/util.c +++ b/Source/exehead/util.c @@ -289,6 +289,8 @@ int NSISCALL is_valid_instpath(char *s) mystrcpy(tmp, s); + validate_filename(tmp); + root = skip_root(tmp); if (!root) @@ -681,7 +683,7 @@ char * NSISCALL GetNSISString(char *outbuf, int strtab) return ps_tmpbuf; } -char * NSISCALL validate_filename(char *in) { +void NSISCALL validate_filename(char *in) { char *nono = "*?|<>/\":"; char *out; char *out_save; @@ -715,7 +717,6 @@ char * NSISCALL validate_filename(char *in) { else break; } while (out_save < out); - return out_save; } #ifdef NSIS_CONFIG_LOG diff --git a/Source/exehead/util.h b/Source/exehead/util.h index f6e42af3..3c727da5 100644 --- a/Source/exehead/util.h +++ b/Source/exehead/util.h @@ -65,7 +65,7 @@ char * NSISCALL findchar(char *str, char c); void NSISCALL trimslashtoend(char *buf); char * NSISCALL skip_root(char *path); int NSISCALL is_valid_instpath(char *s); -char * NSISCALL validate_filename(char *fn); +void NSISCALL validate_filename(char *fn); void NSISCALL MoveFileOnReboot(LPCTSTR pszExisting, LPCTSTR pszNew); void NSISCALL mini_memcpy(void *out, const void *in, int len);