dbaccess/source/ui/dlg/directsql.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 42547b6472cad484bced8aa47ecadd6d21d587ac Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Fri May 26 14:00:32 2023 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Fri May 26 17:19:08 2023 +0200 Related tdf#153317: extra check since we deal with signed integers Thank you Michael Stahl for having spotted this! :-) Change-Id: I4e643b562e6dc653a511109531837c228f0e0e0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152305 Reviewed-by: Julien Nabet <serval2...@yahoo.fr> Tested-by: Jenkins diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index a82f8d4c10f8..856a20319b03 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -325,7 +325,7 @@ namespace dbaui // In this case, there's a good chance it's a "Bit" field // remark: for unknown reason, getByte(i) gives "\000" even if the bit is at 1. auto seq = xRow->getBytes(i); - if ((seq.getLength() == 1) && (seq[0] <= 1)) + if ((seq.getLength() == 1) && (seq[0] >= 0) && (seq[0] <= 1)) { out.append(OUString::number(static_cast<int>(seq[0])) + ","); }