Value changed when parsing parameters

I get a strange problem here, and ask for help.

    (gdb) 
        28        set_file_bit( file, bytePos, bitPos, argv[1] );
        (gdb) p argv[1]
        $3 = 0xbfffef5c "00"
        (gdb) s
        set_file_bit (file=0x804b008, bytePos=2, bitPos=2, binary=0x80490e5 "11") at util/file.c:112
        112        long int pos = ftell(file);

We can see the value of binary is 0x80490e5, not 0xbfffef5c , why?
argv is the parameter of function main.
some part of function main is

    int main( int argc, char** argv ){
        FILE* file = 0;
        file = fopen( "t.txt", "r+" );
        unsigned int bytePos = 2;
        unsigned int bitPos = 2;
        char buff[2] = { 0, 0 };
        get_byte( file, bytePos, 1, buff);
        set_file_bit( file, bytePos, bitPos, argv[1] );

Thanks

Can you show us the function prototype of set_file_bit()? and the arguments you passed to the main?

--ahamed

One of those looks to be stored on the stack, another looks to be malloc()ed.

If I had to guess, I'd say it changed because something overwrote the pointer in the mistaken hope that this'd somehow propagate outside the function (it doesn't)