Added guard code to avoid issue when decoding PEM but not keeping data.
This commit is contained in:
parent
05520e8eae
commit
d69276c18d
2 changed files with 6 additions and 2 deletions
|
|
@ -441,7 +441,9 @@ br_pem_decoder_run(void *t0ctx)
|
|||
/* flush-buf */
|
||||
|
||||
if (CTX->ptr > 0) {
|
||||
if (CTX->dest) {
|
||||
CTX->dest(CTX->dest_ctx, CTX->buf, CTX->ptr);
|
||||
}
|
||||
CTX->ptr = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -204,7 +204,9 @@ cc: write8 ( x -- ) {
|
|||
\ Flush the output buffer.
|
||||
cc: flush-buf ( -- ) {
|
||||
if (CTX->ptr > 0) {
|
||||
if (CTX->dest) {
|
||||
CTX->dest(CTX->dest_ctx, CTX->buf, CTX->ptr);
|
||||
}
|
||||
CTX->ptr = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue