bug parsing quoted strings?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gustavio,

Thanks for the report. We just fixed this in #1558
(https://trac.pjsip.org/repos/ticket/1558).

Best regards,
Ming

On Mon, Jul 16, 2012 at 8:21 AM, Gustavo Garcia Bernardo <ggb at tid.es> wrote:
> From my understanding this account id should be valid although I'm getting
> a PJSIP_EINVALIDURI error: '"ggb\\" <sip:ggb at tid.es>'
>
> But if I add a character before the ending quote it is accepted: '"ggb\\a"
> <sip:ggb at tid.es>'
>
> I think the problem is in pjlib-util/src/pjlib-util/scanner.c:
>
> ```
> char *q = s-2;
>                     char *r = s-2;
>
>                     while (r != scanner->begin && *r == '\\') {
>                         --r;
>                     }
>                     /* break from main loop if we have odd number of backslashes */
>                     if (((unsigned)(q-r) & 0x01) == 1) {
> ```
>
>
> Perhaps q and r should be initialized to s-1 instead of s-2 to take into
> account all the slashes?
>
>
> Any idea is more than welcomed,
> G.
>
>
> ________________________________
>
> Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra pol?tica de env?o y recepci?n de correo electr?nico en el enlace situado m?s abajo.
> This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at.
> http://www.tid.es/ES/PAGINAS/disclaimer.aspx
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux