diff options
author | miau <miaukatzemiau@priveasy.de> | 2011-06-05 12:44:12 (GMT) |
---|---|---|
committer | miau <miaukatzemiau@priveasy.de> | 2011-06-05 12:44:12 (GMT) |
commit | 736c5adfd9699929a2aee4f57ed4230dbf3fb767 (patch) | |
tree | 545833bd39a0e274a7ba70f55f7195ebcefb26d2 | |
parent | 2ff4666452ee56f4d6c51b7050dbe77456110d2f (diff) |
code beauty
-rw-r--r-- | listener.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -77,9 +77,9 @@ int main(int argc, char *argv[], char *envp[]) // decode packet & launch handler buf[numbytes] = '\0'; char *task = buf, - *cl_argv[3] = {buf, (strlen(task)<numbytes) ? (buf+strlen(task)+1) : NULL, NULL }; + *cl_argv[3] = {task, (strlen(task)<numbytes) ? (buf+strlen(task)+1) : NULL, NULL }; - if (buf[0] == '/' || strstr(buf, "..")) { + if (task[0] == '/' || strstr(task, "..")) { fprintf(stderr, "payload tried directory traversal\n"); continue; } |