Re: How do I access the data contained within the performUpdate function's boundData parameter?

Ed Curren <[email protected]>
Newsgroups gmane.comp.encryption.cryptlib
Message-ID <[email protected]>
Hi Peter,

I pasted in the first several lines (particularly the asserts) from odbc.c and found that for the SQL command:

 

CREATE TABLE certificates (C CHAR(2), SP VARCHAR(64), L VARCHAR(64), O VARCHAR(64), OU VARCHAR(64), CN VARCHAR(64), email VARCHAR(64), validTo DATETIME NOT NULL, nameID CHAR(22) NOT NULL, issuerID CHAR(22) NOT NULL, keyID CHAR(22) NOT NULL, certID CHAR(22) NOT NULL, certData BLOB NOT NULL)

 

the assert line:

assert( ( boundData == NULL ) || \

           isReadPtr( boundData, \

                           sizeof( BOUND_DATA ) * BOUND_DATA_MAXITEMS ) );

 

is failing.  The boundData has an address of 0x00000122.  In Visual Studio (2008), when I pseudo dereference the void pointer by entering:

 

? (BOUND_DATA)boundData

 

into the "Command Window" it returns:

 

{type=290 data=0x00000000 dataLength=0 }

type: 290

data: 0x00000000

dataLength: 0


I don't know if this is useful data or not.

 

As always I greatly appreciate your help.

Ed

 
> From: [email protected]
> To: [email protected]; [email protected]; [email protected]
> Subject: RE: [Cryptlib] How do I access the data contained within the performUpdate function's boundData parameter?
> Date: Wed, 24 Feb 2010 00:32:37 +1300
> 
> Ed Curren <[email protected]> writes:
> 
> >Thanks very much for the info. I am still running into an issue that is
> >confusing me. When I call the boundData[0].type (or any other struct member)
> >in performUpdate I get an error of:
> >
> >Unhandled exception at 0x102a02fc (cl32.dll) in cl333test.exe: 0xC0000005:
> >Access violation reading location 0x00000122.
> >
> >My processUpdate code (stripped down for testing) is:
> >
> >static int performUpdate( DBMS_STATE_INFO *dbmsInfo, const char *command,
> >const void *boundData, const int boundDataLength, const time_t boundDate,
> >const DBMS_UPDATE_TYPE updateType )
> >{
> > BOUND_DATA *data = boundData;
> > BOUND_DATA_TYPE bdt = data[0].type;
> >
> > return CRYPT_OK
> >}
> 
> Hmm, that should work OK. Could you try cutting and pasting the code for
> performUpdate() from keyset/odbc.c (just comment out whatever's needed to get
> it to compile) and see what happens? Even just the assert()s at the start
> should be enough to make sure everything is OK.
> 
> Peter.

_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.