It's been rumoured that Junaid Iqbal said:
>
> Hi,
> I m getting segmentaion fault while accessing Pass in the function
> GetCookie.
> when i try to initialize it to zero its giving seg fault. working fine
> on User.
> any idea what i m doing wrong?
>
> Thanks.
You've got too many * and &
The & is idempotent viz applying it 'a second time' doesn't magically
create a pointer where there is none.
try it yourself:
printf ("its %p %p %p\n", User, &User, &User[0]);
>
>
> #include <stdio.h>
> #include <string.h>
> int main (void){
> char User[16], Pass[16];
> GetCookie(&User,&Pass);
> }
> int GetCookie(char **User, char **Pass){
> bzero(*User,15);
> bzero(*Pass,15);
> return(1);
> }
>
>
>