Skip to content

ICU-23502 Fix time of check to time of use bug in umapfile.cpp - #4159

Merged
markusicu merged 1 commit into
unicode-org:mainfrom
ZarkoT:zarkot/toctuo_fix
Sep 14, 2026
Merged

markusicu merged 1 commit into
unicode-org:mainfrom
ZarkoT:zarkot/toctuo_fix

Conversation

@ZarkoT

@ZarkoT ZarkoT commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Fix time of check to time of use bug in umapfile.cpp

The file can be modified between the stat on the path and the call to open. Fix this by replacing the stat call with a call to fstat that works on the file descriptor we got back from open.

Checklist

  • Required: Issue filed: ICU-23502
  • Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable
  • Approver: Feel free to merge on my behalf

@CLAassistant

CLAassistant commented Sep 3, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@jira-pull-request-webhook

Copy link
Copy Markdown

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@markusicu markusicu self-assigned this Sep 10, 2026
@markusicu
markusicu merged commit ae531e7 into unicode-org:main Sep 14, 2026
181 of 185 checks passed
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.

3 participants