Commit Graph

341 Commits

Author SHA1 Message Date
Dennis Heimbigner
686304e804 conflict resolution on include/nclistmap.h 2018-03-01 22:23:38 -07:00
Dennis Heimbigner
8cb1fc4cfe This is the second step in refactoring the libsrc4 code.
The first was branch newhash0.dmh.

As with newhash0.dmh, these changes should be transparent.
2018-02-24 20:36:24 -07:00
Ward Fisher
f9f27c5ab7
Merge branch 'master' into newhash0.dmh 2018-02-21 14:19:43 -07:00
Dennis Heimbigner
727b613459 This is the initial step in moving to the new higher performance
(I hope) metadata mechanism. This mostly just adds new pieces of
code (e.g. nclistmap) and does some minor fixes.

It should be transparent to everything else.
The next set of changes will be the big step.
2018-02-08 19:53:40 -07:00
Ed Hartnett
723cc840a3 added missing file 2018-02-08 08:02:28 -07:00
Ed Hartnett
2358d4a910 moved HDF4 to its own dispatch layer 2018-02-08 06:20:58 -07:00
Ward Fisher
e0577cb251 Merge branch 'ejh_fill_value_string_unidata' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into ejh_batch 2018-02-05 11:47:34 -07:00
Ward Fisher
0d420fcfbb
Merge branch 'master' into cdf5_var_len 2018-02-02 10:31:46 -07:00
Ward Fisher
27693ba4a3
Merge branch 'master' into nc3-per-var-fill-v2 2018-02-01 11:45:40 -07:00
Ed Hartnett
94c23712b7 extra tests, plus fill value fixes for string type 2018-01-30 14:39:47 -07:00
Ward Fisher
8487a0a954
Merge branch 'master' into cdf5_var_len 2018-01-25 16:30:58 -07:00
Ward Fisher
7df45badce Added ERANGE_FILL information to netcdf_meta.h 2018-01-25 12:46:46 -07:00
Ward Fisher
3a758cc32c Reinserted the NC_HAVE_META_H macro in netcdf.h 2018-01-25 12:41:39 -07:00
Ward Fisher
d0339c8902 Merge branch 'pr-catchup' into v4.6.0-release-branch 2018-01-24 15:51:24 -06:00
Ward Fisher
d1296e5d9a
Merge branch 'master' into nc3-per-var-fill-v2 2018-01-23 17:36:14 -07:00
Dennis Heimbigner
3e47f5f300 Rebuilt the filter parameter handling code to use a common
parser everywhere.
2018-01-23 16:00:11 -07:00
Ed Hartnett
9fcc6b62fd merged 769 2018-01-20 06:05:17 -07:00
Ed Hartnett
dbaef7fa2d merged 763 2018-01-20 06:05:03 -07:00
Ed Hartnett
01fae078a5 merged 766 2018-01-20 06:04:49 -07:00
Ed Hartnett
3f83998b26
Merge branch 'master' into ejh_rename2 2018-01-18 16:05:04 -07:00
Ed Hartnett
cf92670687 added guards for header files that needed them 2018-01-17 09:20:20 -07:00
Ed Hartnett
09ee32b205 fixed some header files, checked some return values 2018-01-17 08:25:15 -07:00
Ed Hartnett
3626c776ae test development 2018-01-16 09:43:41 -07:00
Ed Hartnett
0862d6d7ce removed MPE calls 2018-01-16 09:23:36 -07:00
Greg Sjaardema
4d9fb6765b
Make it more clear that limits are not enforced anymore
Make it clear that NC_MAX_DIMS, NC_MAX_VARS, and NC_MAX_ATTRS limits are not enforced after netcdf-4.5.0 to avoid confusion
2018-01-11 10:41:53 -07:00
Ed Hartnett
3fa3d3f9f9 ported rename fix changes from branch ejh_fill_values for easy merging 2018-01-05 06:01:22 -07:00
Wei-keng Liao
0f4a85b9f2 a clean commit for #383 2017-12-20 20:53:30 -06:00
Ed Hartnett
652f3b1a9c more docs 2017-12-04 13:11:54 -07:00
Ed Hartnett
4de61e21f2 more docs, more cleaning 2017-12-04 12:21:14 -07:00
Ed Hartnett
ce1df112a5 more testing for nc4var.c functions 2017-12-01 09:38:32 -07:00
Ed Hartnett
2023ed6b7c fixed problems with bad inputs to nc_def_Var 2017-12-01 09:08:12 -07:00
Ed Hartnett
3c5404ccf7
Merge branch 'master' into ejh_ncfunc_testing 2017-11-28 00:04:38 +00:00
Ed Hartnett
69f2089723 cleaned up err_macros.h 2017-11-24 10:03:01 -07:00
Dennis Heimbigner
4db4393e69 Begin changing over to use strlcat instead of strncat because
strlcat provides better protection against buffer overflows.

