Commit Graph

3888 Commits

Author SHA1 Message Date
Dennis Heimbigner
1b564ed257 merge v4.5 2017-07-24 19:04:38 -06:00
Dennis Heimbigner
0dfe8465bf Merge branch 'v4.5.0-release-branch' into cal366.dmh 2017-07-24 19:03:11 -06:00
Dennis Heimbigner
9e2d6faaf6 Solve issue https://github.com/Unidata/netcdf-c/issues/359
from e-support OYW-455599.

Problem was that in nctime.c#CDMonthDay, it was setting up
the month -> #days table correctly, but it did not use it
because it forgot to check for Cd366, it only checked for Cd365.
2017-07-24 18:59:16 -06:00
Ward Fisher
401fcc572a Updated release notes in support of https://github.com/Unidata/netcdf-c/issues/385 2017-07-14 10:43:19 -06:00
Ward Fisher
97b8e9d4cb Corrected the way large file support was implemented in cmakelists.txt, not sure why it was like that to start with. In support of https://github.com/Unidata/netcdf-c/issues/385 2017-07-13 17:15:56 -06:00
Ward Fisher
d18378c69b Merge pull request #409 from Unidata/DennisHeimbigner-patch-1
Update install.md
2017-07-13 10:47:22 -06:00
Ward Fisher
74448c6c2d Merge branch 'master' into DennisHeimbigner-patch-1 2017-07-06 13:44:25 -06:00
Ward Fisher
e4f81a1611 Fixed issue on 32-bit systems. 2017-07-05 14:57:12 -06:00
Ward Fisher
fd2c575597 Updated release notes. 2017-06-29 11:16:02 -06:00
Ward Fisher
d73c501a17 Merge remote-tracking branch 'origin/issue310.dmh' into gh434 2017-06-29 10:27:36 -06:00
Ward Fisher
ed4dfb4402 Testing something with the pure h5 tests. 2017-06-28 16:51:29 -06:00
Dennis Heimbigner
0ae22325f3 Forgot to add test files to github 2017-06-28 15:08:20 -06:00
Dennis Heimbigner
dc9e31df68 Fix for github issue https://github.com/Unidata/netcdf-c/issues/310.
The problem was that for opendap, it is possible to use keywords
as identifiers
 when there is no ambiguity. However, the DAP2
parser lost the case of the identifier used the lower case version.
Fix is to use the actual text of the symbol when it is used as an identifier.
Also added a test case for this (kwcase.*).

Additionally cleaned up some misc. dap2 testing problems.
1. ncdap_test/tst_ncdap3.sh was using an empty test set.
   restored the testing of datasets.
2. as a consequence of #1, some tests needed to be updated with minor
   tweeks.
3. fix dapmerge to handle multiple DODS_EXTRAS attributes.
4. modify buildattribute to suppress nul characters and terminate
   the name at the first nul.
5. clean up various test scripts to remove residual, unused
   references to obsolete netcdf-4 translation.
6. export e.g. NCDUMP from test_common.in so that non-top-level
   shell scripts can access it.
2017-06-28 13:51:01 -06:00
Ward Fisher
8ee484b039 Merge branch 'fix_undefined_left_shift_in_ncx_get_size_t' of https://github.com/rouault/netcdf-c into v3.5.0-release-branch 2017-06-26 11:03:02 -06:00
Even Rouault
4779c8278f Fix undefined left shift in get_ix_int()
Getting the value of the x variable on the file corresponding to the below ncdump output
with -fsanitize=undefined raises

ncx.c:1034:14: runtime error: left shift of 128 by 24 places cannot be represented in type 'int'

This is due to *cp being promoted to int before doing the left shift, instead
of the intended unsigned. So do the cast to unsigned internally rather than
externally

ncdump file to reproduce:

netcdf temp {
dimensions:
	x = 2 ;
	y = 2 ;
	v = 2 ;
variables:
	int x(v) ;
	byte y(y, x) ;
data:

 x = _, _ ;

 y =
  -127, -127,
  -127, -127 ;
}

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2356

