1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

core: FileStorage: detect invalid attribute value

This commit is contained in:
Kumataro
2024-07-26 05:55:00 +09:00
parent 5b3f33dd11
commit be3c519956
2 changed files with 20 additions and 0 deletions
+2
View File
@@ -737,6 +737,8 @@ public:
if( c != '\"' && c != '\'' )
{
ptr = skipSpaces( ptr, CV_XML_INSIDE_TAG );
if(!ptr)
CV_PARSE_ERROR_CPP("Invalid attribute value");
if( *ptr != '\"' && *ptr != '\'' )
CV_PARSE_ERROR_CPP( "Attribute value should be put into single or double quotes" );
}