<p>In <a href="https://github.com/OpenSIPS/opensips/pull/623#discussion_r38191595">modules/dialog/dlg_db_handler.c</a>:</p>
<pre style='color:#555'>> +                j++;
> +        }
> +        *at = 0;
> +        sout->len = at - sout->s;
> +
> +        return 0;
> +}
> +
> +static int encode_string(str *dst, str *src)
> +{
> +        unsigned char x;
> +        int j = 0;
> +        char *at = dst->s;
> +        char *p = src->s;
> +        while (j <= src->len) {
> +                if (*p < 32 || *p > 127 || *p == '#' || *p == '|' || *p == '\\') {
</pre>
<p>127 is not printable, so it should be caught by this branch. You could test <em>p against 127, (</em>p == 127), since *p can never be greater than 127 (max char).</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/pull/623/files#r38191595">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciVbJQRqIs2jnoFVmIJ2nrzyVdATGks5osD_RgaJpZM4Fz92d.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/pull/623/files#r38191595"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>