[Slirp] [Git][slirp/libslirp][master] 2 commits: ip_stripoptions use memmove

Samuel Thibault gitlab at gitlab.freedesktop.org
Fri Jul 17 17:34:27 UTC 2020



Samuel Thibault pushed to branch master at slirp / libslirp


Commits:
d620bac8 by Dr. David Alan Gilbert at 2020-07-17T18:27:24+01:00
ip_stripoptions use memmove

ip_stripoptions is moving data long in the same buffer; that's undefined
with memcpy, use memmove.

Buglink: https://bugs.launchpad.net/qemu/+bug/1878043
Signed-off-by: Dr. David Alan Gilbert <dgilbert at redhat.com>

- - - - -
a4e41a7e by Samuel Thibault at 2020-07-17T17:34:24+00:00
Merge branch 'lp1878043' into 'master'

ip_stripoptions use memmove

See merge request slirp/libslirp!47
- - - - -


1 changed file:

- src/ip_input.c


Changes:

=====================================
src/ip_input.c
=====================================
@@ -454,7 +454,7 @@ void ip_stripoptions(register struct mbuf *m, struct mbuf *mopt)
     olen = (ip->ip_hl << 2) - sizeof(struct ip);
     opts = (char *)(ip + 1);
     i = m->m_len - (sizeof(struct ip) + olen);
-    memcpy(opts, opts + olen, (unsigned)i);
+    memmove(opts, opts + olen, (unsigned)i);
     m->m_len -= olen;
 
     ip->ip_hl = sizeof(struct ip) >> 2;



View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/compare/73336e08902a7e826f7d960453df037380266186...a4e41a7e1d6a3a1aab972b36f8a6cdf570bb82b7

-- 
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/compare/73336e08902a7e826f7d960453df037380266186...a4e41a7e1d6a3a1aab972b36f8a6cdf570bb82b7
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/slirp/attachments/20200717/23db1a44/attachment.htm>


More information about the Slirp mailing list