- else if(_lxml->tp[j] == XML_ATTR)
- {
- if((_lxml->el[j])&&(strcasecmp(_lxml->el[j],"name") == 0))
- {
- if(!_lxml->ct[j])
- break;
+ else if (_lxml->tp[j] == XML_ATTR) {
+ if ((_lxml->el[j]) && (strcasecmp(_lxml->el[j], XML_VAR_ATTRIBUTE) == 0)) {
+ if (!_lxml->ct[j]) {
+ snprintf(_lxml->err, XML_ERR_LENGTH, "XMLERR: Invalid variable content.");
+ _lxml->err_line = _lxml->ln[j];
+ goto fail;
+ } else if (strlen(_lxml->ct[j]) >= XML_VARIABLE_MAXSIZE) {
+ snprintf(_lxml->err, XML_ERR_LENGTH, "XMLERR: Invalid variable name size.");
+ _lxml->err_line = _lxml->ln[j];
+ goto fail;
+ }