hi all
      when i use c++ pragrm to insert some data into a table,the program crashes,the message is below:
 
so i use gdb to debug the bug,  i find that these places may be bugs£º
1. out of bounds access
file mapi.c
function: mapi_param_store
 
2356  strncpy(hdl->query + k, p, q - p);
2357   k += q - p;
2358   hdl->query[k] = 0;
 
q-p is equal or bigger than lim - k ,the strncpy will hava a out of bounds access. this may be the reason to crash.
 
2. out of bounds access
file:mapi.c
function: mapi_param_store
 
2411   case MAPI_DOUBLE:
 2412   checkSpace(20);
 2413   sprintf(hdl->query + k, "%.17g", *(double *) src);
 2414   break;
 
sprintf(hdl->query + k, "%.17g", *(double *) src) , sprintf function with "%.17g" format may produces a string longer than 20,eg£º
 
double d = 0.000200000000000001;
    double d = 0.000200000000000001;
    printf("%.17g",d);
the result is :   0.00020000000000000101
so i think, in some paticular condition ,this  will hava a out of bounds access too.
 
 
I'm working with MonetDB Server v5.22.3, based on kernel 1.40.3
over fedora 12.