Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is \363\353\377\377\377\177?

Tags:

c

gdb

(gdb) p (char*)0x7fffffffe9c8
$16 = 0x7fffffffe9c8 "\363\353\377\377\377\177"

It doesn't look like ascii nor multibyte,what's that?

like image 615
cpuer Avatar asked Jun 02 '11 01:06

cpuer


2 Answers

These are octal character escapes. They are usually used to insert bytes into a string that don't have a meaning as text or need to have a certain binary value. \377 for instance is the hexadecimal value ff or decimal 255 which would be this ÿ in ASCII but most likely has a very different meaning in this context.

like image 101
x4u Avatar answered Nov 09 '22 14:11

x4u


It's not text. It looks like the address you're examining contains another pointer to something on the stack. Try it as (char **)0x7fffffffe9c8, or some other double pointer type.

Edit: To elaborate, OP is examining non-text data in a debugger and asking the encoding. The correct answer is simply that it's not text. It's an integer 0x7fffffffebf3 and it's almost certainly a pointer to a string (since it's not aligned and points somewhere on the stack), meaning that the original pointer was probably of type char ** not char *.

like image 33
R.. GitHub STOP HELPING ICE Avatar answered Nov 09 '22 15:11

R.. GitHub STOP HELPING ICE