Ticket #125 (closed defect: duplicate)
segmentation faults on 1.1.1
Description
I'm getting some segfaults on 1.1.1 version.
Probably the solution is to replace the sprintfs with snprintfs in common/bots_main.c.
$ diff -u common/bots_main.c.orig common/bots_main.c
--- common/bots_main.c.orig 2011-03-15 15:37:33.000000000 +0200
+++ common/bots_main.c 2011-03-15 15:35:07.000000000 +0200
@@ -460,11 +460,11 @@
snprintf(bots_ldflags, BOTS_TMP_STR_SZ, LDFLAGS);
#if defined(MANUAL_CUTOFF)
- sprintf(bots_cutoff, BOTS_TMP_STR_SZ, "manual (%d)",bots_cutoff_value);
+ snprintf(bots_cutoff, BOTS_TMP_STR_SZ, "manual (%d)",bots_cutoff_value);
#elif defined(IF_CUTOFF)
- sprintf(bots_cutoff, BOTS_TMP_STR_SZ, "pragma-if (%d)",bots_cutoff_value);
+ snprintf(bots_cutoff, BOTS_TMP_STR_SZ, "pragma-if (%d)",bots_cutoff_value);
#elif defined(FINAL_CUTOFF)
- sprintf(bots_cutoff, BOTS_TMP_STR_SZ, "final (%d)",bots_cutoff_value);
+ snprintf(bots_cutoff, BOTS_TMP_STR_SZ, "final (%d)",bots_cutoff_value);
#else
strcpy(bots_cutoff,"none");
#endif
Thanks,
Change History
Note: See
TracTickets for help on using
tickets.
