diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-12 16:23:05 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-12 16:23:05 +0200 |
| commit | 182e2d45678d0487be71370c37b88daca3d2c54b (patch) | |
| tree | 3987ecd9bade082a7b41901c2376daa73401e548 /tools/000_gendata | |
| parent | da8fdd4955fd24666643915a6728678e9965a0d3 (diff) | |
| download | nissy-core-182e2d45678d0487be71370c37b88daca3d2c54b.tar.gz nissy-core-182e2d45678d0487be71370c37b88daca3d2c54b.zip | |
Make gendata and co safer by checking buffer size
Diffstat (limited to 'tools/000_gendata')
| -rw-r--r-- | tools/000_gendata/gendata.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/000_gendata/gendata.c b/tools/000_gendata/gendata.c index 0d647f9..213852f 100644 --- a/tools/000_gendata/gendata.c +++ b/tools/000_gendata/gendata.c | |||
| @@ -19,7 +19,7 @@ run(void) { | |||
| 19 | default: | 19 | default: |
| 20 | nissy_datainfo(size, buf, write_stdout); | 20 | nissy_datainfo(size, buf, write_stdout); |
| 21 | consistent = nissy_checkdata(size, buf) == 0; | 21 | consistent = nissy_checkdata(size, buf) == 0; |
| 22 | expected = check_distribution(solver, buf); | 22 | expected = check_distribution(solver, size, buf); |
| 23 | if (consistent && expected) { | 23 | if (consistent && expected) { |
| 24 | printf("\n"); | 24 | printf("\n"); |
| 25 | printf("Generated %" PRId64 " bytes.\n", size); | 25 | printf("Generated %" PRId64 " bytes.\n", size); |
