]> git.puffer.fish Git - matthieu/frr.git/commitdiff
[bgpd] 64-bit bugfix in community_del_val by Jeremy Jackson <jerj@coplanar.net>
authorAndrew J. Schorr <schorr@ti82.(none)>
Fri, 29 May 2009 13:15:20 +0000 (09:15 -0400)
committerAndrew J. Schorr <schorr@ti82.(none)>
Fri, 29 May 2009 13:15:20 +0000 (09:15 -0400)
* bgpd/bgp_community.c: (community_del_val) Fix bug in memcpy that was
  using the wrong size on architectures where a pointer is not 32 bits.

bgpd/bgp_community.c

index a05ea6c6762062b180fe3742dc7c16db3d1967ae..64c6810f6b7a34de987d35944b5bf9b5a8cf2952 100644 (file)
@@ -78,7 +78,7 @@ community_del_val (struct community *com, u_int32_t *val)
          c = com->size -i -1;
 
          if (c > 0)
-           memcpy (com->val + i, com->val + (i + 1), c * sizeof (val));
+           memcpy (com->val + i, com->val + (i + 1), c * sizeof (*val));
 
          com->size--;