]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
addr_parsing: use strncpy
authorSage Weil <sage.weil@dreamhost.com>
Sun, 21 Aug 2011 21:03:49 +0000 (14:03 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Sun, 21 Aug 2011 21:03:49 +0000 (14:03 -0700)
Coverity cid 43

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/include/addr_parsing.c

index 465a47064513e738be485abe687d3e41d6c21af8..3527cc6098b96aa8ea71fe16296bb946327f3451 100644 (file)
@@ -34,7 +34,7 @@ int safe_cat(char **pstr, int *plen, int pos, const char *str2)
     }
   }
 
-  strcpy((*pstr)+pos, str2);
+  strncpy((*pstr)+pos, str2, len2);
 
   return pos + len2;
 }