Browse Source

Merge pull request #749 from c3h2-ctf/sprintbuf

sprintbuf(): handle printbuf_memappend errors
tags/json-c-0.16-20220414
Eric Hawicz GitHub 3 years ago
parent
commit
a4389f4f30
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      printbuf.c

+ 3
- 4
printbuf.c View File

@@ -154,15 +154,14 @@ int sprintbuf(struct printbuf *p, const char *msg, ...)
return -1;
}
va_end(ap);
printbuf_memappend(p, t, size);
size = printbuf_memappend(p, t, size);
free(t);
return size;
}
else
{
printbuf_memappend(p, buf, size);
return size;
size = printbuf_memappend(p, buf, size);
}
return size;
}

void printbuf_reset(struct printbuf *p)


Loading…
Cancel
Save