Skip to content

Comments

jsonbuilder: handle memory allocation errors - v6#8927

Closed
jasonish wants to merge 2 commits intoOISF:masterfrom
jasonish:jsonbuilder-alloc/v6
Closed

jsonbuilder: handle memory allocation errors - v6#8927
jasonish wants to merge 2 commits intoOISF:masterfrom
jasonish:jsonbuilder-alloc/v6

Conversation

@jasonish
Copy link
Member

Ticket: https://redmine.openinfosecfoundation.org/issues/6057
Previous PR: #8916

Changes from previous PR:

  • Fix base64 encoded len

jasonish added 2 commits May 25, 2023 09:44
Some very minor changes to formatting.
Use try_reserve before growing the internal buffer, and the internal
state vector. This allows allocation errors to be caught and an error
returned instead of just aborting the process.

Ticket: OISF#6057
@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Merging #8927 (11747ae) into master (afef35b) will decrease coverage by 0.01%.
The diff coverage is 86.97%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8927      +/-   ##
==========================================
- Coverage   82.34%   82.34%   -0.01%     
==========================================
  Files         969      969              
  Lines      273336   273377      +41     
==========================================
+ Hits       225090   225100      +10     
- Misses      48246    48277      +31     
Flag Coverage Δ
fuzzcorpus 64.75% <78.36%> (-0.01%) ⬇️
suricata-verify 60.45% <80.70%> (-0.03%) ⬇️
unittests 62.95% <66.97%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 14071

This was referenced May 30, 2023
@victorjulien
Copy link
Member

Merged in #8945, thanks!

@jasonish jasonish deleted the jsonbuilder-alloc/v6 branch May 31, 2023 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants