Commit Graph

19 Commits

Author SHA1 Message Date
Ward Fisher
b3388178b4 Corrected a double-free issue reported by Coverity. 2013-12-17 15:54:14 -07:00
Quincey Koziol
b3044de434 Refactored read_scale(), memio_new(), var_create_dataset() and makespecial()
to clean up resources properly on failure.

Refactored doubly-linked list code for objects in the libsrc4 directory,
    cleaning up the add/del routines, breaking out the common next/prev
    pointers into a struct and extracting the add/del operations on them,
    changed the list of dims to add new dims in the same order as the other
    types, made all add routines able to optionally return a pointer to the
    newly created object.

Removed some dead code (pg_var(), nc4_pg_var1(), nc4_pg_varm(), misc. small
    routines, etc)

Fixed fill value handling for string types in nc4_get_vara().

Changed many malloc()+strcpy() pairs into calls to strdup().

Cleaned up misc. other minor Coverity issues.
2013-12-08 03:29:26 -06:00
Ward Fisher
d91aa28110 Corrected a couple resource leak issues reported by Coverity static analysis. 2013-08-09 16:19:45 -06:00
Ward Fisher
1c23ec06b8 Merging latest from netcdf-cmake branch. Includes a handful
of fixes for coverity-identified errors.
2013-07-19 21:32:27 +00:00
Ward Fisher
0444a6c711 Fixed a couple of tests on Windows,
Fixed some compile errors on Windows.
2013-02-21 23:56:15 +00:00
Ward Fisher
afa67452f6 Took some time to address a handful of errors identified by Coverity.
Primarily focused on memory errors falling into a couple different types:

1) Static overrun errors.
2) Dereference uninitialized memory errors.

make distcheck works after applying these fixes, and coverity no longer sees an issue, so hopefully they are properly resolved.
2012-11-14 18:24:45 +00:00
Dennis Heimbigner
5ca78309cc The effect of this change is to make the struct NC structure
contain as little file-type specific info as possible.  It
modifies especially libsrc so that all of the netcdf-3 data
that used to be in struct NC is now kept in a separate chunk
of data pointed to by the struct NC. This makes all of
current protocols consistent: netcdf-3, netcdf-4, and dap.
2012-09-06 19:44:03 +00:00
Dennis Heimbigner
bc3a732e25 fix e-support YOP-841363 plus a number of coverity found bugs 2012-08-02 18:43:21 +00:00
Ward Fisher
75a48b9e9e Integrated changes from trunk, began adding CMake support, updated 'build everything' script. 2012-07-02 22:59:59 +00:00
Dennis Heimbigner
60b3f3b6f3 change file permissions for memio and mmapio 2012-06-28 17:12:02 +00:00
Dennis Heimbigner
5b2aee44a7 windows support fixes plus add --disable-diskless 2012-05-15 17:48:27 +00:00
Dennis Heimbigner
14c3dae49e more win32 fixes 2012-05-15 03:47:52 +00:00
Dennis Heimbigner
4f68d6c5f8 win32/mingw fixes 2012-05-15 03:13:08 +00:00
Dennis Heimbigner
00e50f5a44 1. changed from using port 8080 to 8081 for motherlode
2. Fixed Ward's IGNORE problem with oc
3. Mmap support now works.
4. Fix an uninitialized variable pointed out by Russ in dnclog.c
2012-04-22 20:34:21 +00:00
Dennis Heimbigner
353b7ebf53 fix bug in memio.c realloc code 2012-04-12 02:06:28 +00:00
Dennis Heimbigner
48ca394d2e diskless: make read and write loop to read/write whole file when persisting 2012-04-09 22:03:02 +00:00
Dennis Heimbigner
5536bccee1 allow NC_DISKLESS with nc_open() to operate as a in-memory cache 2012-04-08 22:47:38 +00:00
Dennis Heimbigner
7a9802dc7c forgot to check the case when HAVE_MEMMOVE is false 2012-03-28 17:46:25 +00:00
Dennis Heimbigner
7e27052f87 - Implemented diskless files for both netcdf classic and extended.
The in-memory files can be made persistent if nc_create is called with
  NC_DISKLESS|NC_WRITE flags set. Initial test case also included.
- Modified ncio mechanism to support
  multiple ncio packages; this is so we
  can have posixio and memio operating
  at the same time.
- cleanup up a bunch of lint issues (unused variables, etc).
2012-03-26 01:34:32 +00:00