]> git.ipfire.org Git - thirdparty/postgresql.git/commit
repeat() fix:
authorBruce Momjian <bruce@momjian.us>
Thu, 22 Aug 2002 04:54:20 +0000 (04:54 +0000)
committerBruce Momjian <bruce@momjian.us>
Thu, 22 Aug 2002 04:54:20 +0000 (04:54 +0000)
commitcbe733d7527058300f325d7b3f8fec4aa4ffe3de
tree69656b33976c7cb015d653ea7a89802106559968
parentc76f5aa53032790f5f464ad658c8f65595c12eca
repeat() fix:

> Neil Conway <neilc@samurai.com> writes:
> > +   /* Check for integer overflow */
> > +   if (tlen / slen != count)
> > +           elog(ERROR, "Requested buffer is too large.");
>
> What about slen == 0?

Good point -- that wouldn't cause incorrect results or a security
problem, but it would reject input that we should really accept.

Revised patch is attached.

Neil Conway
src/backend/utils/adt/oracle_compat.c