Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-1628

axiom_node_create_from_buffer modifies the buffer.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.6.0
    • 1.7.0
    • guththila
    • None
    • Linux

    Description

      axiom_node_create_from_buffer modifies the buffer. Running this code

      char * xml = strdup("<foo>T1 & T2</foo>");

      AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "before: %s", xml);
      axiom_node_create_from_buffer(env, xml);
      AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "after: %s", xml);

      produces this output:

      before: <foo>T1 & T2</foo>
      after: <foo>T1 & T2; T2</foo>

      In some environments, if the strdup is omitted, a SEGV results, presumably on attempting to modify the string literal.

      Attachments

        1. axis2c-1628_loentar.patch
          3 kB
          Dmitry Utkin
        2. axis2c-1628_test_loentar.tar.bz2
          1 kB
          Dmitry Utkin
        3. axis2c-1628.patch
          0.7 kB
          Alex Mantaut
        4. axis2c-1628.tar.gz
          1 kB
          Alex Mantaut
        5. echo_xml_from_buffer.tar.bz2
          2 kB
          Dmitry Utkin

        Activity

          People

            Unassigned Unassigned
            whitemarlin Wes Munsil
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: