summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 5869a318..82903afa 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -1179,9 +1179,11 @@ struct dwflpp
static void loc2c_error (void *arg, const char *fmt, ...)
{
char *msg = NULL;
+ int rc;
va_list ap;
va_start (ap, fmt);
- vasprintf (&msg, fmt, ap);
+ rc = vasprintf (&msg, fmt, ap);
+ if (rc < 0) msg = "?";
va_end (ap);
throw semantic_error (msg);
}