Credit to OSS Fuzz
2017-06-23 12:16:53 +02:00
Ward Fisher
3cded7eb08 Merge pull request #430 from Unidata/ncgenutf8.dmh
Remove more old utf8 code
2017-06-20 10:46:27 -06:00
Dennis Heimbigner
9cde91687a re: pull request https://github.com/Unidata/netcdf-c/pull/364
This is a follow-on in that the old utf8 code was still being
used in ncgen to convert utf8->utf16 when converting cdl to Java
(see genj.c).

The new code apparently has no utf16 support, but it does have
utf32 support. Converting utf32 -> utf16 can be approximated by
truncating the 32bits to 16 bits, unless the top 16 bits are
not zero. This latter condition is unlikely to be common because
it implies use of some rather obscure characters.

So solution is to convert to utf32 and truncate to 16 bits to
get utf16. An error is reported if the high-order truncated 16
bits are not zero. If we get complaints, then I will figure out
how to convert full utf32 to a utf16 pair.

Other changes:
1. removed the old code from ncgen.
2. changed UTF8PROC_DLLEXPORT (in utf8proc) to EXTERNL
   and added appropriate includes. This should fix
   issue https://github.com/Unidata/netcdf-c/issues/404,
   but since we cannot duplicate the failure, I am not quite
   sure.
2017-06-18 21:06:19 -06:00
Dennis Heimbigner
e2e7c20444 Merge branch 'v4.5.0-release-branch' into ncgenutf8.dmh 2017-06-18 16:38:13 -06:00
Ward Fisher
8a4f5aea95 Corrected a double-free reported by static analysis. 2017-06-15 12:09:54 -06:00
Even Rouault
b3418d2cd6 Fix undefined left shift in ncx_get_size_t()
Running a build on the .nc file corresponding to the below ncdump output
with -fsanitize=undefined raises

libsrc/ncx.c:4722:26: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'

This is due to *cp being promoted to int before doing the left shift, instead
of the intended unsigned. So do the cast to unsigned internally rather than
externally

ncdump file to reproduce:

netcdf temp {
dimensions:
	y = UNLIMITED ; // (0 currently)
	x = 109067 ;
variables:
	byte t(y, x, x) ;
data:
}

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2265

Credit to OSS Fuzz
2017-06-15 12:46:37 +02:00
Ward Fisher
08c51e6064 Corrected a couple issues uncovered when revisiting https://github.com/Unidata/netcdf-c/issues/244 2017-06-14 14:01:09 -06:00
Ward Fisher
92270070d5 Merge branch 'nc_get_filelen' of https://github.com/wkliao/netcdf-c into v4.5.0-release-branch 2017-06-09 12:50:11 -06:00
Ward Fisher
12d224eeef Corrected an issue in support of https://github.com/Unidata/netcdf-c/issues/420 2017-06-09 12:46:37 -06:00
Wei-keng Liao
308c2f764e struct stat.st_size is of type off_t 2017-06-09 02:51:06 -05:00
Ward Fisher
b73c81697c Removed a line in configure.ac that is potentially redundant and throws an error on some systems. In support of https://github.com/Unidata/netcdf-c/issues/413 2017-06-08 12:38:43 -06:00
Ward Fisher
4097dd9826 Change to address issue reported in https://github.com/Unidata/netcdf-c/issues/413 2017-06-08 11:55:00 -06:00
Ward Fisher
af91d03bac Merge branch 'fix-find-ncxx-configs' of https://github.com/ZedThree/netcdf-c into v4.5.0-release-branch 2017-06-07 17:20:16 -06:00
Ward Fisher
40f616488c Corrected release notes again. 2017-06-07 17:14:04 -06:00
Ward Fisher
4d941f5f02 Corrected release notes. 2017-06-07 15:27:11 -06:00
Ward Fisher
3a0b0d5339 Replaced sed with configure_ac_files, since sed may not be available. 2017-06-07 13:21:07 -06:00
Ward Fisher
6da1539ff9 Removed software.md from dist file. 2017-06-07 12:58:23 -06:00
Ward Fisher
1d9bd601bd Merge branch 'remove_x_int64' of https://github.com/wkliao/netcdf-c into v4.5.0-release-branch 2017-06-07 12:20:29 -06:00
Ward Fisher
d7559717a6 Merge branch 'fix_leak_in_NC4_put_propattr' of https://github.com/rouault/netcdf-c into v4.5.0-release-branch 2017-06-07 12:04:31 -06:00
Even Rouault
d02e3c952b Fix memory leak in NC4_put_propattr()
Current code only frees char* text in error cases. It should
also free it in success case.

