Skip to content

Commit 66b9ed9

Browse files
committed
Fix 102730 - STRING_SIZE
1 parent c59aa59 commit 66b9ed9

File tree

1 file changed

+3
-3
lines changed
  • ydb/library/benchmarks/gen/tpch-dbgen

1 file changed

+3
-3
lines changed

ydb/library/benchmarks/gen/tpch-dbgen/print.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ print_prep(int table, int update)
6969
this_segment=++insert_orders_segment;
7070
else
7171
this_segment=++insert_lineitem_segment;
72-
sprintf(upath, "%s%c%s.u%d.%d",
72+
snprintf(upath, 128, "%s%c%s.u%d.%d",
7373
env_config(PATH_TAG, PATH_DFLT),
7474
PATH_SEP, tdefs[table].name, update%10000,this_segment);
7575
}
@@ -83,13 +83,13 @@ print_prep(int table, int update)
8383
if ( delete_segments )
8484
{
8585
++delete_segment;
86-
sprintf(upath, "%s%cdelete.u%d.%d",
86+
snprintf(upath, 128, "%s%cdelete.u%d.%d",
8787
env_config(PATH_TAG, PATH_DFLT), PATH_SEP, -update%10000,
8888
delete_segment);
8989
}
9090
else
9191
{
92-
sprintf(upath, "%s%cdelete.%d",
92+
snprintf(upath, 128, "%s%cdelete.%d",
9393
env_config(PATH_TAG, PATH_DFLT), PATH_SEP, -update);
9494
}
9595
return(fopen(upath, "w"));

0 commit comments

Comments
 (0)