~drizzle-trunk/drizzle/7.2

« back to all changes in this revision

Viewing changes to client/drizzletest.cc

  • Committer: Stewart Smith
  • Date: 2013-02-14 11:36:21 UTC
  • mto: This revision was merged to the branch mainline in revision 2619.
  • Revision ID: stewart@flamingspork.com-20130214113621-sti1vs1gmcaiaqa5
Fix Coverity found bug in drizzletest.cc:
CID 973171 (#1 of 1): Out-of-bounds access (OVERRUN)
2. alloc_strlen: Allocating insufficient memory for the terminating null of the string. 

This isn't exploitable, just test suite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5867
5867
  char last_c = 0;
5868
5868
  st_regex reg;
5869
5869
 
5870
 
  char* buf= new char[expr_len];
 
5870
  char* buf= new char[expr_len+1];
5871
5871
  char* expr_end= expr + expr_len;
5872
5872
  char* p= expr;
5873
5873
  char* buf_p= buf;