schedsvc: Add a sanity check when loading a .job file.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2018-06-08 15:43:47 +08:00 committed by Alexandre Julliard
parent cb92983112
commit 58afce6a38
1 changed files with 6 additions and 0 deletions

View File

@ -394,6 +394,12 @@ static BOOL load_job_data(const char *data, DWORD size, struct job_t *info)
TRACE("file_version %04x\n", fixed->file_version);
TRACE("uuid %s\n", wine_dbgstr_guid(&fixed->uuid));
if (fixed->file_version != 0x0001)
{
TRACE("invalid file version\n");
return FALSE;
}
TRACE("name_size_offset %04x\n", fixed->name_size_offset);
TRACE("trigger_offset %04x\n", fixed->trigger_offset);
TRACE("error_retry_count %u\n", fixed->error_retry_count);