Skip to content

Commit 05b2694

Browse files
authored
Fix #8452 - Disallow creation of object names with only spaces. (#8473)
1 parent e172aed commit 05b2694

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/dsql/Parser.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,10 @@ int Parser::yylexAux()
545545
Attachment* const attachment = tdbb->getAttachment();
546546
const MetaName name(attachment->nameToMetaCharSet(tdbb, MetaName(buffer, p - buffer)));
547547
const unsigned charLength = metadataCharSet->length(
548-
name.length(), (const UCHAR*) name.c_str(), true);
548+
name.length(), (const UCHAR*) name.c_str(), false);
549+
550+
if (charLength == 0)
551+
yyabandon(yyposn, -104, isc_dyn_zero_len_id);
549552

550553
if (name.length() > MAX_SQL_IDENTIFIER_LEN || charLength > METADATA_IDENTIFIER_CHAR_LEN)
551554
yyabandon(yyposn, -104, isc_dyn_name_longer);

0 commit comments

Comments
 (0)