| Index: mozilla/security/nss/lib/freebl/gcm.c
|
| ===================================================================
|
| --- mozilla/security/nss/lib/freebl/gcm.c (revision 190723)
|
| +++ mozilla/security/nss/lib/freebl/gcm.c (working copy)
|
| @@ -453,7 +453,9 @@
|
| * we can hash it */
|
| if (ghash->bufLen) {
|
| unsigned int needed = PR_MIN(len, blocksize - ghash->bufLen);
|
| - PORT_Memcpy(ghash->buffer+ghash->bufLen, buf, needed);
|
| + if (needed != 0) {
|
| + PORT_Memcpy(ghash->buffer+ghash->bufLen, buf, needed);
|
| + }
|
| buf += needed;
|
| len -= needed;
|
| ghash->bufLen += needed;
|
| @@ -814,7 +816,7 @@
|
|
|
| /* get the authentication block */
|
| if (inlen < tagBytes) {
|
| - PORT_SetError(SEC_ERROR_INVALID_ARGS);
|
| + PORT_SetError(SEC_ERROR_INPUT_LEN);
|
| return SECFailure;
|
| }
|
|
|
|
|