[Mndiff-dev] [mndiff]: r33 - trunk/mnzip/mnzip.c
michael
subversion at mplayerhq.hu
Mon Jun 18 10:53:02 CEST 2007
Author: michael
Date: Mon Jun 18 10:53:01 2007
New Revision: 33
Log:
arg_check.diff
This fixes a segfault when mnzip is called with insufficient arguments.
patch by (Corey Hickey bugfood-ml ot fatooh dat org)
Modified:
trunk/mnzip/mnzip.c
Modified: trunk/mnzip/mnzip.c
==============================================================================
--- trunk/mnzip/mnzip.c (original)
+++ trunk/mnzip/mnzip.c Mon Jun 18 10:53:01 2007
@@ -859,7 +859,10 @@ int main(int argc, char **argv){
int outsize, i;
static const uint8_t header[7]={'M','N','Z','I','P',0,0};
- for(i=0; argv[1] && argv[1][i]; i++){
+ if (argc != 2)
+ help();
+
+ for(i=0; argv[1][i]; i++){
switch(argv[1][i]){
case 'c' : comp=1 ; break;
case 'd' : comp=0 ; break;
More information about the Mndiff-dev
mailing list