close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#387 closed defect (fixed)

Segmentation fault in FormatReal

Reported by: Jorge Owned by: Jorge
Priority: normal Milestone:
Component: Text Version: head
Severity: normal Keywords:
Cc:

Description

This code makes tol crash:

Text FormatReal(1.0, "1.0");

comments: i know "1.0" is not a valid format string but this does not means that
segfault is raised in such situation.

regards,

Jorge

Change History (8)

comment:1 Changed 19 years ago by Víctor de Buen Remiro

Owner: changed from danirus to Víctor de Buen Remiro

comment:2 Changed 19 years ago by Víctor de Buen Remiro

Status: newassigned

We are working about this bug
Thanks to report it

comment:3 Changed 19 years ago by Víctor de Buen Remiro

Sorry Jorge

I cannot reproduce this very simple error.
My windows CVS TOL version doesn't crashes and returns the expected value.
May it's already fixed or it happens just in Linux.
Could you probe it again?

comment:4 Changed 19 years ago by Jorge

Owner: changed from Víctor de Buen Remiro to Jorge
Status: assignednew

ok, Victor, I'll check it again. In any case I'll take care of this report.

thanks,

comment:5 Changed 19 years ago by Jorge

Status: newassigned

There was a type error in the code to raise the bug, the correct code to
generate the bug is:

Text a = FormatReal(1.0, "%1.0");

regards,

comment:6 Changed 19 years ago by Víctor de Buen Remiro

I follow being unable to reproduce the error
In windows with Visual C 6, null string "" is returned but no crash happens

comment:7 Changed 19 years ago by Jorge

Resolution: fixed
Status: assignedclosed

return value of sprintf must be checked

comment:8 Changed 18 years ago by Víctor de Buen Remiro

bug_file_loc: http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000387
Note: See TracTickets for help on using tickets.