Skip to content

Commit 7ac7d50

Browse files
authored
in_winevtlog: change total_size_threshold to size_t (#8853)
The `total_size_threshold` field was originally an unsigned int. The field in the config map uses `FLB_CONFIG_MAP_SIZE`, which reads the value as a `size_t` and then writes it to the offset of the field in the struct. On a 64-bit machine, this is 8 bytes. This means the 8 byte value would be written at this offset, as a result overriding the value of the next struct field. This would cause `string_inserts` with default values to end up being `false` when it should be `true`. This PR changes `total_size_threshold` to a `size_t`. This seems consistent with other usages of `FLB_CONFIG_MAP_SIZE` that I was able to find. Signed-off-by: braydonk <[email protected]>
1 parent 928c254 commit 7ac7d50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/in_winevtlog/winevtlog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
struct winevtlog_config {
2828
unsigned int interval_sec;
2929
unsigned int interval_nsec;
30-
unsigned int total_size_threshold;
30+
size_t total_size_threshold;
3131
int string_inserts;
3232
int read_existing_events;
3333
int render_event_as_xml;

0 commit comments

Comments
 (0)