aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1fix/asn1fix.c
diff options
context:
space:
mode:
Diffstat (limited to 'libasn1fix/asn1fix.c')
-rw-r--r--libasn1fix/asn1fix.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libasn1fix/asn1fix.c b/libasn1fix/asn1fix.c
index 8d2317f4..6165873c 100644
--- a/libasn1fix/asn1fix.c
+++ b/libasn1fix/asn1fix.c
@@ -245,10 +245,19 @@ asn1f_fix_module__phase_2(arg_t *arg) {
asn1p_expr_t *expr;
int rvalue = 0;
int ret;
+ char *prefix = getenv("ASN1C_PREFIX");
TQ_FOR(expr, &(arg->mod->members), next) {
arg->expr = expr;
+ if (prefix) {
+ char *tmp = malloc(strlen(prefix)+strlen(expr->Identifier)+1);
+ sprintf(tmp, "%s%s", prefix, expr->Identifier);
+ expr->Identifier = tmp;
+ /* FIXME: what about old memory ? */
+#warning "Fix this memory leak"
+ }
+
/*
* Dereference DEFAULT values.
*/