From: wessels <> Date: Mon, 29 May 2000 06:23:06 +0000 (+0000) Subject: DW: X-Git-Tag: SQUID_3_0_PRE1~1967 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5621fc1a177c36a08aea71161b6a53db5b575f04;p=thirdparty%2Fsquid.git DW: - Use xstrncpy instead of strcpy. --- 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,