<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    Can someone help review my fixes for 8026943 "SQE test
    jce/Global/Cipher/SameBuffer failed"?<br>
    <br>
    According to Cipher javadoc, both its update(...) and doFinal(...)
    methods should be copy-safe, meaning the <code>input</code> and <code>output</code>
    buffers can reference the same byte array and no unprocessed input
    data is overwritten when the result is copied into the output
    buffer. In CipherCore class, this condition is not checked and thus
    leads to the scenarios of unprocessed input data being accidentally
    overwritten.<br>
    <br>
    I added checks to CipherCore class to detect this for both
    update(...)/doFinal(...) operations.<br>
    DESedeWrapCipher class is also updated to not pass the same byte
    array for input and output when using FeedbackCipher objects.<br>
    Also, removed similar handling inside CipherBlockChaining class as
    it's now handled at its caller level (CipherCore and
    DESedeWrapCipher classes).<br>
    <br>
    Webrev: <a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~valeriep/8026943/webrev.00/">http://cr.openjdk.java.net/~valeriep/8026943/webrev.00/</a><br>
    <br>
    Thanks,<br>
    Valerie<br>
  </body>
</html>