https://bugs.exim.org/show_bug.cgi?id=2090

            Bug ID: 2090
           Summary: Suspicious sequence of types castings: memsize ->
                    32-bit integer -> memsize
           Product: PCRE
           Version: 10.23 (PCRE2)
          Hardware: x86-64
                OS: All
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: p...@hermes.cam.ac.uk
          Reporter: egor...@gmail.com
                CC: pcre-dev@exim.org

Suspicious sequence of types castings: memsize -> 32-bit integer -> memsize.
The value being cast: '(p - string)'. pcre2_valid_utf.c

See lines 145, 151, 158

I suppose instead of casting to int:

*erroroffset = (int)(p - string);

casting to PCRE2_SIZE should be implemented:

*erroroffset = (PCRE2_SIZE)(p - string);

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/pcre-dev 

Reply via email to