some members of drizzle_result_st are uninitialized

Bug #1260148 reported by star
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
New
Undecided
Unassigned

Bug Description

version: drizzle-7.1.36 , drizzle-7.2.3
file : libdrizzle-2.0/structs.h

the constructor function of drizzle_result_st have not initialize all it's members , and will cause program crash .
uninitialized members include info ,sqlstate ,field , field_buffer ,row .

fixed code:
  drizzle_result_st() :
    con(NULL),
    next(NULL),
    prev(NULL),
    options(DRIZZLE_RESULT_NONE),
    error_code(0),
    insert_id(0),
    warning_count(0),
    affected_rows(0),
    column_count(0),
    column_current(0),
    column_list(NULL),
    column(NULL),
    column_buffer(NULL),
    row_count(0),
    row_current(0),
    field_current(0),
    field_total(0),
    field_offset(0),
    field_size(0),
    field(NULL),
    field_buffer(NULL),
    row_list_size(0),
    row(NULL),
    row_list(NULL),
    field_sizes(NULL),
    field_sizes_list(NULL)
  { info[0] = '\0' ; sqlstate[0]='\0';}

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.