$OpenBSD$ --- src/helper/fileio.c.orig Fri Jan 16 10:02:25 2009 +++ src/helper/fileio.c Wed May 27 11:20:39 2009 @@ -53,19 +53,19 @@ int fileio_open_local(fileio_t *fileio) switch (fileio->access) { case FILEIO_READ: - strcpy(access, "r"); + strlcpy(access, "r", sizeof(access)); break; case FILEIO_WRITE: - strcpy(access, "w"); + strlcpy(access, "w", sizeof(access)); break; case FILEIO_READWRITE: - strcpy(access, "w+"); + strlcpy(access, "w+", sizeof(access)); break; case FILEIO_APPEND: - strcpy(access, "a"); + strlcpy(access, "a", sizeof(access)); break; case FILEIO_APPENDREAD: - strcpy(access, "a+"); + strlcpy(access, "a+", sizeof(access)); break; default: LOG_ERROR("BUG: access neither read, write nor readwrite"); @@ -77,7 +77,7 @@ int fileio_open_local(fileio_t *fileio) if (fileio->type == FILEIO_BINARY) #endif { - strcat(access, "b"); + strlcat(access, "b", sizeof(access)); } if (!(fileio->file = open_file_from_path (fileio->url, access)))