Skip to content

add bfromcstrrangealloc, improve bSecureInput, fix bfindreplace#146

Merged
rdmark merged 2 commits into
mainfrom
bfromcstrrangealloc-etc
Mar 5, 2026
Merged

add bfromcstrrangealloc, improve bSecureInput, fix bfindreplace#146
rdmark merged 2 commits into
mainfrom
bfromcstrrangealloc-etc

Conversation

@rdmark

@rdmark rdmark commented Mar 2, 2026

Copy link
Copy Markdown
Collaborator

ported improvements from the parent bstrlib project, all code originally by Paul Hsieh and slightly modified for our fork

  • Add bfromcstrrangealloc() with retry-on-alloc-failure loop
  • Refactor bfromcstralloc() to delegate to bfromcstrrangealloc()
  • Improve bSecureInput for extreme memory situations
  • Fix redundant validation check in bfindreplace
  • Guard backward-compat macros with BSTRLIB_REDUCE_NAMESPACE_POLLUTION
  • Update bCatStatic to use bcatStatic

@rdmark
rdmark requested a review from msteinert as a code owner March 2, 2026 21:44
@rdmark
rdmark force-pushed the bfromcstrrangealloc-etc branch from 520f202 to 8824755 Compare March 2, 2026 22:20
@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown

File Coverage Lines Branches
All files 68% 74% 63%
bstring/bstraux.c 55% 64% 46%
bstring/bstrlib.c 74% 78% 70%
bstring/buniutil.c 80% 86% 73%
bstring/utf8util.c 60% 71% 50%

Minimum allowed coverage is 50%

Generated by 🐒 cobertura-action against 4dd0723

@rdmark
rdmark force-pushed the bfromcstrrangealloc-etc branch 4 times, most recently from 9612dec to 2286dc6 Compare March 2, 2026 22:55
rdmark added 2 commits March 3, 2026 00:22
ported improvements from the parent bstrlib project, all code originally
by Paul Hsieh and slightly modified for our fork

- Add bfromcstrrangealloc() with retry-on-alloc-failure loop
- Refactor bfromcstralloc() to delegate to bfromcstrrangealloc()
- Improve bSecureInput for extreme memory situations
- Fix redundant validation check in bfindreplace
- Guard backward-compat macros with BSTRLIB_REDUCE_NAMESPACE_POLLUTION
- Update bCatStatic to use bcatStatic
@rdmark
rdmark force-pushed the bfromcstrrangealloc-etc branch from d247767 to 4dd0723 Compare March 2, 2026 23:23
@sonarqubecloud

sonarqubecloud Bot commented Mar 2, 2026

Copy link
Copy Markdown

@rdmark
rdmark merged commit b979601 into main Mar 5, 2026
19 checks passed
@rdmark
rdmark deleted the bfromcstrrangealloc-etc branch March 5, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant