Hi,

 

I suspect the following code in core/sql/ustat/hs_read.cpp is erroneous:

2120   desc = new SQLDESC_ID;

2121   init_SQLCLI_OBJ_ID(desc);

2122

2123   desc->name_mode = cursor_name;

2124   desc->module = &module;

2125   desc->identifier = new char[HS_STMTID_LENGTH];

2126   desc->handle     = 0;

2127

2128   sprintf((char*)desc->identifier, descID);

2129   desc->identifier_len = strlen(descID);

 

The parameters to function `sprintf` should be 3, but there are only 2.

 

I’d like to change it to:

       snprintf((char*)desc->identifier, HS_STMTID_LENGTH, “%s”, descID);

 

How do you find it?

 

Regards,

Wenjun Zhu

Reply via email to