git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: ad43447) | patch
Improve pglz_decompress() so that it cannot clobber memory beyond the
Sat, 8 Mar 2008 01:09:36 +0000 (01:09 +0000)
Sat, 8 Mar 2008 01:09:36 +0000 (01:09 +0000)
commit 9c767ad57b2dfbbed6b08fd56c8ce320e6fe8849
Improve pglz_decompress() so that it cannot clobber memory beyond the
available output buffer when presented with corrupt input. Some testing
suggests that this slows the decompression loop about 1%, which seems an
acceptable price to pay for more robustness. (Curiously, the penalty
seems to be *less* on not-very-compressible data, which I didn't expect
since the overhead per output byte ought to be more in the literal-bytes
path.)

Patch from Zdenek Kotala. I fixed a corner case and did some renaming
of variables to make the routine more readable.
src/backend/utils/adt/pg_lzcompress.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /