aboutsummaryrefslogtreecommitdiffstats
path: root/mempodipper.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-01-30 19:22:13 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2012-01-30 19:22:13 +0100
commit9af7ca9fe68f21218259354776b19685583250c4 (patch)
tree1786cead2c272bed8f93f90a3b2c1305d3947105 /mempodipper.c
parentFix compilation someplaces. (diff)
downloadCVE-2012-0056-9af7ca9fe68f21218259354776b19685583250c4.tar.xz
CVE-2012-0056-9af7ca9fe68f21218259354776b19685583250c4.zip
Some platforms don't support pipe2.
Diffstat (limited to 'mempodipper.c')
-rw-r--r--mempodipper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mempodipper.c b/mempodipper.c
index 54dd26d..e17c069 100644
--- a/mempodipper.c
+++ b/mempodipper.c
@@ -102,7 +102,9 @@ unsigned long ptrace_address()
{
int fd[2];
printf("[+] Creating ptrace pipe.\n");
- pipe2(fd, O_NONBLOCK);
+ pipe(fd);
+ fcntl(fd[0], F_SETFL, O_NONBLOCK);
+
printf("[+] Forking ptrace child.\n");
int child = fork();
if (child) {