#2106: Make ParseFile.c more robust -----------------------------+--------------------------------- Reporter: Erik Schnetter | Owner: (none) Type: defect | Status: reopened Priority: unset | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: -----------------------------+---------------------------------
Comment (by Erik Schnetter):
I've changed the variable from {{{unsigned long}}} to {{{long}}}.
I have not changed the error tests to check against {{{-1}}}, since all negative values indicate errors, in the sense that our {{{malloc(filesize)}}} later on will fail for any negative file size, independent of whether the file size is {{{-1}}} indicating an error in {{{ftell}}}, or whether {{{ftell}}} returns another negative number for some other reason.