From 5621fc1a177c36a08aea71161b6a53db5b575f04 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Mon, 29 May 2000 06:23:06 +0000 Subject: [PATCH] DW: - Use xstrncpy instead of strcpy. --- src/fs/diskd/store_io_diskd.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/fs/diskd/store_io_diskd.cc b/src/fs/diskd/store_io_diskd.cc index 0643c045db..ac5f52e640 100644 --- a/src/fs/diskd/store_io_diskd.cc +++ b/src/fs/diskd/store_io_diskd.cc @@ -129,8 +129,7 @@ storeDiskdCreate(SwapDir * SD, StoreEntry * e, STFNCB * file_callback, diskdstate->id = diskd_stats.sio_id++; buf = storeDiskdShmGet(SD, &shm_offset); - /* XXX WRONG!!! :) */ - strcpy(buf, storeDiskdDirFullPath(SD, f, NULL)); + xstrncpy(buf, storeDiskdDirFullPath(SD, f, NULL), SHMBUF_BLKSZ); x = storeDiskdSend(_MQD_OPEN, SD, diskdstate->id, @@ -259,7 +258,7 @@ storeDiskdUnlink(SwapDir * SD, StoreEntry * e) } /* We can attempt a diskd unlink */ buf = storeDiskdShmGet(SD, &shm_offset); - strcpy(buf, storeDiskdDirFullPath(SD, e->swap_filen, NULL)); + xstrncpy(buf, storeDiskdDirFullPath(SD, e->swap_filen, NULL), SHMBUF_BLKSZ); x = storeDiskdSend(_MQD_UNLINK, SD, e->swap_filen, -- 2.47.3