EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Possible BUG - CbfltReadC

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#7419
Posted: 08/25/2008 06:29:35
by Joe Portman (Basic support level)
Joined: 05/28/2008
Posts: 21

Using C# app. When opening a file and reading I receive a postion, a buffer and a size of read.

IE:
Code
unsafe void CbFltReadFileC(
        object Sender,
        string FileName,
        Int64 Position,
        IntPtr Buffer,
        Int32 BytesToRead,
        ref IntPtr UserContext,
        ref bool ProcessRequest
        )
    




On a file of 281623 bytes, the read is 281623.

I convert the buffer to a pointer and call a routine that examines each byte:

Code
byte* b = (byte*)Buffer.ToPointer();
      
ExamineBytes(b,BytesToRead)

Examine bytes simply assigns a byte from each byte of the buffer like so:
Code
byte c;
for (int i = 0; i < BytesToRead;i++)
{
c = b[i];
}


This blows up, more often than not on byte 8112, with:

"Attempt to read or write protected memory".

#7424
Posted: 08/26/2008 06:25:49
by Vladimir Cherniga (EldoS Corp.)

Thanks for report, we will check and make a fix if this error will be confirmed asap.

Reply

Statistics

Topic viewed 2828 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!