So this guy
https://www.ar15.com/forums/t_1_5/1984350_H1B-developer-code-example---.html
saysmemcpy(messagebuffer.IPv6addr, globalIPv6addr_from_UNCI, strlen(messagebuffer.IPv6addr) );should be replaced bymemcpy(messagebuffer.IPv6addr, globalIPv6addr_from_UNCI, 16 );
But wouldn't memcpy stop at a null terminator in the source address regardless of how many bytes you specify?
Your pajeet code infuriated me.
>>59895867
>But wouldn't memcpy stop at a null terminator in the source address regardless of how many bytes you specify?
no, why would it? its memcpy not strcpy you tard. Regardless both code samples are wrong and the 1st should be strnlen
>>59895867
>he can't read a man page
Fuck off street shitter.
>>59895867
How is memory and null terminators related at all?
>>59895867
>strlen on the destination
>>59896063
I mean like this:char source[] = { 0x48, 0x49, 0x00, 0x34, 0x35 };
char dest[10];
memcpy(dest, source, 5);
It only copies the first two bytes because it hits 0x00