Closed mksanger closed 2 years ago
It occurred to me that if the user doesn't have permission to read the data object, then rcDataObjOpen
should fail before we even get as far as reading. I wrote a regression test for this and was having trouble reproducing the error on an iRODS 4.2.10
server, so I went back to 4.2.7
and it segfaults, as expected.
Therefore there's also an iRODS bug here that was fixed between 4.2.7
and 4.2.10
.
I've created a pull request to your pull request because we should really have a regression test for this. The behaviour is complicated by what appears to be an iRODS bug, so I've had a go at unpicking what's going on,
Negative values of iRODS errors were causing overflow when returned as
size_t
, which causedslurp_data_obj
to attempt to access a very large chunk of memory, resulting in a segmentation fault.