diff options
author | Dirk Engling <erdgeist@erdgeist.org> | 2014-02-24 02:17:08 +0100 |
---|---|---|
committer | Dirk Engling <erdgeist@erdgeist.org> | 2014-02-24 02:17:08 +0100 |
commit | 86a9ddecb6e3dc0063ea2cc56576ba7c7934b400 (patch) | |
tree | cf1433bdcbb4b3ec17ef4205731cff287ead4a6c /src/export | |
parent | a0fba290f03b9d3d4327dd01d56d8f79f08951c5 (diff) |
Check parameter count before using argv
Diffstat (limited to 'src/export')
-rw-r--r-- | src/export/extract_version_3.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/export/extract_version_3.c b/src/export/extract_version_3.c index fef4241..19df167 100644 --- a/src/export/extract_version_3.c +++ b/src/export/extract_version_3.c | |||
@@ -10,7 +10,10 @@ | |||
10 | #define HUGEBLOCK (1024*1024) | 10 | #define HUGEBLOCK (1024*1024) |
11 | 11 | ||
12 | int main(int argc, char **argv) { | 12 | int main(int argc, char **argv) { |
13 | MAP in = map_file( argv[1], 1 ); | 13 | MAP in; |
14 | |||
15 | if( argc != 2 ) exit(111); | ||
16 | in = map_file( argv[1], 1 ); | ||
14 | 17 | ||
15 | unsigned const char xorkey [XORLEN] = "Just for Fun. Linus Torvalds."; | 18 | unsigned const char xorkey [XORLEN] = "Just for Fun. Linus Torvalds."; |
16 | unsigned char input [XORLEN]; | 19 | unsigned char input [XORLEN]; |