Security Problem C/C++

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Security Problem C/C++

"Severin Müller"
Hi

 

I’m trying to use SQLite3 for my File, but I’m having trouble to use the
library properly.

 

I Have to following Code:

 

void Nickserv::write_nickname(std::string nick,std::string pass,std::string
email,User user)

{

#ifdef _WIN32

      const char *filename = "db\\Nickserv.db";

#else

      const char *filename = "db/Nickserv.db";

#endif

      sqlite3 *db;

      sqlite3_open(filename,&db);

}

 

When i run the Program, I get get the following Error:

 

Unhandled exception… so it’s some kind of a segmentation fault.

 

And my Debugger is tracing the error in a file called “gs_support.”…

 

 

Now, I really can’t figure out, what the Problem is. Are certain
Architectures not supported? I’m Using Win32 on a Pentium 4.

 

Thanks for your help in Advance.

 

 

Greetings

 


Severin Mueller

Switzerland

 

Reply | Threaded
Open this post in threaded view
|

Re: Security Problem C/C++

Clay Dowling
Check the result code of sqlite3_open and use the error message from
sqlite3_errmsg as the message in your exception.  Then you'll know what's
wrong.

Clay


Severin Müller wrote:

> Hi
>
>
>
> I’m trying to use SQLite3 for my File, but I’m having trouble to use the
> library properly.
>
>
>
> I Have to following Code:
>
>
>
> void Nickserv::write_nickname(std::string nick,std::string
> pass,std::string
> email,User user)
>
> {
>
> #ifdef _WIN32
>
>       const char *filename = "db\\Nickserv.db";
>
> #else
>
>       const char *filename = "db/Nickserv.db";
>
> #endif
>
>       sqlite3 *db;
>
>       sqlite3_open(filename,&db);
>
> }
>
>
>
> When i run the Program, I get get the following Error:
>
>
>
> Unhandled exception… so it’s some kind of a segmentation fault.
>
>
>
> And my Debugger is tracing the error in a file called “gs_support.”…
>
>
>
>
>
> Now, I really can’t figure out, what the Problem is. Are certain
> Architectures not supported? I’m Using Win32 on a Pentium 4.
>
>
>
> Thanks for your help in Advance.
>
>
>
>
>
> Greetings
>
>
>
>
> Severin Mueller
>
> Switzerland
>
>
>
>


--
Lazarus Registration
http://www.lazarusid.com/registration.shtml


-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

RE: Security Problem C/C++

"Severin Müller"
Hey

I don't even get to call the sqlite3_errmsg() function. My Program crashes
with the call sqlite3_open(filename,&db);

I'm been spending hours now, to figure out, what may cause that crap :) I
really have no idea...



-----Original Message-----
From: Clay Dowling [mailto:[hidden email]]
Sent: Montag, 6. August 2007 22:27
To: [hidden email]
Subject: Re: [sqlite] Security Problem C/C++

Check the result code of sqlite3_open and use the error message from
sqlite3_errmsg as the message in your exception.  Then you'll know what's
wrong.

Clay


Severin Müller wrote:

> Hi
>
>
>
> I’m trying to use SQLite3 for my File, but I’m having trouble to use the
> library properly.
>
>
>
> I Have to following Code:
>
>
>
> void Nickserv::write_nickname(std::string nick,std::string
> pass,std::string
> email,User user)
>
> {
>
> #ifdef _WIN32
>
>       const char *filename = "db\\Nickserv.db";
>
> #else
>
>       const char *filename = "db/Nickserv.db";
>
> #endif
>
>       sqlite3 *db;
>
>       sqlite3_open(filename,&db);
>
> }
>
>
>
> When i run the Program, I get get the following Error:
>
>
>
> Unhandled exception… so it’s some kind of a segmentation fault.
>
>
>
> And my Debugger is tracing the error in a file called “gs_support.”…
>
>
>
>
>
> Now, I really can’t figure out, what the Problem is. Are certain
> Architectures not supported? I’m Using Win32 on a Pentium 4.
>
>
>
> Thanks for your help in Advance.
>
>
>
>
>
> Greetings
>
>
>
>
> Severin Mueller
>
> Switzerland
>
>
>
>


