Created
February 9, 2015 09:26
-
-
Save hktechn0/3c7b9c2f17325f87db75 to your computer and use it in GitHub Desktop.
test overflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) | |
{ | |
volatile char test, i; | |
__asm__ volatile("mov $82, %0 \n" | |
"mov $0, %1 \n" | |
"addb $127, %0 \n" | |
"jno hogehoge \n" | |
"mov $1, %1 \n" | |
"hogehoge: nop": "=r"(test), "=r"(i)); | |
printf("%d\n", i); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment