You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi
when i run gcc cow_attack.c -lpthread code in "dirty cow attack" , i recieve this erres:
cow_attack.c:29:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
29 | pthread_create(&pth1, NULL, madviseThread, (void *)file_size);
| ^
cow_attack.c: In function ‘writeThread’:
cow_attack.c:46:5: warning: implicit declaration of function ‘lseek’ [-Wimplicit-function-declaration]
46 | lseek(f, offset, SEEK_SET);
| ^~~~~
cow_attack.c:48:5: warning: implicit declaration of function ‘write’ [-Wimplicit-function-declaration]
48 | write(f, content, strlen(content));
| ^~~~~
cow_attack.c: In function ‘madviseThread’:
cow_attack.c:54:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
54 | int file_size = (int) arg;
what should i do?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
hi
when i run gcc cow_attack.c -lpthread code in "dirty cow attack" , i recieve this erres:
cow_attack.c:29:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
29 | pthread_create(&pth1, NULL, madviseThread, (void *)file_size);
| ^
cow_attack.c: In function ‘writeThread’:
cow_attack.c:46:5: warning: implicit declaration of function ‘lseek’ [-Wimplicit-function-declaration]
46 | lseek(f, offset, SEEK_SET);
| ^~~~~
cow_attack.c:48:5: warning: implicit declaration of function ‘write’ [-Wimplicit-function-declaration]
48 | write(f, content, strlen(content));
| ^~~~~
cow_attack.c: In function ‘madviseThread’:
cow_attack.c:54:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
54 | int file_size = (int) arg;
what should i do?
Beta Was this translation helpful? Give feedback.
All reactions