Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing strnlen() on MingW #60

Closed
gvanem opened this issue Mar 30, 2015 · 1 comment
Closed

Missing strnlen() on MingW #60

gvanem opened this issue Mar 30, 2015 · 1 comment

Comments

@gvanem
Copy link

gvanem commented Mar 30, 2015

MingW doesn't have strnlen() which is needed in sniffer.c + snifftest.c. To solve it, I added this to my config.h:

    extern __inline__ size_t strnlen (const char *str, size_t maxsize)
    {
      size_t n;
      for (n = 0; n < maxsize && *str; n++, str++)
        ;
      return (n);
    }

Maybe the missing functions (strnlen, strsep) could be added to a more suitable place?

ejohnstown added a commit that referenced this issue Mar 31, 2015
   accounted for size differences (fixes issue #60)
2. fixed overrun with long SNI names in hello messages
@ejohnstown
Copy link
Contributor

I replaced the call to strnlen() with strlen() and did my size check separately. strnlen() isn't very portable, as you found, so we shouldn't use it.

kojo1 pushed a commit to kojo1/wolfssl that referenced this issue Mar 4, 2022
revert increment of nameListIdx for RSA connection
lealem47 pushed a commit to lealem47/wolfssl that referenced this issue Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants