perlas/ppc-xlate.pl: fix typo.
[openssl.git] / crypto / buffer / buffer.c
index 52e65dfdfcbb0b287a2cf1f0e8894c69a1a03859..a6b590c3b2b2e3add87de35d1ad413b50e40537b 100644 (file)
@@ -156,7 +156,7 @@ int BUF_MEM_grow_clean(BUF_MEM *str, size_t len)
        /* This limit is sufficient to ensure (len+3)/3*4 < 2**31 */
        if (len > LIMIT_BEFORE_EXPANSION)
                {
-               BUFerr(BUF_F_BUF_MEM_GROW,ERR_R_MALLOC_FAILURE);
+               BUFerr(BUF_F_BUF_MEM_GROW_CLEAN,ERR_R_MALLOC_FAILURE);
                return 0;
                }
        n=(len+3)/3*4;
@@ -186,7 +186,7 @@ void BUF_reverse(unsigned char *out, unsigned char *in, size_t size)
                {
                out += size - 1;
                for (i = 0; i < size; i++)
-                       *in++ = *out--;
+                       *out-- = *in++;
                }
        else
                {