https://bz.apache.org/bugzilla/show_bug.cgi?id=68647

            Bug ID: 68647
           Summary: apr_pstrdup() with string literal
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: All
          Assignee: bugs@httpd.apache.org
          Reporter: marc.st...@approach-cyber.com
  Target Milestone: ---

At many place, all over the code, we see apr_pstrdup() used with string
literals.
Is this needed? This question is useful for 2 points:
1. Could we optimize the code and remove that call?
2. More important: in a new code, is there sometimes a requirement to not use a
string literal? This would allow to avoid mistakes.
Obviously, the cases where we explicitely modify the string don't fall into
this question.

Example: in mod_include.c, we have that code:
   token->value = apr_pstrdup(ctx->dpool, "");
Why?

At many places, apr_pstrdup() is used for values used in apr_table_setn(). Is
there a specific requirement in this case?

Thanks for clarifying this

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscr...@httpd.apache.org
For additional commands, e-mail: bugs-h...@httpd.apache.org

Reply via email to