Code is taken from the FreeBSD project source code. Specifically:
https://github.com/freebsd/freebsd/blob/master/lib/libc/string/strlcat.c
License appears to be acceptable, but needs to be checked by e.g. Debian.

Step 1:
1. Add to netcdf-c/include/ncconfigure.h to use our version
   if not already available as determined by HAVE_STRLCAT in config.h.
2. Add the strlcat code to libdispatch/dstring.c
3. Turns out that strlcat was already defined in several places.
   So remove it from:
	ncgen3/genlib.c
	ncdump/dumplib.c
3. Define strlcat extern definition in ncconfigure.h.
4. Modify following directories to use strlcat:
	libdap2 libdap4 ncdap_test dap4_test
   Will do others in subsequent steps.
2017-11-23 10:55:24 -07:00
Ward Fisher
e97911a592 Updated v1hpg.c to make header padding with null byte checks optional. 2017-11-20 16:08:06 -07:00
Ed Hartnett
6aa9b38537 merging documentation fixes 2017-11-14 11:53:01 -07:00
Ward Fisher
16d6f94f30 Merge branch 'master' into filters.dmh 2017-11-13 11:15:02 -07:00
Ed Hartnett
02b66af553 added more documentation 2017-11-08 03:33:44 -07:00
Ward Fisher
b92ae0cdbc Merge branch 'ejh_fix_use_cdf' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into more_ejh_pulls 2017-11-07 14:14:10 -07:00
Ed Hartnett
6ce15853d6 fixed ENABLE_CDF5 issue in some tests 2017-11-05 09:06:48 -07:00
Ward Fisher
bb2505cf4e
Merge branch 'master' into newrc.dmh 2017-11-03 14:57:27 -06:00
Ward Fisher
f98635be1b Merge remote-tracking branch 'origin/h5offset.dmh' into dmh_multi_merge 2017-11-03 12:40:52 -06:00
Ward Fisher
0b5503d8ac jMerge branch 'master' of https://github.com/gsjaardema/netcdf-c into multi-merge 2017-11-02 11:20:21 -06:00
Ed Hartnett
711bbfbe48 applied untabify 2017-11-02 05:09:11 -06:00
Ed Hartnett
425ca7365c added error code message for NC_EMPI 2017-11-02 05:07:31 -06:00
Ward Fisher
2987fb0bed
Merge branch 'master' into master 2017-10-31 14:01:08 -06:00
Dennis Heimbigner
9935d54fdf Merge master and resolve conflicts 2017-10-28 13:57:23 -06:00
Dennis Heimbigner
9983b9d911 re e-support UBS-599337
re pull request https://github.com/Unidata/netcdf-c/pull/405
re pull request https://github.com/Unidata/netcdf-c/pull/446

Notes:
1. This branch is a cleanup of the magic.dmh branch.
2. magic.dmh was originally merged, but caused problems with parallel IO.
   It was re-issued as pull request https://github.com/Unidata/netcdf-c/pull/446.
3. This branch + pull request replace any previous pull requests and magic.dmh branch.

Given an otherwise valid netCDF file that has a corrupted header,
the netcdf library currently crashes. Instead, it should return
NC_ENOTNC.

Additionally, the NC_check_file_type code does not do the
forward search required by hdf5 files. It currently only looks
at file position 0 instead of 512, 1024, 2048,... Also, it turns
out that the HDF4 magic number is assumed to always be at the
beginning of the file (unlike HDF5).
The change is localized to libdispatch/dfile.c See
https://support.hdfgroup.org/release4/doc/DSpec_html/DS.pdf

Also, it turns out that the code in NC_check_file_type is duplicated
(mostly) in the function libsrc4/nc4file.c#nc_check_for_hdf.

This branch does the following.
1. Make NC_check_file_type return NC_ENOTNC instead of crashing.
2. Remove nc_check_for_hdf and centralize all file format checking
   NC_check_file_type.
3. Add proper forward search for HDF5 files (but not HDF4 files)
   to look for the magic number at offsets of 0, 512, 1024...
4. Add test tst_hdf5_offset.sh. This tests that hdf5 files with
   an offset are properly recognized. It does so by prefixing
   a legal file with some number of zero bytes: 512, 1024, etc.
5. Off-topic: Added -N flag to ncdump to force a specific output dataset name.
2017-10-24 16:25:09 -06:00
Dennis Heimbigner
440cf724ad Update by merging with master 2017-10-21 13:37:09 -06:00
Ward Fisher
e8cd6958a9 Merge branch 'v4.5.0-release-branch' into cal366.dmh 2017-10-09 14:08:21 -06:00