[pcre-dev] [Bug 1823] New: Improve get_error_message

Góra strony
Delete this message
Autor: admin
Data:  
Dla: pcre-dev
Temat: [pcre-dev] [Bug 1823] New: Improve get_error_message
https://bugs.exim.org/show_bug.cgi?id=1823

            Bug ID: 1823
           Summary: Improve get_error_message
           Product: PCRE
           Version: 10.21 (PCRE2)
          Hardware: All
                OS: All
            Status: NEW
          Severity: wishlist
          Priority: medium
         Component: Code
          Assignee: ph10@???
          Reporter: gebhard@???
                CC: pcre-dev@???


Created attachment 883
--> https://bugs.exim.org/attachment.cgi?id=883&action=edit
Proposed patch (apply with patch -p 1 < error_message.diff)

Consider src/pcre2_error.c. In case an error string is required the code
searches for the next NULL character in the defined "compile_error_texts" and
"match_error_texts" strings and copies the corresponding error string the given
buffer.

I find this way of returning an error message rather weird.
Why not declare an array of C-strings and simply return a pointer to the
corresponding error string.

I'll attach a diff for my proposed changes. Here, get_error_message still
copies the error message. I have added an additional function (called
error_message) to provide a pointer to error message string.

--
You are receiving this mail because:
You are on the CC list for the bug.