diff options
author | druid <druid@devel> | 2012-01-30 16:44:39 +0100 |
---|---|---|
committer | druid <druid@devel> | 2012-01-30 16:44:39 +0100 |
commit | 984bda19a6a21635d5f7ce2abf97c91cddcd0b12 (patch) | |
tree | c8c2da19a65b5898f0321938e5fbd3dc443f7d76 /overflow.c | |
parent | 8d64f054048f6402dedbaef11ea5d0f7bd8d530f (diff) |
second commit
Diffstat (limited to 'overflow.c')
-rw-r--r-- | overflow.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -10,25 +10,26 @@ #include <string.h> #define ENV_VAR "EXPLOIT" -#define BUFLEN 256 +#define BUFLEN 64 -u_char buf[BUFLEN]; -u_char *env; +char buf[BUFLEN]; +char *env; int main() { - if (env = getenv(ENV_VAR)) + fprintf(stderr, "buflen: %d\nenv_var: %s\n\n", BUFLEN, ENV_VAR); + if ( (env = getenv(ENV_VAR)) ) { - fprintf(stderr, "env: "ENV_VAR" set\n"); + fprintf(stderr, "env_var: "ENV_VAR"\n"); fprintf(stderr, "env: %s\n", env); strcpy(buf, env); } else { - fprintf(stderr, "env: "ENV_VAR" not set, abort!\n"); + fprintf(stderr, "env_var: "ENV_VAR" not set, abort!\n"); } - return 0; + return(0); } |