mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 02:49:02 -04:00
Validate serialized nanoseconds range when reading content files
This commit is contained in:
parent
e58eb16768
commit
95ac8d7b51
1 changed files with 2 additions and 2 deletions
|
|
@ -2370,7 +2370,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
|||
}
|
||||
|
||||
ret = sgetb32(f, &v_mtime_nsec);
|
||||
if (ret < 0) {
|
||||
if (ret < 0 || v_mtime_nsec > 1000000000) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
os_abort();
|
||||
|
|
@ -2808,7 +2808,7 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
|||
}
|
||||
|
||||
ret = sgetb32(f, &v_mtime_nsec);
|
||||
if (ret < 0) {
|
||||
if (ret < 0 || v_mtime_nsec > 1000000000) {
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
os_abort();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue