Bug#369179: [Pkg-dspam-misc] Bug#369179: libdspam7-drv-pgsql: Invalid
SQL when token type is NUMERIC(10)
Matthijs Mohlmann
matthijs at cacholong.nl
Sun May 28 11:18:07 UTC 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
tags 369179 + patch
thanks
Rupa Schomaker wrote:
> Package: libdspam7-drv-pgsql
> Version: 3.6.4-4
> Severity: important
>
> The PG driver for dspam supports bigint for the token field and numeric(10).
> bigint is prefered, but if moving from hash to sql the value is too large
> to fit into a bigint and so the workaround is to use numeric(10) instead.
> (there is a program to dump a numeric(10) version to a bigint version, but
> that segfaults -- another bug for that when I have the data I need).
>
Ok.
> Anyway, the token data in improperly quoted. Patch below:
>
> --- pgsql_drv.c.orig 2006-05-27 20:15:38.309621367 -0400
> +++ pgsql_drv.c 2006-05-27 20:03:20.597998961 -0400
> @@ -2620,7 +2620,7 @@
> if (type == 1) {
> snprintf(buffer, bufsz, "%lld", token);
> } else {
> - snprintf(buffer, bufsz, "'%llu'", token);
> + snprintf(buffer, bufsz, "%llu", token);
> }
> return buffer;
> }
>
>
Thanks for the patch and applied in svn.
Regards,
Matthijs Mohlmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEeYbv2n1ROIkXqbARApjzAJ9TwUzTU5+NChPQml1lpYQYmnwyTgCeN+EA
N1ltDAWbDTS9CWLc5zV+4x8=
=9h98
-----END PGP SIGNATURE-----
More information about the Pkg-dspam-misc
mailing list