Skip to content

Fix crashes on invalid date data, just give us a zeroed out timestamp. - #49

Open
Subsentient wants to merge 1 commit into
spion:masterfrom
Subsentient:master
Open

Fix crashes on invalid date data, just give us a zeroed out timestamp.#49
Subsentient wants to merge 1 commit into
spion:masterfrom
Subsentient:master

Conversation

@Subsentient

Copy link
Copy Markdown

Hi, seems for some reason adb can feed us invalid date data, so better to be on the safe side and graciously give us a bad timestamp, rather than segfault, like it does now.

Thanks!

chen3feng added a commit to chen3feng/adbfs that referenced this pull request Jun 28, 2026
…n#49)

Wrap the timestamp parsing in a size check (ymd==3, hm==2) and
zero-initialize struct tm, so exotic or error ls output no longer causes
out-of-range vector access that crashes the filesystem.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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