It is always painful to admit when you are wrong, but hopefully I will save at least some face by doing it now. You are correct that the static buffer is used and dynamic buffer is only used when the static buffer runs out of space.
In my defense, I did post an inquiry about the code before submitting a patch. In any case, my problem is a real one. I did crash because of using too much stack (not a stack "overrun" as I misstated). I can increase the size of the application stack in this particular case, but that seems like a bandaid since I can not guarantee the stack size of every application that might call into this library. A 10240 byte stack variable does seems rather large in any case so I respectfully withdraw my patch from consideration and ask instead that a change be made to make the buffer allocated on the stack a more reasonable size - say 1 or 2k. Thanks for your feedback and for correcting my misunderstanding. Verdon >>> [EMAIL PROTECTED] 05/09/02 12:15PM >>> In message <[EMAIL PROTECTED]> on Wed, 08 May 2002 17:31:41 -0600, "Verdon Walker" <[EMAIL PROTECTED]> said: VWalker> This patch fixes the routine BIO_vprintf in VWalker> crypto\bio\b_print.c so that no longer allocates a 10k buffer VWalker> on the stack that is never really used. I just looked at the code, and I have a hard time seeing why the stack-allocated buffer would never be used. Please note that any heap allocation will be made only when *currlen gets larger than or equal to *maxlen. When the static buffer is passed, it's size (10240) is also passed, so allocation of the dynamic buffer will only happen when that functionality is desired (by passing the appropriate pointer) and the calling function is about to overflow the static buffer. At least, this is what I can conclude by looking at the code. If you're of a different opinion on how it works, please show me. I entirely agree with the move of the assert() in doapr_outch(), and will apply that part immediately. I'll think about the rest. -- Richard Levitte \ Spannvägen 38, II \ [EMAIL PROTECTED] Redakteur@Stacken \ S-168 35 BROMMA \ T: +46-8-26 52 47 \ SWEDEN \ or +46-708-26 53 44 Procurator Odiosus Ex Infernis -- [EMAIL PROTECTED] Member of the OpenSSL development team: http://www.openssl.org/ Unsolicited commercial email is subject to an archival fee of $400. See <http://www.stacken.kth.se/~levitte/mail/> for more info. ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED] ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]