Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend label format error checking in vtkSlicerScalarBarActor #3802

Closed
slicerbot opened this issue Mar 13, 2020 · 2 comments · Fixed by #6795
Closed

Extend label format error checking in vtkSlicerScalarBarActor #3802

slicerbot opened this issue Mar 13, 2020 · 2 comments · Fixed by #6795
Assignees
Labels
Priority: Low Small, non-essential improvements or fixes Type: Enhancement Improvement to functionality
Milestone

Comments

@slicerbot
Copy link
Collaborator

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.

@lassoan lassoan added Priority: Low Small, non-essential improvements or fixes Type: Enhancement Improvement to functionality labels Mar 20, 2020
@lassoan lassoan added this to the Backlog milestone Mar 20, 2020
@lassoan
Copy link
Contributor

lassoan commented Nov 15, 2022

How to reproduce the crash in latest Slicer-5.1 release:

  • Load MRHead
  • Go to Colors module
  • Scroll down to "Color legend"
  • Click "Create"
  • In "Label properties" section, change %.1f to %.1sf => Slicer crashes

@lassoan
Copy link
Contributor

lassoan commented Nov 15, 2022

@Sunderlandkyl you have worked on similar check some time ago, it would be great if you could add a check to prevent the crash. It is not urgent, it is fine if you can work on it anytime in the next few months.

@lassoan lassoan modified the milestones: Backlog, Slicer 5.3 Nov 15, 2022
Sunderlandkyl added a commit to Sunderlandkyl/Slicer that referenced this issue Jan 25, 2023
If a string specifier followed by a float specifier were added to the label format string, the SNPRINTF call would crash when interpreting the double as a string pointer.
Fixed by only printing the value to the first specifier, and by validating that the specifier defines a floating point type.

Fix Slicer#3802
Sunderlandkyl added a commit to Sunderlandkyl/Slicer that referenced this issue Jan 25, 2023
If a string specifier followed by a float specifier were added to the label format string, the SNPRINTF call would crash when interpreting the double as a string pointer.
Fixed by only printing the value to the first specifier, and by validating that the specifier defines a floating point type.

Fix Slicer#3802
lassoan pushed a commit that referenced this issue Jan 25, 2023
If a string specifier followed by a float specifier were added to the label format string, the SNPRINTF call would crash when interpreting the double as a string pointer.
Fixed by only printing the value to the first specifier, and by validating that the specifier defines a floating point type.

Fix #3802
jcfr pushed a commit to lassoan/Slicer that referenced this issue Jan 27, 2023
If a string specifier followed by a float specifier were added to the label format string, the SNPRINTF call would crash when interpreting the double as a string pointer.
Fixed by only printing the value to the first specifier, and by validating that the specifier defines a floating point type.

Fix Slicer#3802
@jcfr jcfr modified the milestones: Slicer 5.3, Slicer 5.2.2 Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Small, non-essential improvements or fixes Type: Enhancement Improvement to functionality
Development

Successfully merging a pull request may close this issue.

4 participants