Skip to content
Snippets Groups Projects
Unverified Commit cd32470e authored by Timur Safin's avatar Timur Safin Committed by Igor Munkin
Browse files

datetime: fix strptime for fuzzer

Google fuzzing efforts revealed yet another bound condition
we don't handle well in the `tnt_strptime` function:

- for format `%m%g%W`;
- and input string `07001`.

We failed with assertion failure:
```
  | datetime_strptime_fuzzer: ./src/lib/core/datetime.c:148: \
_Bool tm_to_datetime(struct tnt_tm *, struct datetime *): \
Assertion `mday >= 1 && mday <= 31' failed.
```

Closes #8525

NO_TEST=updated fuzzer corpus
NO_CHANGELOG=internal
NO_DOC=internal

(cherry picked from commit 4043664d)
parent 1604a97a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment