aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2016-03-14 02:08:12 -0700
committerLev Walkin <vlm@lionet.info>2016-03-14 02:08:12 -0700
commit4cc4599a7cda13e39891eae9d92dec48093cd81b (patch)
treee1d203bf66566d869382db28a395e68c79545f94
parent13e57efbd50c7ed66f0312ba13b7b17360b02f14 (diff)
more diagnostics if memory fails
-rw-r--r--libasn1compiler/asn1c_save.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libasn1compiler/asn1c_save.c b/libasn1compiler/asn1c_save.c
index f3cfcdf2..fa207d35 100644
--- a/libasn1compiler/asn1c_save.c
+++ b/libasn1compiler/asn1c_save.c
@@ -549,6 +549,7 @@ generate_pdu_C_definition(void) {
char *dst;
if(pduTypes == 0) return "";
def = malloc(strlen(pduType[0].typename) + 20);
+ assert(def);
strcpy(def, " -DPDU=");
for(src = pduType[0].typename, dst = def + 7; *src; src++, dst++)
if((*dst = *src) == '-')