Skip to content

Commit

Permalink
xml: Shrink header size used to detect XML string embedded in URI
Browse files Browse the repository at this point in the history
The previous string used to detect the XML header contained the
encoding hardcoded to "utf-8", which means that a XML string using the
"UTF-8" (or any other encoding really) wouldn't be recognized as a valid
XML string.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
  • Loading branch information
pcercuei committed Jan 30, 2024
1 parent d476d1b commit 50e1ae6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <libxml/tree.h>
#include <string.h>

#define XML_HEADER "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
#define XML_HEADER "<?xml version=\"1.0\""

static struct iio_context *
xml_create_context(const struct iio_context_params *params,
Expand Down

0 comments on commit 50e1ae6

Please sign in to comment.