diff --git a/src/gdb_packet.c b/src/gdb_packet.c index fb3335e..9ce63f2 100644 --- a/src/gdb_packet.c +++ b/src/gdb_packet.c @@ -159,7 +159,8 @@ void gdb_outf(const char *fmt, ...) char *buf; va_start(ap, fmt); - vasprintf(&buf, fmt, ap); + if (vasprintf(&buf, fmt, ap) < 0) + return; gdb_out(buf); free(buf); va_end(ap);