But it's still not NULL-terminated! Here's the proper fix:

```
size_t len = strlen(sec);
if (len > LONGKEYBUFF - 1)
    len = LONGKEYBUFF - 1;
strncpy(longkey, sec, len + 1);
```

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/719#issuecomment-171693425
_______________________________________________
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to