--
Lazarus Registration
http://www.lazarusid.com/registration.shtml


----------------------------------------------------------------------------
-
To unsubscribe, send email to [hidden email]
----------------------------------------------------------------------------
-


-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

RE: Security Problem C/C++

Lee Crain
In reply to this post by Clay Dowling
Severin,

The "sqlite3_open( )" call is hard to break. Try breakpointing into the
sqlite3 source code to see what the failure is.

Lee Crain

__________________________

-----Original Message-----
From: Severin Müller [mailto:[hidden email]]
Sent: Monday, August 06, 2007 4:42 PM
To: [hidden email]
Subject: RE: [sqlite] Security Problem C/C++

Hey

I don't even get to call the sqlite3_errmsg() function. My Program crashes
with the call sqlite3_open(filename,&db);

I'm been spending hours now, to figure out, what may cause that crap :) I
really have no idea...



-----Original Message-----
From: Clay Dowling [mailto:[hidden email]]
Sent: Montag, 6. August 2007 22:27
To: [hidden email]
Subject: Re: [sqlite] Security Problem C/C++

Check the result code of sqlite3_open and use the error message from
sqlite3_errmsg as the message in your exception.  Then you'll know what's
wrong.

Clay


Severin Müller wrote:

> Hi
>
>
>
> I’m trying to use SQLite3 for my File, but I’m having trouble to use the
> library properly.
>
>
>
> I Have to following Code:
>
>
>
> void Nickserv::write_nickname(std::string nick,std::string
> pass,std::string
> email,User user)
>
> {
>
> #ifdef _WIN32
>
>       const char *filename = "db\\Nickserv.db";
>
> #else
>
>       const char *filename = "db/Nickserv.db";
>
> #endif
>
>       sqlite3 *db;
>
>       sqlite3_open(filename,&db);
>
> }
>
>
>
> When i run the Program, I get get the following Error:
>
>
>
> Unhandled exception… so it’s some kind of a segmentation fault.
>
>
>
> And my Debugger is tracing the error in a file called “gs_support.”…
>
>
>
>
>
> Now, I really can’t figure out, what the Problem is. Are certain
> Architectures not supported? I’m Using Win32 on a Pentium 4.
>
>
>
> Thanks for your help in Advance.
>
>
>
>
>
> Greetings
>
>
>
>
> Severin Mueller
>
> Switzerland
>
>
>
>


--
Lazarus Registration
http://www.lazarusid.com/registration.shtml


--------------------------------------------------------------------------
--
-
To unsubscribe, send email to [hidden email]
--------------------------------------------------------------------------
--
-


--------------------------------------------------------------------------
---
To unsubscribe, send email to [hidden email]
--------------------------------------------------------------------------
---



-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

RE: Security Problem C/C++

Lajos Baranyi
In reply to this post by Clay Dowling
Dear Clay,

Is there any way to request the digest form of the mailing list? I am
flooded with e-mails, and it is too much form me to handle...

Regars: layosh

-----Original Message-----
From: Clay Dowling [mailto:[hidden email]]
Sent: Monday, August 06, 2007 4:27 PM
To: [hidden email]
Subject: Re: [sqlite] Security Problem C/C++

Check the result code of sqlite3_open and use the error message from
sqlite3_errmsg as the message in your exception.  Then you'll know what's
wrong.

Clay


Severin Müller wrote:

> Hi
>
>
>
> I’m trying to use SQLite3 for my File, but I’m having trouble to use the
> library properly.
>
>
>
> I Have to following Code:
>
>
>
> void Nickserv::write_nickname(std::string nick,std::string
> pass,std::string
> email,User user)
>
> {
>
> #ifdef _WIN32
>
>       const char *filename = "db\\Nickserv.db";
>
> #else
>
>       const char *filename = "db/Nickserv.db";
>
> #endif
>
>       sqlite3 *db;
>
>       sqlite3_open(filename,&db);
>
> }
>
>
>
> When i run the Program, I get get the following Error:
>
>
>
> Unhandled exception… so it’s some kind of a segmentation fault.
>
>
>
> And my Debugger is tracing the error in a file called “gs_support.”…
>
>
>
>
>
> Now, I really can’t figure out, what the Problem is. Are certain
> Architectures not supported? I’m Using Win32 on a Pentium 4.
>
>
>
> Thanks for your help in Advance.
>
>
>
>
>
> Greetings
>
>
>
>
> Severin Mueller
>
> Switzerland
>
>
>
>


--
Lazarus Registration
http://www.lazarusid.com/registration.shtml


----------------------------------------------------------------------------
-
To unsubscribe, send email to [hidden email]
----------------------------------------------------------------------------
-




-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Security Problem C/C++

John Stanton-3
In reply to this post by "Severin Müller"
Your Sqlite code looks OK.  Your problem must be in your library or linking.

Severin Müller wrote:

> Hey
>
> I don't even get to call the sqlite3_errmsg() function. My Program crashes
> with the call sqlite3_open(filename,&db);
>
> I'm been spending hours now, to figure out, what may cause that crap :) I
> really have no idea...
>
>
>
> -----Original Message-----
> From: Clay Dowling [mailto:[hidden email]]
> Sent: Montag, 6. August 2007 22:27
> To: [hidden email]
> Subject: Re: [sqlite] Security Problem C/C++
>
> Check the result code of sqlite3_open and use the error message from
> sqlite3_errmsg as the message in your exception.  Then you'll know what's
> wrong.
>
> Clay
>
>
> Severin Müller wrote:
>
>>Hi
>>
>>
>>
>>I’m trying to use SQLite3 for my File, but I’m having trouble to use the
>>library properly.
>>
>>
>>
>>I Have to following Code:
>>
>>
>>
>>void Nickserv::write_nickname(std::string nick,std::string
>>pass,std::string
>>email,User user)
>>
>>{
>>
>>#ifdef _WIN32
>>
>>      const char *filename = "db\\Nickserv.db";
>>
>>#else
>>
>>      const char *filename = "db/Nickserv.db";
>>
>>#endif
>>
>>      sqlite3 *db;
>>
>>      sqlite3_open(filename,&db);
>>
>>}
>>
>>
>>
>>When i run the Program, I get get the following Error:
>>
>>
>>
>>Unhandled exception… so it’s some kind of a segmentation fault.
>>
>>
>>
>>And my Debugger is tracing the error in a file called “gs_support.”…
>>
>>
>>
>>
>>
>>Now, I really can’t figure out, what the Problem is. Are certain
>>Architectures not supported? I’m Using Win32 on a Pentium 4.
>>
>>
>>
>>Thanks for your help in Advance.
>>
>>
>>
>>
>>
>>Greetings
>>
>>
>>
>>
>>Severin Mueller
>>
>>Switzerland
>>
>>
>>
>>
>
>
>


-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

RE: Security Problem C/C++

Dwight Ingersoll
In reply to this post by Lajos Baranyi
> Is there any way to request the digest form of the
> mailing list?

Subscribe to the digest using:

[hidden email]


      ____________________________________________________________________________________
Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

RE: Security Problem C/C++

Lajos Baranyi
Thank you guys!

layosh

-----Original Message-----
From: Dwight Ingersoll [mailto:[hidden email]]
Sent: Tuesday, August 07, 2007 4:43 PM
To: [hidden email]; [hidden email]
Subject: RE: [sqlite] Security Problem C/C++

> Is there any way to request the digest form of the
> mailing list?

Subscribe to the digest using:

[hidden email]


 
____________________________________________________________________________
________
Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

----------------------------------------------------------------------------
-
To unsubscribe, send email to [hidden email]
----------------------------------------------------------------------------
-




-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------