Skip to content

Instantly share code, notes, and snippets.

@mattn
Forked from xaicron/gist:613146
Created October 6, 2010 12:35
Show Gist options
  • Save mattn/613273 to your computer and use it in GitHub Desktop.
Save mattn/613273 to your computer and use it in GitHub Desktop.
#include <stdio.h>
void hoge(char *str) {
str[1] = 'a';
}
int main(void) {
char foo[10];
char b[] = {0xe3,0x81,0xa0,0xe3,0x81,0xbe,0xe3,0x81,0xa3,0xe3,0x81,0xa6,0xe3,0x82,0xb3,0xe3,0x83,0xbc,0xe3,0x83,0x89,0xe3,0x82,0x92,0xe3,0x81,0x8b,0xe3,0x81,0x91,0xe3,0x82,0x88,0x00};
strcpy(foo, "hoge");
hoge(foo);
printf("%s %s\n", b, foo);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment