Skip to content
Snippets Groups Projects
Commit 05740485 authored by Michael Meskes's avatar Michael Meskes
Browse files

Fixed array checking code for "unsigned long long" datatypes in libecpg.

parent dbe56f2a
No related branches found
No related tags found
No related merge requests found
...@@ -374,8 +374,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, ...@@ -374,8 +374,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
#ifdef HAVE_STRTOULL #ifdef HAVE_STRTOULL
case ECPGt_unsigned_long_long: case ECPGt_unsigned_long_long:
*((unsigned long long int *) (var + offset * act_tuple)) = strtoull(pval, &scan_length, 10); *((unsigned long long int *) (var + offset * act_tuple)) = strtoull(pval, &scan_length, 10);
if ((isarray && *scan_length != ',' && *scan_length != '}') if (garbage_left(isarray, scan_length, compat))
|| (!isarray && !(INFORMIX_MODE(compat) && *scan_length == '.') && *scan_length != '\0' && *scan_length != ' ')) /* Garbage left */
{ {
ecpg_raise(lineno, ECPG_UINT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); ecpg_raise(lineno, ECPG_UINT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
return (false); return (false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment