From: fredrik Date: Sun, 6 May 2007 18:13:35 +0000 (+0000) Subject: More robust baseconv. X-Git-Tag: 0.4~69 X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=2db027faba4c5a23a5e47c4f90055b2f62a2c75e;p=doldaconnect.git More robust baseconv. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@1001 959494ce-11ee-0310-bf91-de5d638817bd --- diff --git a/config/baseconv.c b/config/baseconv.c index 360daad..d27a8cf 100644 --- a/config/baseconv.c +++ b/config/baseconv.c @@ -14,6 +14,11 @@ int main(int argc, char **argv) char *(*decfn)(char *, size_t *); char *(*encfn)(char *, size_t); + if(argc < 3) { + fprintf(stderr, "usage: baseconv [4568] [4568]\n"); + fprintf(stderr, "\tenter data on stdin\n"); + exit(1); + } data = 0; if(!strcmp(argv[1], "4")) { decfn = hexdecode;