repeat() fix:

Bruce Momjian <bruce@momjian.us>

Commit: cbe733d7527058300f325d7b3f8fec4aa4ffe3de
Author: Bruce Momjian <bruce@momjian.us>
Date: 2002-08-22T04:54:20Z
Releases: 7.3.1
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

Files

PathChange+/−
src/backend/utils/adt/oracle_compat.c modified +5 −1