All pastes #940071 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-03-12 19:19 UTC
rendered paste body
(gdb) run `perl -e 'print "A"x16 . "\x02" . "\xfe" . "\xff"x255'`
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/ninjachrist/test `perl -e 'print "A"x16 . "\x02" . "\xfe" . "\xff"x255'`

Breakpoint 1, badfunc (data=0xbfb109c2 'A' <repeats 16 times>, "\002þ", 'ÿ' <repeats 182 times>..., size=273) at test.c:9
9        printf("buf[]: %s.\n",buf);
(gdb) x /1xw &i
0xbfb0f2b0:     0x00010000
(gdb) p i
$6 = 65536


(gdb) run `perl -e 'print "A"x16 . "\x02" . "\xfd" . "\xff"x255 . "\xff"x65536'`
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/ninjachrist/test `perl -e 'print "A"x16 . "\x02" . "\xfd" . "\xff"x255 . "\xff"x65536'`

Breakpoint 1, badfunc (data=0xbfc7b9c2 'A' <repeats 16 times>, "\002ý", 'ÿ' <repeats 182 times>..., size=65809) at test.c:9
9        printf("buf[]: %s.\n",buf);
(gdb) p i
$8 = 16777216
(gdb) x /1xw &i
0xbfc7a430:     0x01000000