core: fix arithmetic on a pointer to void

Use char* instead of void* for this
pointer arithmetic. Fixes the following:

error: arithmetic on a pointer to void
buf = buf + offset;
      ~~~ ^

Change-Id: I6cfc92c9240fda66a52e780cda7820fdba76914a