Merge in recent changes from 0.9.6-stable.
authorRichard Levitte <levitte@openssl.org>
Thu, 9 May 2002 19:38:34 +0000 (19:38 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 9 May 2002 19:38:34 +0000 (19:38 +0000)
crypto/bio/b_print.c

index f0a50c29bed5547c7e7a649c9e5ede17ef384022..d7a60eceea38dad23cb3fe449349fbeafa3bc0d7 100644 (file)
@@ -716,12 +716,13 @@ doapr_outch(
     if (buffer) {
        while (*currlen >= *maxlen) {
            if (*buffer == NULL) {
-               assert(*sbuffer != NULL);
                if (*maxlen == 0)
                    *maxlen = 1024;
                *buffer = OPENSSL_malloc(*maxlen);
-               if (*currlen > 0)
+               if (*currlen > 0) {
+                   assert(*sbuffer != NULL);
                    memcpy(*buffer, *sbuffer, *currlen);
+               }
                *sbuffer = NULL;
            } else {
                *maxlen += 1024;