diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c index 7bcd5b72bd5657809bd0a373a287ddf4d162f2f2..ace4c113c88850613aff2f9158a08a6164fc6bac 100644 --- a/tools/qt-faststart.c +++ b/tools/qt-faststart.c @@ -27,6 +27,7 @@ #include #include #include +#include #ifdef __MINGW32__ #define fseeko(x,y,z) fseeko64(x,y,z) @@ -98,6 +99,11 @@ int main(int argc, char *argv[]) return 0; } + if (!strcmp(argv[1], argv[2])) { + fprintf(stderr, "input and output files need to be different\n"); + return 1; + } + infile = fopen(argv[1], "rb"); if (!infile) { perror(argv[1]);