Fix error handling in decode_base64()

This commit is contained in:
Jon Siwek 2019-11-04 09:58:53 -08:00
parent b6def63167
commit e34562df48
3 changed files with 8 additions and 2 deletions

View file

@ -230,7 +230,9 @@ BroString* decode_base64(const BroString* s, const BroString* a, Connection* con
char* rbuf2, *rbuf = new char[rlen];
Base64Converter dec(conn, a ? a->CheckString() : "");
if ( dec.Decode(s->Len(), (const char*) s->Bytes(), &rlen, &rbuf) == -1 )
dec.Decode(s->Len(), (const char*) s->Bytes(), &rlen, &rbuf);
if ( dec.Errored() )
goto err;
rlen2 = buf_len - rlen;