added error message to catch case where size not given
This commit is contained in:
@@ -1326,12 +1326,15 @@ static int generateCorpusWithDict(U32 seed, unsigned numFiles, const char* const
|
|||||||
DISPLAY("Error: path too long\n");
|
DISPLAY("Error: path too long\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
if(dictSize < 400){
|
||||||
|
DISPLAY("Error: either no size given or given dictionary size is too small\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
/* Generate the dictionary randomly first */
|
/* Generate the dictionary randomly first */
|
||||||
dictContent = malloc(dictSize-400);
|
dictContent = malloc(dictSize-400);
|
||||||
dictID = RAND(&seed);
|
dictID = RAND(&seed);
|
||||||
fullDict = malloc(dictSize);
|
fullDict = malloc(dictSize);
|
||||||
RAND_buffer(&seed, dictContent, dictSize-40);
|
RAND_buffer(&seed, dictContent, dictSize-400);
|
||||||
{
|
{
|
||||||
size_t dictWriteSize = 0;
|
size_t dictWriteSize = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user