diff --git a/src/common/fb_exception.cpp b/src/common/fb_exception.cpp index 638985836d..47d9eee148 100644 --- a/src/common/fb_exception.cpp +++ b/src/common/fb_exception.cpp @@ -188,7 +188,8 @@ void makePermanentVector(ISC_STATUS* perm, const ISC_STATUS* trans, FB_THREAD_ID case isc_arg_sql_state: { const char* temp = reinterpret_cast(*trans++); - *perm++ = (ISC_STATUS)(IPTR) (allStrings->alloc(temp, strlen(temp), thr)); + size_t len = strlen(temp); + *perm++ = (ISC_STATUS)(IPTR) (allStrings->alloc(temp, len, thr)); } break; default: