You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Masahiro Yamada (JIRA)" <ji...@apache.org> on 2010/04/06 04:42:27 UTC

[jira] Created: (COUCHDB-727) Overlong UTF-8 detection is not correct at couch_js/utf8.js.

Overlong UTF-8 detection is not correct at couch_js/utf8.js.
------------------------------------------------------------

                 Key: COUCHDB-727
                 URL: https://issues.apache.org/jira/browse/COUCHDB-727
             Project: CouchDB
          Issue Type: Bug
    Affects Versions: 1.0
            Reporter: Masahiro Yamada
            Priority: Minor


I found simllar bug of  https://bugzilla.mozilla.org/show_bug.cgi?id=514760 at couchdb.

https://svn.apache.org/repos/asf/couchdb/trunk/src/couchdb/priv/couch_js/utf8.c
>
>static uint32
>dec_char(const uint8 *utf8Buffer, int utf8Length)
>{
>    uint32 ucs4Char;
>    uint32 minucs4Char;
>
>    /* from Unicode 3.1, non-shortest form is illegal */
>    static const uint32 minucs4Table[] = {
>        0x00000080, 0x00000800, 0x0001000, 0x0020000, 0x0400000
>    };

minucs4Table should be declared as follwiing.(three zeros are missing)

>    static const uint32 minucs4Table[] = {
>        0x00000080, 0x00000800, 0x0001000, 0x0020000, 0x0400000
>    };


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-727) Overlong UTF-8 detection is not correct at couch_js/utf8.js.

Posted by "Masahiro Yamada (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853707#action_12853707 ] 

Masahiro Yamada commented on COUCHDB-727:
-----------------------------------------

Oops!

>minucs4Table should be declared as follwiing.(three zeros are missing)
>>
>> static const uint32 minucs4Table[] = {
>> 0x00000080, 0x00000800, 0x0001000, 0x0020000, 0x0400000
>> };

What I want to say was 
minucs4Table should be declared as follwiing.

static const uint32 minucs4Table[] = {
 0x00000080, 0x00000800, 0x00010000, 0x00200000, 0x04000000
};


> Overlong UTF-8 detection is not correct at couch_js/utf8.js.
> ------------------------------------------------------------
>
>                 Key: COUCHDB-727
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-727
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Masahiro Yamada
>            Priority: Minor
>
> I found simllar bug of  https://bugzilla.mozilla.org/show_bug.cgi?id=514760 at couchdb.
> https://svn.apache.org/repos/asf/couchdb/trunk/src/couchdb/priv/couch_js/utf8.c
> >
> >static uint32
> >dec_char(const uint8 *utf8Buffer, int utf8Length)
> >{
> >    uint32 ucs4Char;
> >    uint32 minucs4Char;
> >
> >    /* from Unicode 3.1, non-shortest form is illegal */
> >    static const uint32 minucs4Table[] = {
> >        0x00000080, 0x00000800, 0x0001000, 0x0020000, 0x0400000
> >    };
> minucs4Table should be declared as follwiing.(three zeros are missing)
> >    static const uint32 minucs4Table[] = {
> >        0x00000080, 0x00000800, 0x0001000, 0x0020000, 0x0400000
> >    };

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-727) Overlong UTF-8 detection is not correct at couch_js/utf8.js.

Posted by "Masahiro Yamada (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853709#action_12853709 ] 

Masahiro Yamada commented on COUCHDB-727:
-----------------------------------------

Sorry, https://bugzilla.mozilla.org/show_bug.cgi?id=514760 is related but not same.
Same bug is https://bugzilla.mozilla.org/show_bug.cgi?id=511859

> Overlong UTF-8 detection is not correct at couch_js/utf8.js.
> ------------------------------------------------------------
>
>                 Key: COUCHDB-727
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-727
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Masahiro Yamada
>            Priority: Minor
>
> I found simllar bug of  https://bugzilla.mozilla.org/show_bug.cgi?id=514760 at couchdb.
> https://svn.apache.org/repos/asf/couchdb/trunk/src/couchdb/priv/couch_js/utf8.c
> >
> >static uint32
> >dec_char(const uint8 *utf8Buffer, int utf8Length)
> >{
> >    uint32 ucs4Char;
> >    uint32 minucs4Char;
> >
> >    /* from Unicode 3.1, non-shortest form is illegal */
> >    static const uint32 minucs4Table[] = {
> >        0x00000080, 0x00000800, 0x0001000, 0x0020000, 0x0400000
> >    };
> minucs4Table should be declared as follwiing.(three zeros are missing)
> >    static const uint32 minucs4Table[] = {
> >        0x00000080, 0x00000800, 0x0001000, 0x0020000, 0x0400000
> >    };

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (COUCHDB-727) Overlong UTF-8 detection is not correct at couch_js/utf8.js.

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis resolved COUCHDB-727.
---------------------------------------

    Resolution: Fixed

Fixed in trunk.

> Overlong UTF-8 detection is not correct at couch_js/utf8.js.
> ------------------------------------------------------------
>
>                 Key: COUCHDB-727
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-727
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Masahiro Yamada
>            Priority: Minor
>
> I found simllar bug of  https://bugzilla.mozilla.org/show_bug.cgi?id=514760 at couchdb.
> https://svn.apache.org/repos/asf/couchdb/trunk/src/couchdb/priv/couch_js/utf8.c
> >
> >static uint32
> >dec_char(const uint8 *utf8Buffer, int utf8Length)
> >{
> >    uint32 ucs4Char;
> >    uint32 minucs4Char;
> >
> >    /* from Unicode 3.1, non-shortest form is illegal */
> >    static const uint32 minucs4Table[] = {
> >        0x00000080, 0x00000800, 0x0001000, 0x0020000, 0x0400000
> >    };
> minucs4Table should be declared as follwiing.(three zeros are missing)
> >    static const uint32 minucs4Table[] = {
> >        0x00000080, 0x00000800, 0x0001000, 0x0020000, 0x0400000
> >    };

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.