Ugh, BIO_find_type() cannot be passed a NULL.
[openssl.git] / doc / crypto / BIO_find_type.pod
index 1a1d6bfad5db00b265e5f04d00836f1a825984fe..cc18c06228d3784e02f4fbc29254913f745a2bc5 100644 (file)
@@ -71,6 +71,11 @@ use:
 
  next = bio->next_bio;
 
+=head1 BUGS
+
+BIO_find_type() in OpenSSL 0.9.5a and earlier could not be safely passed a
+NULL pointer for the B<b> argument.
+
 =head1 EXAMPLE
 
 Traverse a chain looking for digest BIOs:
@@ -78,14 +83,14 @@ Traverse a chain looking for digest BIOs:
  BIO *btmp;
  btmp = in_bio;        /* in_bio is chain to search through */
 
for(;;) {
do {
        btmp = BIO_find_type(btmp, BIO_TYPE_MD);
        if(btmp == NULL) break; /* Not found */
        /* btmp is a digest BIO, do something with it ...*/
        ...
 
        btmp = BIO_next(btmp);
- } 
+ } while(btmp);
 
 
 =head1 SEE ALSO