pass by value and also snprintf()
Bruce Korb
bruce.korb@gmail.com
Mon Apr 27 17:45:00 GMT 2015
s/sprintf/snprintf/ -- I had it right in the original code, and with
that fix it still seg faults.
On Mon, Apr 27, 2015 at 10:37 AM, Bruce Korb <bruce.korb@gmail.com> wrote:
> Like this then:
>
>
> #include <stdint.h>
> #include <stdio.h>
> #include <ffi.h>
>
> #define UCONST(_p) ((void *)(uintptr_t)_p)
>
> int
> main(int argc, char ** argv)
> {
> char buffer[0x1000];
> size_t bufsz = sizeof(buffer);
> char const fmt[] = "Allocated sblock_id=%d for band_id=%d\n";
> int32_t sblock = 1;
> int32_t band = 1;
> void * fn = sprintf;
>
More information about the Libffi-discuss
mailing list