Skip to content

Commit

Permalink
Debug wrapsurvexport
Browse files Browse the repository at this point in the history
  • Loading branch information
ojwb committed Dec 23, 2024
1 parent 2116108 commit 1e245ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wrapsurvexport.c
Original file line number Diff line number Diff line change
@@ -38,15 +38,19 @@ main(int argc, char **argv)
e_len = 1;
a_len = 0;
}
printf("argv[0] = %s\n", argv[0]);
char *e = malloc(e_len + strlen("OPENSSL_MODULES=") + 1);
if (!e) return 1;
strcpy(e, "OPENSSL_MODULES=");
memcpy(e + strlen("OPENSSL_MODULES="), e_val, e_len);
e[strlen("OPENSSL_MODULES=") + e_len] = '\0';
putenv(e);
printf("putenv(%s)\n", e);
char *a = malloc(a_len + strlen("survexpor_.exe") + 1);
if (!a) return 1;
memcpy(a, argv[0], a_len);
strcpy(a + a_len, "survexpor_.exe");
printf("a = %s\n", a);
if (getenv("OLLY")) argv[0] = a;
return (_execv(a, (const char * const*)argv) == -1) ? 1 : 0;
}

0 comments on commit 1e245ff

Please sign in to comment.