From ae9f6cc6d107f654bd78fb6f1d9b704397283f9e Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 15 May 2009 16:07:59 +0000 Subject: [PATCH] Wed May 13 11:18:27 CDT 2009 Pekka Pessi * msg_header_copy.c: unobfuscated msg_default_dup_one() Ignore-this: 1fda1941baecad1f6397de453e606f1c Coverity issue. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13340 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/.update | 2 +- libs/sofia-sip/libsofia-sip-ua/msg/msg_header_copy.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index e5d982acec..877487d471 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Fri May 15 11:06:55 CDT 2009 +Fri May 15 11:07:28 CDT 2009 diff --git a/libs/sofia-sip/libsofia-sip-ua/msg/msg_header_copy.c b/libs/sofia-sip/libsofia-sip-ua/msg/msg_header_copy.c index bcae541382..06c75bc9f6 100644 --- a/libs/sofia-sip/libsofia-sip-ua/msg/msg_header_copy.c +++ b/libs/sofia-sip/libsofia-sip-ua/msg/msg_header_copy.c @@ -346,9 +346,9 @@ char *msg_default_dup_one(msg_header_t *h, char *b, isize_t xtra) { - memcpy(&h->sh_header_next[1], - &src->sh_header_next[1], - h->sh_class->hc_size - offsetof(msg_header_t, sh_header_next[1])); + size_t skip = offsetof(msg_numeric_t, x_value); /* Skip common part */ + + memcpy((char *)h + skip, (char const *)src + skip, h->sh_class->hc_size - skip); return b; }