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

Potentially uninitialised variable nu #1

Open
andyjohnson0 opened this issue Mar 20, 2024 · 1 comment
Open

Potentially uninitialised variable nu #1

andyjohnson0 opened this issue Mar 20, 2024 · 1 comment

Comments

@andyjohnson0
Copy link

In os_cartesian_to_lat_lon() (os_coord_transform.c::54) the value of nu is potentially uninitialised before use on line 64 if the while loop at line 55 is not entered.

@chriscant
Copy link
Owner

I can see that this potentially an issue, which appears in the code I've used from https://github.com/mossblaser/os_coord which hasn't changed in 11 years. This in turn was based on another repository by Chris Veness. The latest relevant code is at https://github.com/chrisveness/geodesy/blob/master/osgridref.js#L89

I don't know the algorithm being used. The lat_lon.eh value being set is the Ellipsoidal height which I don't knowingly use. I imagine that nu could be initialised to zero and that would be fine.

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

2 participants