]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Wed May 13 11:18:27 CDT 2009 Pekka Pessi <first.last@nokia.com>
authorMichael Jerris <mike@jerris.com>
Fri, 15 May 2009 16:07:59 +0000 (16:07 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 15 May 2009 16:07:59 +0000 (16:07 +0000)
  * 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
libs/sofia-sip/libsofia-sip-ua/msg/msg_header_copy.c

index e5d982acec4f788ac27cb926724384347652b60e..877487d471d03dab2b8d340984b255044bf63c83 100644 (file)
@@ -1 +1 @@
-Fri May 15 11:06:55 CDT 2009
+Fri May 15 11:07:28 CDT 2009
index bcae541382b488ee3f57575e88637bbc557375ae..06c75bc9f66ac38320aff396fff49206ec6b9a43 100644 (file)
@@ -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;
 }