~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-2.0/drizzle.cc

  • Committer: Brian Aker
  • Date: 2011-11-18 02:03:41 UTC
  • mto: (2463.1.1 drizzle-include)
  • mto: This revision was merged to the branch mainline in revision 2462.
  • Revision ID: brian@tangent.org-20111118020341-mgz2m1kjo62al44e
Fix safety issues around calling API with no check for NULL

Show diffs side-by-side

added added

removed removed

Lines of Context:
326
326
  con->socket.tcp.host= NULL;
327
327
  con->socket.tcp.port= 0;
328
328
  /* con->buffer doesn't need to be set */
329
 
  con->db[0]= 0;
 
329
  con->schema[0]= 0;
330
330
  con->password[0]= 0;
331
331
  /* con->scramble_buffer doesn't need to be set */
332
332
  con->server_version[0]= 0;
348
348
                  DRIZZLE_CON_NO_RESULT_READ|DRIZZLE_CON_IO_READY|
349
349
                  DRIZZLE_CON_LISTEN));
350
350
  con->backlog= from->backlog;
351
 
  strcpy(con->db, from->db);
 
351
  strcpy(con->schema, from->schema);
352
352
  strcpy(con->password, from->password);
353
353
  strcpy(con->user, from->user);
354
354