From ae0b95b757f231726a88332a0fd11da6daf09322 Mon Sep 17 00:00:00 2001 From: Jenny Tam Date: Wed, 27 Jun 2018 11:03:30 -0700 Subject: [PATCH] Changed int to SQLLEN to avoid infinite loop (#806) --- source/shared/core_results.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/shared/core_results.cpp b/source/shared/core_results.cpp index 85a4ecda..fc9935d5 100644 --- a/source/shared/core_results.cpp +++ b/source/shared/core_results.cpp @@ -964,7 +964,7 @@ SQLRETURN binary_to_string( _Inout_ SQLCHAR* field_data, _Inout_ SQLLEN& read_so // to_copy contains the number of bytes to copy, so we divide the number in half (or quarter) // to get the number of hex digits we can copy SQLLEN to_copy_hex = to_copy / (2 * extra); - for( int i = 0; i < to_copy_hex; ++i ) { + for( SQLLEN i = 0; i < to_copy_hex; ++i ) { *h = hex_chars[ (*b & 0xf0) >> 4 ]; h++; *h = hex_chars[ (*b++ & 0x0f) ];