Fix for d2i_ASN1_bytes and stop PKCS#7 routines crashing is signed message
[oweals/openssl.git] / crypto / asn1 / i2d_s_pu.c
index 25b150794a576bb5be49033fcf8fc871b8569b7b..18f790f746515e9ec3f55cfacbd9df52cf6e7e44 100644 (file)
@@ -123,6 +123,7 @@ int i2d_DSAPublicKey(DSA *a, unsigned char **pp)
                }
        Free((char *)bs.data);
        *pp=p;
-       return(t);
+       if(all) return(t);
+       else return(tot);
        }
 #endif