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

We need a larger NC_MAX_NAME for cases of URLs in file names #2455

Closed
edwardhartnett opened this issue Jul 8, 2022 · 0 comments · Fixed by #2457
Closed

We need a larger NC_MAX_NAME for cases of URLs in file names #2455

edwardhartnett opened this issue Jul 8, 2022 · 0 comments · Fixed by #2457

Comments

@edwardhartnett
Copy link
Contributor

I just noticed this change that @DennisHeimbigner made to tst_quantize.c to add nczarr testing:

#ifdef TESTNCZARR
	    char file_name[4096];
#else
	    char file_name[NC_MAX_NAME + 1];
#endif

What is happening here is that I am using NC_MAX_NAME (from netcdf.h), but that is set at:

#define NC_MAX_NAME 256

So this is apparently not long enough if URLs can be involved?

In that case I recommend we define, in nc_tests.h (not netcdf.h) NC_MAX_FILENAME to 4096, and then we can use that in tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant