> Here's the relevant bit of code with a check to diagnose:
> void varbuf_add_buf(struct varbuf *v, const void *s, size_t size)
> {
> varbuf_grow(v, size);
> + if(v->buf + v->used == NULL) {
> + puts((size == 0) ? "size is zero" : "size is not zero");
> + }
> memcpy(v->buf + v->used, s, size);
> v->used += size;
> }
> This prints "size is zero",By the way one gets different behavior with if(v->buf + v->used == NULL) vs. if(v->buf + v->used) even on uninstrumented binaries. With the latter I get a bunch of lines like size is not zero size is not zero size is not zero ... and then later it alternates: size is zero size is not zero size is zero size is not zero ...
signature.asc
Description: This is a digitally signed message part.

