aboutsummaryrefslogtreecommitdiff
path: root/tools/000_gendata/gendata.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-10-12 16:23:05 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-10-12 16:23:05 +0200
commit182e2d45678d0487be71370c37b88daca3d2c54b (patch)
tree3987ecd9bade082a7b41901c2376daa73401e548 /tools/000_gendata/gendata.c
parentda8fdd4955fd24666643915a6728678e9965a0d3 (diff)
downloadnissy-core-182e2d45678d0487be71370c37b88daca3d2c54b.tar.gz
nissy-core-182e2d45678d0487be71370c37b88daca3d2c54b.zip
Make gendata and co safer by checking buffer size
Diffstat (limited to 'tools/000_gendata/gendata.c')
-rw-r--r--tools/000_gendata/gendata.c2
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);

Generated with cgit - Back to sebastiano.tronto.net