Otherwise Valgrind reports a leak:

==28536== 64 bytes in 1 blocks are definitely lost in loss record 4 of 13
==28536==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28536==    by 0xE673496: NC4_buildpropinfo (nc4info.c:239)
==28536==    by 0xE67313B: NC4_put_propattr (nc4info.c:162)
==28536==    by 0xE65BF35: nc4_create_file (nc4file.c:468)
==28536==    by 0xE65C0AC: NC4_create (nc4file.c:564)
==28536==    by 0xE608A08: NC_create (dfile.c:1773)
==28536==    by 0xE607E6A: nc__create (dfile.c:511)
==28536==    by 0xE607E23: nc_create (dfile.c:440)

Credit to OSS Fuzz
2017-06-07 10:48:38 +02:00
Wei-keng Liao
29ae0b72fe X_INT64_MIN, X_INT64_MAX, and X_UINT64_MAX should be used internally 2017-06-06 18:20:26 -05:00
Dennis Heimbigner
30846cfff1 Cmake 2017-06-06 16:21:04 -06:00
Dennis Heimbigner
8f2f9b74e3 re: pull request https://github.com/Unidata/netcdf-c/pull/364
This is a follow-on in that the old utf8 code was still being
used in ncgen to convert utf8->utf16 when converting cdl to Java
(see genj.c).

The new code apparently has no utf16 support, but it does have
utf32 support. Converting utf32 -> utf16 can be approximated by
truncating the 32bits to 16 bits, unless the top 16 bits are
not zero. This latter condition is unlikely to be common because
it implies use of some rather obscure characters.

So solution is to convert to utf32 and truncate to 16 bits to
get utf16. An error is reported if the high-order truncated 16
bits are not zero. If we get complaints, then I will figure out
how to convert full utf32 to a utf16 pair.

Also removed the old code from ncgen.
2017-06-06 15:23:59 -06:00
Ward Fisher
b039216c42 Made memory free method conditional, based on if H5free_memory is available in libhdf5 or not. In support of code contributed by Greg Sjaardema . See https://github.com/Unidata/netcdf-c/pull/411 for more information. 2017-06-06 11:33:05 -06:00
Greg Sjaardema
ebed788181 Use H5free_memory instead of free
The documentation for `H5Tget_member_name` states that the memory returned should be freed by `H5free_memory` instead of `free`.  I was getting test failure until I changed this to call H5free_memory on a Mac OS Sierra system with hdf5-1.9.236
2017-06-06 13:22:02 -04:00
Ward Fisher
ecd40e688b Removed old unused file, static html version was moved into static/ subdirectory 2017-06-06 10:48:15 -06:00
Ward Fisher
ff8b93a1d6 Bumped release date. 2017-06-05 10:32:06 -06:00
Ward Fisher
c0d9c7c306 Merge branch 'master' into fix-find-ncxx-configs 2017-06-02 10:52:45 -06:00
Ward Fisher
89ebc2b778 Fixed an issue on visual studio which can result in a race state (more or less) when dap4 AND hdf4 support is enabled. 2017-06-01 14:48:23 -06:00
Ward Fisher
cc08dfd03e Removed an unnecessary template file. 2017-06-01 14:14:09 -06:00
Ward Fisher
81b0ab959a Fixed a missing file. 2017-06-01 14:13:54 -06:00
Ward Fisher
bad0058410 Corrected a missed string. 2017-06-01 13:40:04 -06:00
Ward Fisher
ec33411c6c Bumped revision information to next version. 2017-06-01 13:35:39 -06:00
Ward Fisher
cebc9301ec Merge branch 'gh410' 2017-06-01 11:16:11 -06:00
Ward Fisher
f1f7224f93 Corrected a false positive. 2017-06-01 09:36:54 -06:00
Ward Fisher
1f96a66414 hdf4 chunking file rename 2017-06-01 09:15:41 -06:00