<div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 24, 2019 at 10:10 AM Paul Fertser <<a href="mailto:fercerpav@gmail.com">fercerpav@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
On Tue, Dec 24, 2019 at 10:02:13AM -0800, Khem Raj wrote:<br>
> + hdr->name[strlen((char*)hdr->name)] = '\0';<br>
> + strncpy((char *) hdr->name, (const char *)name, strlen((char*)hdr->name));<br>
<br>
strlen((char*)hdr->name) doesn't seem to be meaningful in this<br>
context, are you sure you were not meaning to do something like this instead?<br>
<br>
+ strncpy((char *) hdr->name, (const char *)name, sizeof(hdr->name));<br>
+ hdr->name[sizeof(hdr->name) - 1] = '\0';</blockquote><div dir="auto"><br></div><div dir="auto">Yes that is better I will send a v2 after tests</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
-- <br>
Be free, use free (<a href="http://www.gnu.org/philosophy/free-sw.html" rel="noreferrer" target="_blank">http://www.gnu.org/philosophy/free-sw.html</a>) software!<br>
mailto:<a href="mailto:fercerpav@gmail.com" target="_blank">fercerpav@gmail.com</a><br>
</blockquote></div></div>