Merge pull request #115 from kaleb-himes/BUG_FIX
Fix bug where old i counter used instead of ret val for arg locationpull/121/head
commit
c3d151c71a
|
@ -6,7 +6,8 @@ This is the wolfSSL: Command Line Utility (wolfCLU).
|
||||||
|
|
||||||
To use this feature, please configure and install wolfssl with the following commands:
|
To use this feature, please configure and install wolfssl with the following commands:
|
||||||
|
|
||||||
./configure --enable-pwdbased --enable-opensslextra --enable-keygen --enable-ed25519
|
./configure --enable-pwdbased --enable-opensslextra --enable-keygen \
|
||||||
|
--enable-ed25519 --enable-certgen \
|
||||||
&& make && make check
|
&& make && make check
|
||||||
|
|
||||||
If that succeeds, run:
|
If that succeeds, run:
|
||||||
|
|
|
@ -88,10 +88,14 @@ int wolfCLU_hashSetup(int argc, char** argv)
|
||||||
return FATAL_ERROR;
|
return FATAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* returns location of the arg in question if present */
|
||||||
ret = wolfCLU_checkForArg("-in", 3, argc, argv);
|
ret = wolfCLU_checkForArg("-in", 3, argc, argv);
|
||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
/* input file/text */
|
/* input file/text */
|
||||||
in = XMALLOC(strlen(argv[i+1])+1, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
|
int argLen = (int) XSTRLEN(argv[ret+1]);
|
||||||
|
int fullLen = (int) ((argLen + 1) * sizeof(char));
|
||||||
|
|
||||||
|
in = XMALLOC(fullLen, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
if (in == NULL)
|
if (in == NULL)
|
||||||
return MEMORY_E;
|
return MEMORY_E;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue