yes, the problem was with the HAVE_STRNDUP flag in config.h. it is working now. thank you. Regards Shivakumar On Mon, Feb 17, 2020 at 2:16 PM Darren Tucker <dtucker@xxxxxxxxxxx> wrote: > On Mon, 17 Feb 2020 at 17:17, shiva kumar <shivakumar2696@xxxxxxxxx> > wrote: > > sshd crashes at below location. > > After compilation, when I start sshd it crashes in “sshbuf-misc.c” file > > inside “sshbuf_b64tod” function at line size_t plen = strlen(b64); > > > > The call trace is as below, > > Sshd main function -> sshkey_load_public -> sshkey_try_load_public -> > > sshkey_read -> sshbuf_b64tod > > > > During compilation a warning is thrown. Is this the trigger point for the > > crash? > > "sshkey.c", : warning #2223-D: function "strndup" declared implicitly > > if ((blobcopy = strndup(cp, space)) == NULL) > > It's possible. It'll be implicitly declared to return an int and if > that's a different size to your char * the return value will be > truncated. > > What platform is this? Does it have a native strndup (ie is > HAVE_STRNDUP defined in config.h)? If so, which header file is > strndup defined in? > > -- > Darren Tucker (dtucker at dtucker.net) > GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new) > Good judgement comes with experience. Unfortunately, the experience > usually comes from bad judgement. > -- *With Best Regards* *Shivakumar S* _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@xxxxxxxxxxx https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev