Ticket #125 (closed defect: duplicate)

Opened 11 months ago

Last modified 11 months ago

segmentation faults on 1.1.1

Reported by: anonymous Owned by:
Priority: major Milestone:
Component: common Version: version 1.1.1
Keywords: Cc:
Application Version: not applicable Blocked By:
Blocking: Sensitive: no
Needs experiment: no
Experimental observations:

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

Changed 11 months ago by aduran

  • status changed from new to closed
  • resolution set to duplicate

Thanks for the report. This is the same problem as #121 and it is already fixed in the repository ([a32e8a9766183e3b51756ba654f9177508840ff2]).

Note: See TracTickets for help on using tickets.