X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/8ea17b5098f9ea11b9777cc2648d5debb00ceb35..d858b27400eba6301a25d5cb34330e7748bcf772:/lib/pool_alloc.c diff --git a/lib/pool_alloc.c b/lib/pool_alloc.c index ac655a51..b0164e78 100644 --- a/lib/pool_alloc.c +++ b/lib/pool_alloc.c @@ -44,8 +44,7 @@ struct align_test { #define PTR_ADD(b,o) ( (void*) ((char*)(b) + (o)) ) alloc_pool_t -pool_create(size_t size, size_t quantum, - void (*bomb)(char *), int flags) +pool_create(size_t size, size_t quantum, void (*bomb)(const char *), int flags) { struct alloc_pool *pool; @@ -92,7 +91,7 @@ pool_destroy(alloc_pool_t p) } void * -pool_alloc(alloc_pool_t p, size_t len, char *bomb) +pool_alloc(alloc_pool_t p, size_t len, const char *bomb) { struct alloc_pool *pool = (struct alloc_pool *) p; if (!pool) @@ -272,7 +271,7 @@ pool_stats(alloc_pool_t p, int fd, int summarize) if (pool->live) FDEXTSTAT(pool->live); - strcpy(buf, " FREE BOUND\n"); + strlcpy(buf, " FREE BOUND\n", sizeof buf); write(fd, buf, strlen(buf)); for (cur = pool->free; cur; cur = cur->next)