crypt-burn: Add sanity check for buffer length
This value is passed to chunk_alloc(), which LGTM complains about.
This commit is contained in:
parent
1966f4332b
commit
7a13246668
|
@ -196,6 +196,11 @@ int main(int argc, char *argv[])
|
|||
if (argc > 2)
|
||||
{
|
||||
len = atoi(argv[2]);
|
||||
if (len > (2^30))
|
||||
{
|
||||
fprintf(stderr, "buffer too large (1 GiB limit)\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (argc > 3)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue