mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-19 04:21:17 +00:00
revent: Fixed magic check
A null character was not being added to the end of the string.
This commit is contained in:
parent
25eac432c9
commit
54c409ce6f
Binary file not shown.
Binary file not shown.
2
wlauto/external/revent/revent.c
vendored
2
wlauto/external/revent/revent.c
vendored
@ -251,6 +251,7 @@ void dump(const char *logfile)
|
||||
//Read magic
|
||||
len = strlen(magic);
|
||||
size_t rb = read(fdin, &buf[0], len);
|
||||
buf[len] = '\0';
|
||||
if (rb != len) die("problems reading eventlog\n");
|
||||
if(strcmp(magic, buf) != 0)
|
||||
die("File is not an revent recording, are you using an old recording?");
|
||||
@ -317,6 +318,7 @@ int replay_buffer_init(replay_buffer_t **buffer, const char *logfile)
|
||||
char buf[7];
|
||||
len = strlen(magic);
|
||||
size_t rb = read(fdin, &buf[0], len);
|
||||
buf[len] = '\0';
|
||||
if (rb != len) die("problems reading eventlog\n");
|
||||
if(strcmp(magic, buf) != 0)
|
||||
die("File is not an revent recording, are you using an old recording?");
|
||||
|
Loading…
x
Reference in New Issue
Block a user