]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
DW:
authorwessels <>
Mon, 29 May 2000 06:23:06 +0000 (06:23 +0000)
committerwessels <>
Mon, 29 May 2000 06:23:06 +0000 (06:23 +0000)
 - Use xstrncpy instead of strcpy.

src/fs/diskd/store_io_diskd.cc

index 0643c045db7ae03b9d53ed7cca087e136f81f883..ac5f52e640270f428c0b2ebd57a47b681c7fbebf 100644 (file)
@@ -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,