This is an automated email from the git hooks/post-receive script. xguimard-guest pushed a commit to branch master in repository libdbd-mysql-perl.
commit 51ad96adc792daba2bcfa912699d0527e0187d06 Author: Xavier Guimard <x.guim...@free.fr> Date: Mon Feb 12 12:51:01 2018 +0100 Update regression-fix-float_type_conversion.patch --- .../regression-fix-float_type_conversion.patch | 70 +++++++++++----------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/debian/patches/regression-fix-float_type_conversion.patch b/debian/patches/regression-fix-float_type_conversion.patch index 041ba0a..0743503 100644 --- a/debian/patches/regression-fix-float_type_conversion.patch +++ b/debian/patches/regression-fix-float_type_conversion.patch @@ -1,47 +1,47 @@ From: Pali <p...@cpan.org> Date: Fri, 24 Feb 2017 19:51:36 +0100 Subject: [PATCH] Fix type conversions - -Calling SvNV() for magical scalar is not enough for float type conversion. -It caused problem for Amavis in tainted mode -- all float values were zero. -On the other hand SvIV() and SvUV() seems to work fine. To be sure that -correct value of float is in scalar use sv_setnv() with explicit NV float -value. Similar code is changed also for integers IV/UV. - -This patch should fix reported Amavis bug: -https://github.com/perl5-dbi/DBD-mysql/issues/78 - -See also reported perl bug about SvNV(): -https://rt.perl.org/Public/Bug/Display.html?id=130801 - + Calling SvNV() for magical scalar is not enough for float type conversion. + It caused problem for Amavis in tainted mode -- all float values were zero. + On the other hand SvIV() and SvUV() seems to work fine. To be sure that + correct value of float is in scalar use sv_setnv() with explicit NV float + value. Similar code is changed also for integers IV/UV. + . + This patch should fix reported Amavis bug: + https://github.com/perl5-dbi/DBD-mysql/issues/78 + . + See also reported perl bug about SvNV(): + https://rt.perl.org/Public/Bug/Display.html?id=130801 Bugs: https://github.com/perl5-dbi/DBD-mysql/issues/78 Bugs-Debian: https://bugs.debian.org/856064 +Last-Update: 2018-02-12 +Reviewed-By: Xavier Guimard <x.guim...@free.fr> --- a/dbdimp.c +++ b/dbdimp.c -@@ -4250,8 +4250,7 @@ - switch (mysql_to_perl_type(fields[i].type)) { - case MYSQL_TYPE_DOUBLE: - /* Coerce to dobule and set scalar as NV */ -- (void) SvNV(sv); -- SvNOK_only(sv); -+ sv_setnv(sv, SvNV(sv)); - break; - - case MYSQL_TYPE_LONG: -@@ -4259,13 +4258,11 @@ - /* Coerce to integer and set scalar as UV resp. IV */ - if (fields[i].flags & UNSIGNED_FLAG) - { -- (void) SvUV(sv); -- SvIOK_only_UV(sv); -+ sv_setuv(sv, SvUV(sv)); - } - else +@@ -4384,8 +4384,7 @@ + if (!(fields[i].flags & ZEROFILL_FLAG)) { -- (void) SvIV(sv); -- SvIOK_only(sv); -+ sv_setiv(sv, SvIV(sv)); + /* Coerce to dobule and set scalar as NV */ +- (void) SvNV(sv); +- SvNOK_only(sv); ++ sv_setnv(sv, SvNV(sv)); } break; +@@ -4396,13 +4395,11 @@ + /* Coerce to integer and set scalar as UV resp. IV */ + if (fields[i].flags & UNSIGNED_FLAG) + { +- (void) SvUV(sv); +- SvIOK_only_UV(sv); ++ sv_setuv(sv, SvUV(sv)); + } + else + { +- (void) SvIV(sv); +- SvIOK_only(sv); ++ sv_setiv(sv, SvIV(sv)); + } + } + break; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdbd-mysql-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits