VOTable: Add a warning for integers that are out of range #825

Merged
merged 1 commit into from Feb 27, 2013

Conversation

Projects
None yet
2 participants
Contributor

mdboom commented Feb 26, 2013

As pointed out by Andy Ptak in the mailing list thread: "Problem reading VOTable produced by HLA", integers that are out-of-range can cause exceptions from Numpy on certain platforms.

To address this (i.e. not crash) as well as to make it more obvious that the VOTable file is malformed, this PR adds a new warning when an integer value is out of range for the size of the field, and also truncates the value to be within range.

Owner

eteq commented Feb 26, 2013

Looks good to me if the tests pass.

Hopefully the HLA will fix the actual underlying problem, too.

Contributor

mdboom commented Feb 26, 2013

I got a report about an hour ago from Rick White that this has been fixed upstream, and I just confirmed here:

http://hla.stsci.edu/cgi-bin/hlaSIAP.cgi?inst=ACS&pos=11.888333,-25.288056&size=0.001389

that it has been.

Owner

eteq commented Feb 27, 2013

Great, then I'll go ahead and merge this now just in case some other VOTable does this sort of wrongness.

eteq added a commit that referenced this pull request Feb 27, 2013

Merge pull request #825 from mdboom/vo/integer-overflow
VOTable: Add a warning for integers that are out of range

@eteq eteq merged commit 358303c into astropy:master Feb 27, 2013

1 check passed

default The Travis build passed
Details
Contributor

mdboom commented Feb 27, 2013

Great -- I just tagged this as 0.2.1 (I wasn't able to yesterday). @iguananaut: hopefully that still means it will end up in your merge queue.

embray added a commit to embray/astropy that referenced this pull request Mar 29, 2013

Merge pull request #825 from mdboom/vo/integer-overflow
VOTable: Add a warning for integers that are out of range

@mdboom mdboom deleted the mdboom:vo/integer-overflow branch May 21, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment