List:MySQL++« Previous MessageNext Message »
From:Crazy Pete Date:July 31 2010 8:47pm
Subject:class mysqlpp::examples::CommandLine
View as plain text  
Hi Everyone!

When i ran 

./resetdb -h

the result was a segfault.

If you look at:
mysql++-3.1.0/lib/cmdline.h:133

the last argument to the constructor is 0.  The CommandLine::print_usage() function calls
CommandLine::print_usage( const char * ) with this value.  

mysql++-3.1.0/lib/cmdline.cpp:246

if(strlen(extra) > 0)

since the default value is 0, strlen segfaults.   This is all CommandLine class internals
so i created a patch, i hope i am not wasting anyone's time.


  
Thanks!

Crazy Pete


      
Attachment: [text/x-patch] mysql++-3.1.0.usage_extra_msg.patch
Thread
class mysqlpp::examples::CommandLineCrazy Pete31 Jul
  • Re: class mysqlpp::examples::CommandLineWarren Young31 Jul