Opened 21 years ago

Closed 20 years ago

Last modified 20 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 by Víctor de Buen Remiro, 21 years ago

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

comment:2 by Víctor de Buen Remiro, 21 years ago

Status: new → assigned

We are working about this bug
Thanks to report it

comment:3 by Víctor de Buen Remiro, 21 years ago

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 by Jorge, 21 years ago

Owner: changed from Víctor de Buen Remiro to Jorge
Status: assigned → new

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

thanks,

comment:5 by Jorge, 21 years ago

Status: new → assigned

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 by Víctor de Buen Remiro, 21 years ago

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

comment:7 by Jorge, 20 years ago

Resolution: → fixed
Status: assigned → closed

return value of sprintf must be checked

comment:8 by Víctor de Buen Remiro, 20 years ago

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