diff --git a/m4/mmap_write.m4 b/m4/mmap_write.m4 index 0aa0b61799..f1241a19d5 100644 --- a/m4/mmap_write.m4 +++ b/m4/mmap_write.m4 @@ -25,7 +25,7 @@ AC_DEFUN([DOVECOT_MMAP_WRITE], [ perror("mmap()"); return 1; } - strcpy(mem, "2"); + strncpy(mem, "2"); msync(mem, 2, MS_SYNC); lseek(f, 0, SEEK_SET); write(f, "3", 2);