Move an assert() to avoid core dumps when a static buffer hasn't been given.
Notified by Verdon Walker <VWalker@novell.com>
This commit is contained in:
parent
21d5ed98d5
commit
b4000e8ad8
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue