~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/db.cc

  • Committer: Monty Taylor
  • Date: 2008-12-08 03:55:23 UTC
  • mto: This revision was merged to the branch mainline in revision 670.
  • Revision ID: monty@inaugust.com-20081208035523-syu4jhy1ekmra8cw
Fixed db.cc strncpy removal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1320
1320
    TODO: fix check_db_name().
1321
1321
  */
1322
1322
 
1323
 
  new_db_file_name.str= (char *)malloc(new_db_name->length);
 
1323
  new_db_file_name.str= (char *)malloc(new_db_name->length+1);
1324
1324
  if (new_db_file_name.str == NULL)
1325
1325
    return true;
1326
1326
  strncpy(new_db_file_name.str, new_db_name->str, new_db_name->length);
 
1327
  new_db_file_name.str[new_db_name->length]= 0;
1327
1328
  new_db_file_name.length= new_db_name->length;
1328
1329
 
1329
1330
  /*