Commits
clee83 committed ed51cc505d6
Fix a buffer overflow and a problematic code based on wrong assumption. An HDF-EOS2 API function GDfieldinfo() has a value-result argument giving the comma-separated list of dimensions. The problem is that it seems there is no way to figure out enough buffer size. I got the number 80 from one of HDF-EOS2 tools. (I guess it was heconvert or bindump.) This has worked fine, but Joe found one file that breaks this. Also, that file revealed another problem. Previously, h4toh5 assumes that each grid field is at least two-dimensional, and two required dimensions are XDim and YDim. I thought this is kind of requirement because the HDF-EOS2 Reference states the following: "Datafields in a Grid data set are rectilinear arrays of two or more dimensions" This was not true in that file. So, I changed the code to handle that situation. Without this fix, h4toh5 could falsely reject the above file, and say that file has inconsistent XDim and YDim order.