Just limit strlcpy with BLCKSZ

This commit is contained in:
Victor Polevoy
2025-07-15 17:40:35 +02:00
parent 0fc7f48cb1
commit 2221c3bbc1

View File

@@ -1021,7 +1021,7 @@ communicator_new_read_slru_segment(
return -1;
}
strlcpy(temp_path, path, Min(BLCKSZ, strlen(path) + 1));
strlcpy(temp_path, path, BLCKSZ);
request.read_slru_segment.destination_file_path.ptr = (uint8_t *) temp_path;
elog(DEBUG5, "readslrusegment called for kind=%u, segno=%u, file_path=\"%s\"",