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

ms_readleapsecondfile #17

Closed
wants to merge 4 commits into from

Conversation

pn2200
Copy link
Contributor

@pn2200 pn2200 commented May 18, 2018

Return number of leap seconds read on success, and add a test verifying that behavior. Free leapsecondlist if it has already been allocated, to avoid segfaults when calling ms_readleapsecondfile multiple times.

Add a test that segfaults when the global leapsecondlist variable
is not null, which could happen if a user sets it to a valid
pointer or calls ms_readleapsecondfile twice.
Avoid a null pointer dereference that occurs if the global
leapsecondlist points to valid memory, which can occur if
ms_readleapsecondfile is called twice, by freeing the memory
before reading the new list.
@chad-earthscope
Copy link
Contributor

Great, thank you @pn2200! We had recently discovered this problem internally and I had not yet committed and fix or an issue, so this will save me time. I hope to review this in the next couple of weeks and release an updated.

@pn2200
Copy link
Contributor Author

pn2200 commented Aug 28, 2018

@chad-iris, I haven't seen any update related to this pull request or the related issue #18. Can you review this pull request?

@chad-earthscope
Copy link
Contributor

Fixed in 075c729 and 22eb043. Tests not included, I would like to form them differently.

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

Successfully merging this pull request may close these issues.

None yet

2 participants