From 2db027faba4c5a23a5e47c4f90055b2f62a2c75e Mon Sep 17 00:00:00 2001 From: fredrik Date: Sun, 6 May 2007 18:13:35 +0000 Subject: [PATCH] More robust baseconv. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@1001 959494ce-11ee-0310-bf91-de5d638817bd --- config/baseconv.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.11.0