SDGenericDataset::readBlock(int blocknum, char **data, size_t &len) not correctly implemented in Azure backends
There is some descrepencies in how this function is implemented in the different backends.
dictates that both data and len are out parameters. On function exit data will point to newly allocated buffer, and len will have the size of the buffer data.
This is implemented in a simmilar manner for AWS here:
However, the implementation in both Azure implementations seem to be broken:
Seems to take the len as a max input parameter, and copy at most len or the objectSize. But it does not expose the objectSize if len > the objectSize.
Dereferences the data pointer, which probably points to garbage if it is used according to the other apis. Also it doesn't expose the size of the object either.
For OpenVDS its convenient if this function would allocate a buffer, fill it with the object data en expose the object size through len.