mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-24 11:25:30 +00:00
Fix some code scanning issues.
This commit is contained in:
parent
528c89ef86
commit
73c05c8b23
4
.github/codeql.yml
vendored
4
.github/codeql.yml
vendored
@ -1,5 +1,6 @@
|
|||||||
paths-ignore:
|
paths-ignore:
|
||||||
- testsuite
|
- testsuite
|
||||||
|
- testmxml.c
|
||||||
|
|
||||||
query-filters:
|
query-filters:
|
||||||
- exclude:
|
- exclude:
|
||||||
@ -46,3 +47,6 @@ query-filters:
|
|||||||
id: cpp/nested-loops-with-same-variable
|
id: cpp/nested-loops-with-same-variable
|
||||||
- exclude:
|
- exclude:
|
||||||
id: cpp/stack-address-escape
|
id: cpp/stack-address-escape
|
||||||
|
- exclude:
|
||||||
|
id: cpp/world-writable-file-creation
|
||||||
|
|
||||||
|
@ -556,7 +556,7 @@ mxmlSaveIO(
|
|||||||
if (col > 0)
|
if (col > 0)
|
||||||
{
|
{
|
||||||
// Make sure the file ends with a newline...
|
// Make sure the file ends with a newline...
|
||||||
if ((io_cb)(io_cbdata, "\n", 1) < 0)
|
if ((io_cb)(io_cbdata, "\n", 1) != 1)
|
||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -914,8 +914,6 @@ mxml_getc(mxml_options_t *options, // I - Options
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MXML_DEBUG("mxml_getc: %c (0x%04x)\n", ch < ' ' ? '.' : ch, ch);
|
|
||||||
|
|
||||||
if (mxml_bad_char(ch))
|
if (mxml_bad_char(ch))
|
||||||
{
|
{
|
||||||
_mxml_error(options, "Bad control character 0x%02x not allowed by XML standard.", ch);
|
_mxml_error(options, "Bad control character 0x%02x not allowed by XML standard.", ch);
|
||||||
|
@ -57,7 +57,6 @@ main(int argc, // I - Number of command-line args
|
|||||||
*tree, // Element tree
|
*tree, // Element tree
|
||||||
*node; // Node which should be in test.xml
|
*node; // Node which should be in test.xml
|
||||||
mxml_index_t *ind; // XML index
|
mxml_index_t *ind; // XML index
|
||||||
mxml_type_t type; // Node type
|
|
||||||
char buffer[16384]; // Save string
|
char buffer[16384]; // Save string
|
||||||
const char *text; // Text string
|
const char *text; // Text string
|
||||||
bool whitespace; // Whitespace before text string
|
bool whitespace; // Whitespace before text string
|
||||||
|
Loading…
Reference in New Issue
Block a user