On Mon 21 Aug 2017 11:31:48 AM CEST, Manos Pitsidianakis wrote:

> +    switch (info->data_type) {
> +    case UINT64:
> +        {
> +            uint64_t *field = (void *)&cfg.buckets[info->type] + 
> info->offset;
> +            *field = value;
> +        }
> +        break;

The rest of the patch looks good, but I still think that these pointer
casts here are a bad idea (plus, pointer arithmetic is not allowed on
void pointers).

If the field ever becomes a 32-bit integer you'd be overwriting someone
else's memory.

Berto

Reply via email to