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

Missing nil check in formattedValue method #1384

Closed
martinmr opened this issue Nov 4, 2022 · 0 comments
Closed

Missing nil check in formattedValue method #1384

martinmr opened this issue Nov 4, 2022 · 0 comments

Comments

@martinmr
Copy link
Contributor

martinmr commented Nov 4, 2022

Description

Missing nil check in formattedValue method causes a segmentation fault.

Steps to reproduce the issue:

  1. Create a file and set Styles.CellXfs to nil. We originally saw this issue with a malformed file but can't access the file itself due to company policy.
  2. Call formattedValue on this file.
  3. Segmentation fault is triggered when trying to access Styles.CellXfs.Xf array.

Excelize version or commit ID:
4998b7b

@xuri xuri closed this as completed in 75c912c Nov 5, 2022
xuri pushed a commit to JDavidVR/excelize that referenced this issue Jul 11, 2023
…ax-os#1385)

- Add nil pointer guard in cell format
- Add tests to verify the nil checks in formattedValue

Co-authored-by: Zach Clark <zachmclark@gmail.com>
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
…ax-os#1385)

- Add nil pointer guard in cell format
- Add tests to verify the nil checks in formattedValue

Co-authored-by: Zach Clark <zachmclark@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant