]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Don't cast off_t to 32-bit type for output, bug fix
authorPeter Eisentraut <peter@eisentraut.org>
Wed, 1 Jul 2026 07:40:16 +0000 (09:40 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Wed, 1 Jul 2026 07:40:16 +0000 (09:40 +0200)
commitd4e2280b7e4872b603592ae521320b9d1c4e6b24
tree9715ffa7966d7ffa4c42331e07143594b40f3e48
parent182f6944d3d0eeccf60e5885757f1677d4b988cc
Don't cast off_t to 32-bit type for output, bug fix

off_t is most likely a 64-bit integer, so casting it to a 32-bit type
for output could lose data.  There are more issues like this in the
tree, but this is an instance where this could actually happen in
practice, since base backups are routinely larger than 4 GB.  So this
is separated out as a bug fix.

Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Discussion: https://www.postgresql.org/message-id/flat/20ce62fa-47fc-457b-b504-12f3c1651726%40eisentraut.org
src/backend/backup/basebackup_server.c