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

Backend aborts with cfitsio 4.2.0 #1231

Closed
pford opened this issue Jan 10, 2023 · 2 comments · Fixed by #1232
Closed

Backend aborts with cfitsio 4.2.0 #1231

pford opened this issue Jan 10, 2023 · 2 comments · Fixed by #1232
Assignees
Labels
bug Something isn't working
Milestone

Comments

@pford
Copy link
Collaborator

pford commented Jan 10, 2023

Describe the bug
When the backend is built with cfitsio 4.2.0, it aborts when you open a FITS file

To Reproduce
Steps to reproduce the behavior:

  1. Click on FITS file in file list

Expected behavior
Get extended file info or open image

@pford pford added the bug Something isn't working label Jan 10, 2023
@pford pford added this to the v4.0-b1 milestone Jan 10, 2023
@pford pford self-assigned this Jan 10, 2023
@kswang1029
Copy link
Contributor

Is it a bug in cfitsio or due to API changes?

@pford
Copy link
Collaborator Author

pford commented Jan 11, 2023

It is a bug in the backend caused by a change in implementation in cfitsio. The fits_read_key function has the same signature but it now copies the comment to a char array (return value) with strncpy instead of strcat. But the n in strncpy is the max length of a comment not the length of the char array, which was undersized in the backend code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants