<p>This prevented the core dump:</p>

<pre><code>diff --git a/modules/db_sqlite/val.c b/modules/db_sqlite/val.c
index ebd5afe..4234f2a 100644
--- a/modules/db_sqlite/val.c
+++ b/modules/db_sqlite/val.c
@@ -99,8 +99,8 @@ int db_sqlite_val2str(const db_con_t* _c, const db_val_t* _v, char
                }
                else
                {
-                       sqlite3_snprintf(SQL_BUF_LEN, _s, "'%*q'",
-                                               VAL_STRING(_v));
+                       sqlite3_snprintf(SQL_BUF_LEN, _s, "'%.*q'",
+                                               l, VAL_STRING(_v));
                        *_len = strlen(_s);
                        _s += strlen(_s);
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/473#issuecomment-95596371">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOcicst1XH0eJazDRD41Fn6A7led9Nqks5oCPMbgaJpZM4EEsjg.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/OpenSIPS/opensips/issues/473#issuecomment-95596371"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>