Java API SSLEngine example code needs correction

XMLWordPrintable

    • b08
    • Not verified

      A DESCRIPTION OF THE PROBLEM :
      Example code :
      BUFFER_UNDERFLOW:
             int netSize = engine.getSession().getPacketBufferSize();
             // Resize buffer if needed.
             if (netSize > dst.capacity()) { //**********************maybe should be :if (netSize > src.capacity()) {
                 ByteBuffer b = ByteBuffer.allocate(netSize);
                 src.flip();
                 b.put(src);
                 src = b;
             }
             // Obtain more inbound network data for src,
             // then retry the operation.
             break;
         // other cases: CLOSED, OK.

      FREQUENCY : always


            Assignee:
            Jamil Nimeh
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: