Qpid
  1. Qpid
  2. QPID-4480

If amqp/map contains a string containing a null, perl bindings will truncate it when encoding

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.18
    • Fix Version/s: 0.20, 0.21
    • Component/s: None
    • Labels:
      None
    • Environment:

      RHEL6

      Description

      The following code doesn't work as expected, the name element is truncated at the null byte.

      my $hash =

      { id => 1234, name => "Blah\x00Blah" }

      ;
      cqpid_perl::encode($hash, $outmsg);

      1. hello_world2.pl
        2 kB
        Jimmy Jones
      2. null-in-string-inside-map.patch
        0.6 kB
        Jimmy Jones

        Activity

        Jimmy Jones created issue -
        Jimmy Jones made changes -
        Field Original Value New Value
        Summary If amqp/map contains a string containing a null, perl bindings will truncate it If amqp/map contains a string containing a null, perl bindings will truncate it when encoding
        Hide
        Jimmy Jones added a comment - - edited

        Attached a fix. Tested on RHEL6. Could this go into 0.20 please?

        Show
        Jimmy Jones added a comment - - edited Attached a fix. Tested on RHEL6. Could this go into 0.20 please?
        Jimmy Jones made changes -
        Attachment null-in-string-inside-map.patch [ 12555067 ]
        Darryl L. Pierce made changes -
        Assignee Darryl L. Pierce [ mcpierce ]
        Hide
        Jimmy Jones added a comment -

        Test case. Well not a proper perl test as i've not written one before, but a script that shows the problem.

        Show
        Jimmy Jones added a comment - Test case. Well not a proper perl test as i've not written one before, but a script that shows the problem.
        Jimmy Jones made changes -
        Attachment hello_world2.pl [ 12555330 ]
        Hide
        Darryl L. Pierce added a comment -

        Excellent! This is now committed.

        Show
        Darryl L. Pierce added a comment - Excellent! This is now committed.
        Darryl L. Pierce made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 0.20 [ 12323548 ]
        Resolution Fixed [ 1 ]
        Show
        Justin Ross added a comment - http://svn.apache.org/viewvc?view=revision&revision=1415313
        Hide
        Justin Ross added a comment -

        Reviewed by Darryl. Approved for 0.20.

        Show
        Justin Ross added a comment - Reviewed by Darryl. Approved for 0.20.
        Justin Ross made changes -
        Fix Version/s 0.21 [ 12323549 ]

          People

          • Assignee:
            Darryl L. Pierce
            Reporter:
            Jimmy Jones
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development