On 02/23/2016 01:33 AM, E.Pasma wrote:
>
> I reproduced the memory leak and added a test in the sql script.
> An alternative fix, instead of adding the missing break, is:
>
>        case SQLITE_TEXT:
>        case SQLITE_BLOB:
>          pval->n=sqlite3_value_bytes(arg);
>          if (!pval->n) {
>            pval->z="";
>          } else {
>            pval->z=sqlite3_malloc(pval->n);
>            assert (pval->z); /* TODO: SQLITE_NOMEM*/
>            memcpy(pval->z,sqlite3_value_blob(arg),pval->n);
>          }
>          break;
>
> Thus sqlite3_value_blob is used to get both text or blob value (like 
> in sqlite3.c at line ~93615 in routine  attachFunc).
>
> If no response I opt for the alternative fix and place it at
> http://h1972688.stratoserver.net/sqlite_mprint/160223


Suggest testing with text values and a utf-16 database.

Dan.

Reply via email to