Activity for sxmlc

  • Joerg Bakker Joerg Bakker posted a comment on ticket #29

    Thanks for merging! Am 05.12.2022 11:43, schrieb Matthieu Labas: Nice (sort of ;))! I've applied the patch to create the v4.5.4. Thanks! [bugs:#29] [1] Fix for memory leak in sxmlc.c Status: open Group: v4.3.4 Created: Sun Dec 04, 2022 05:38 PM UTC by Joerg Bakker Last Updated: Sun Dec 04, 2022 05:38 PM UTC Owner: Matthieu Labas Attachments: sxmlc_memleak.patch [2] (1.4 kB; text/x-patch) The attached patch fixes a memory leak in sxmlc.c Sent from sourceforge.net because you indicated interest in...

  • Matthieu Labas Matthieu Labas modified ticket #29

    Fix for memory leak in sxmlc.c

  • Matthieu Labas Matthieu Labas posted a comment on ticket #29

    Nice (sort of ;))! I've applied the patch to create the v4.5.4. Thanks!

  • sxmlc sxmlc released /sxmlc_v4.5.4.zip

  • Matthieu Labas committed [35d9a2] on Git

    *** v4.5.4 - Corrected memory leak if text contained HTML-escaped characters (thanks @hakker_de!).

  • Joerg Bakker Joerg Bakker created ticket #29

    Fix for memory leak in sxmlc.c

  • sxmlc sxmlc updated /sxmlc_v4.5.3.zip

  • sxmlc sxmlc released /sxmlc_v4.5.3.zip

  • Matthieu Labas committed [f65656]

    *** v4.5.3 - Corrected write on NULL for not-XML files (thanks @bladchan!).

  • Gilles Vollant committed [b4d5c8]

    fix memory size to store safely the '\0' after the string

  • Matthieu Labas committed [87bb13]

    *** v4.5.2 - Corrected buffer overrun on unhtml() (thanks @gvollant!).

  • GitHub committed [b5427d]

    Merge pull request #23 from gvollant/bugfix/crash_memory

  • GitHub committed [65255f]

    Merge pull request #21 from jeaeberle/feature/cmake

  • Johannes Eigner committed [5e3e98]

    Improved CMake support

  • Abc Abc committed [c121c1]

    Added cmake support

  • GitHub committed [1015bb]

    Merge pull request #20 from raldone01/master

  • Damian M. G. Damian M. G. posted a comment on discussion Help

    Haha awesome. I do follow your project on github already, in fact, we exchanged some words on past years, I had another pseudonym (IgorJorobus), we fixed a few things. Thanks for the good vibes, have a good day! D.

  • Matthieu Labas Matthieu Labas posted a comment on discussion Help

    Awesome, thanks Damian! It feels really rewarding to see that this small project is actually helping people develop bigger things :) I checked out your xlsx_drone project, it seems to be something I could be working with. I especially love the very few files it needs (I guess you noticed it from sxmlc as well ;)). Also, although sxmlc staerted on SourceForge, it is on GitHub as well, in case it's easier to link to: https://github.com/matthieu-labas/sxmlc Thanks again for letting me know, I hope you...

  • Damian M. G. Damian M. G. posted a comment on discussion Help

    Hello Matthieu, I've given you credit and thanks for your library, which was used for my project xlsx_drone. Be free to check it out: https://github.com/damian-m-g/xlsx_drone I'll increase the use of sxmlc when I provide writting functionality to xlsx. Cheers & thanks, D.

  • Matthieu Labas Matthieu Labas modified a comment on discussion Help

    Thank Damian for the update. The UTF-8 part was extensively tested by "hundreds of (external) tests" (from what I was told) so I should be confident that it should be working fine, but you how bugs like to nest in the most hidden places ;) Happy New Year! :) Matthieu

  • Damian M. G. Damian M. G. posted a comment on discussion Help

    Happy New Year! :)

  • Matthieu Labas Matthieu Labas posted a comment on discussion Help

    Thank Damian for the update. The UTF-8 part was extensively tested by "hundredth of (external) tests" (from what I was told) so I should be confident that it should be working fine, but you how bugs like to nest in the most hidden places ;) Happy New Year! :) Matthieu

  • Damian M. G. Damian M. G. posted a comment on discussion Help

    Hi Matthieu, Thanks for the quick answer. I was dealing with this issue since 2 days ago, it happened to be a bug in my C code that caused the segfault. As cross-language debugging isn't possible, I wasn't able to debug the C code where things failed. So today I started dropping some printf() to track the problem and found out a bug in my code. After fixing that, everything works good. I'm able to use all my functions, and to instruct Ruby to take those strings as UTF-8. So I would say, for anyone...

  • Matthieu Labas Matthieu Labas posted a comment on discussion Help

    Hello Damian, The difference when compiling with SXMLC_UNICODE is that the file (if you're parsing files, not buffers) is opened in binary mode (fopen("rb")) and all string functions (strdup(), strlen(), etc.) assume wide char instead of char. So maybe if there are characters that must be stored on more than one byte, it could overflow some buffer. We can consider the following: multi-byte characters are never null (see https://unicodebook.readthedocs.io/unicode_encodings.html) so non-SXMLC_UNICODE...

  • Damian M. G. Damian M. G. posted a comment on discussion Help

    Hello Matthieu, I'm working with utf-8 xml files without bom without using the SXMLC_UNICODE features and everything seems to work great, my test assertions with utf-8 strings works okay. Even that, I'm having issues when calling a C function that sets utf-8 strings with a FFI, binding to Ruby. When I call it to set ASCII strings works great, but when UTF-8 is involved, the call to that function triggers a Segfault error. My question is: do I must include support for unicode (-DSXMLC_UNICODE) even...

  • sxmlc sxmlc released /sxmlc_v4.5.1.zip

  • Matthieu Labas committed [70904f]

    v4.5.1 - Added missing free() in XMLSearch_free() (thanks @yogibe4r!).

  • sxmlc sxmlc released /sxmlc_v4.5.0.zip

  • Matthieu Labas committed [bf991d]

    *** v4.5.0 - HTML decoding on node text.

  • sxmlc sxmlc released /sxmlc_v4.4.0.zip

  • Matthieu Labas committed [68a724]

    *** v4.4.0 - Added UTF-8 support (many thanks to Todd Osborne!).

  • Matthieu Labas committed [055409]

    First step of including Todd Osborne's UTF8 fixes (UTF8 support without SXMLC_UNICODE #define):

  • Matthieu Labas Matthieu Labas modified ticket #28

    Empty XML file causing segmentation fault

  • sxmlc sxmlc released /sxmlc_v4.3.4.zip

  • Matthieu Labas Matthieu Labas posted a comment on ticket #28

    OK thanks. I changed the macro to check for the i_root validity and retur NULL if < 0. I pushed the changes to v4.3.4.

  • Matthieu Labas committed [c7ad77]

    *** v4.3.4 - Test for i_root validity in macro XMLDoc_root.

  • SATOUR ELOualid SATOUR ELOualid posted a comment on ticket #28

    Hi Matthieu, Excuse me for delayed reply I am using the VERSION "4.3.3" The error appeared in the line node = XMLDoc_root(&doc); this error caused by reading empty xml file

  • Matthieu Labas Matthieu Labas modified ticket #28

    Empty XML file causing segmentation fault

  • Matthieu Labas Matthieu Labas posted a comment on ticket #28

    Hi ElOualid, Thank you for the report. However I can't find such reference in the code. Can you tell me which version you're using and which file and line number you got the error? Thanks! Matthieu

  • SATOUR ELOualid SATOUR ELOualid created ticket #28

    Empty XML file causing segmentation fault

  • Matthieu Labas Matthieu Labas modified ticket #12

    Expose data source context to user

  • Matthieu Labas Matthieu Labas posted a comment on ticket #12

    Added in v4.3.3.

  • sxmlc sxmlc released /sxmlc_v4.3.3.zip

  • Matthieu Labas committed [dbcf9c]

    *** v4.3.3 - Added Sourceforge#12 by Alexander Goomenyuk (expose data source context to user).

  • Matthieu Labas Matthieu Labas modified a comment on ticket #12

    OK, I think I get it: the entity reading the XML file is not aware about the XML structure and needs to know the offset and length to read the proper data. I will add your patch in the next version, hopefully this week. Thanks!

  • Matthieu Labas Matthieu Labas posted a comment on ticket #12

    OK, I think I get it: the entity reading the XML file is not aware about the XML structure and needs to know the offset and length. I will add your patch in the next version, hopefully this week. Thanks!

  • Alexander Goomenyuk Alexander Goomenyuk posted a comment on ticket #12

    Thanks for reply! Here is real life example: There are two exchangeable units: a flange board and add-on equipment. There is EEPROM on add-on equipment which stores some parameters of attached add-on in XML format. The add-on is attached to flange board. The firmware running on that board reads EEPROM, extracts XML file and parse it. Two XML-tags are searched for during the parsing. First tag defines begining of configuration parameters and second tag specifies the name of configuration parameters...

  • Matthieu Labas Matthieu Labas posted a comment on ticket #12

    Hi Alexander, I'm not sure I understand what is your need. Could you give me an example (if possible) so I can see if there are some other ways around? Thank you for the patch anyway, adding those information might be interesting anyway! Regards, Matthieu

  • Alexander Goomenyuk Alexander Goomenyuk created ticket #12

    Expose data source context to user

  • Matthieu Labas committed [9d5533]

    Correction of CHECK_NODE macro that returned false on valid nodes!

  • Matthieu Labas committed [8da2da]

    *** v4.3.2 - Fixed GitHub#11 by Damián M. González (missing free() on XMLNode_set_text()).

  • Matthieu Labas committed [8bfa76]

    Non-recursive doxumentation (all files are in the same directory anyway...).

  • Matthieu Labas committed [a57630]

    Do not doxument test files.

  • sxmlc sxmlc released /sxmlc_v4.3.1.zip

  • Matthieu Labas committed [5cf1ce]

    *** v4.3.1 - Correction on XMLNode_get_index().

  • sxmlc sxmlc released /sxmlc_v4.3.0.zip

  • Matthieu Labas committed [9fe2cd]

    *** v4.3.0 - Added Github#9: "Support for XMLNode_add_sibling()".

  • Matthieu Labas Matthieu Labas modified ticket #9

    Ease node creation

  • Matthieu Labas Matthieu Labas posted a comment on ticket #9

    Done in v4.2.7

  • Sebastian Boehm committed [5510cf]

    Add sx_puts, sx_fputs

  • Sebastian Boehm committed [5a622c]

    Remove unused printf data arguments

  • GitHub committed [7239fb]

    Merge pull request #8 from sometimesfood/add-fputs

  • Sebastian Boehm committed [e91c4b]

    Fix _getch define in test.c for non-Linux Unices

  • GitHub committed [afc519]

    Merge pull request #7 from sometimesfood/fix-warnings

  • Sebastian Boehm committed [75965e]

    Add const cast

  • Matthieu Labas Matthieu Labas modified ticket #27

    error reporting by the parser

  • Matthieu Labas Matthieu Labas posted a comment on ticket #27

    Fixed in v4.2.10. Though parser will not report an error on unfinished root tags. At the moment it should be considered a warning: SAX will stop parsing and the caller should check that open nodes were not finished; DOM will just leave nodes as they are (i.e. no new nodes are added to the "unfinished" nodes, though there are no way to know they were not finished).

  • Matthieu Labas Matthieu Labas modified ticket #25

    Buffer overflow issue in read_line_alloc at src/sxmlc.c:1841

  • Matthieu Labas Matthieu Labas posted a comment on ticket #25

    Fixed in v4.2.10.

  • sxmlc sxmlc released /sxmlc_v4.2.10.zip

  • Matthieu Labas committed [e4ae99]

    *** v4.2.10 - Fixed #27: report error when < or > is in attribute value.

  • Matthieu Labas Matthieu Labas modified ticket #25

    Buffer overflow issue in read_line_alloc at src/sxmlc.c:1841

  • Yunho Kim Yunho Kim posted a comment on ticket #25

    crash2.html is not a human-readable file because crash2.html is generated by our automated test generation tool FOCAL, not a human developer. A malicious attacker can use a such unexpected file (human readable or not) to cause a crash and exploit this crash as a security vulnerability. Thus, I think that this bug can cause a serious security problem and should be fixed. Thank you

  • Matthieu Labas committed [91f972]

    Forgot the version (again...).

  • Matthieu Labas Matthieu Labas modified ticket #27

    error reporting by the parser

  • Matthieu Labas Matthieu Labas posted a comment on ticket #27

    This is (somehow) expected behaviour: sxmlc was designed to handle multiple root nodes, so both xml1 and xml2 are showing two root nodes. However, one of them is not finished so a warning could be raised. I'll prepare a feature request on that. The error reported in xml3 was expected as I remember I read in some specs that > was legal in XML attribute values. However, I can't find that anymore, but could find several links showing it was illegal. As I want sxmlc to be as permissive as possible (i.e....

  • Alex K. Alex K. created ticket #27

    error reporting by the parser

  • sxmlc sxmlc released /sxmlc_v4.2.9.zip

  • Matthieu Labas committed [9e95aa]

    *** v4.2.9 - Fixed potential buffer overflow in strip_spaces() (#24).

  • Matthieu Labas committed [186994]

    *** v4.2.9 - Fixed commit.

  • Matthieu Labas committed [60c690]

    Changed Eclipse to Photo.

  • Matthieu Labas Matthieu Labas modified ticket #17

    Infinite Loop in XMLDoc_parse_buffer_DOM_text_as_nodes()

  • Matthieu Labas Matthieu Labas modified ticket #26

    XMLDoc_parse_file_DOM do not return false after finding ERROR

  • Matthieu Labas Matthieu Labas posted a comment on ticket #26

    Behaviour was changed so that 0 is returned on parsing when a SAX callback returns 0.

  • Matthieu Labas Matthieu Labas modified ticket #24

    Buffer overflow in strip_spaces src/sxmlc.c:1916

  • Matthieu Labas Matthieu Labas posted a comment on ticket #24

    Will be delivered in v4.2.9.

  • Alex K. Alex K. created ticket #26

    XMLDoc_parse_file_DOM do not return false after finding ERROR

  • Matthieu Labas Matthieu Labas posted a comment on ticket #25

    I can't read the crash2.html. Can you try to attach it again? Or copy-paste it in a comment? Thanks!

  • Matthieu Labas Matthieu Labas modified ticket #25

    Buffer overflow issue in read_line_alloc at src/sxmlc.c:1841

  • Matthieu Labas Matthieu Labas modified ticket #24

    Buffer overflow in strip_spaces src/sxmlc.c:1916

  • Matthieu Labas Matthieu Labas posted a comment on ticket #24

    There is indeed a problem in strip_spaces() when the str argument is only spaces (i.e. isspace() returns non-0).

  • Yunho Kim Yunho Kim created ticket #25

    Buffer overflow issue in read_line_alloc at src/sxmlc.c:1841

  • Yunho Kim Yunho Kim created ticket #24

    Buffer overflow in strip_spaces src/sxmlc.c:1916

  • Matthieu Labas Matthieu Labas modified ticket #23

    XMLDoc_parse_buffer_DOM bug

  • Matthieu Labas Matthieu Labas posted a comment on ticket #23

    v4.2.8 delivered.

  • sxmlc sxmlc released /sxmlc_v4.2.8.zip

  • Matthieu Labas committed [e8bdcf]

    Added macros to ease node creations, comments, ...

  • Matthieu Labas committed [da5ed1]

    *** v4.2.8 - Added buffer length to buffer parsing (#23).

  • Ermanno Ermanno posted a comment on ticket #23

    Hi Matthieu, yesterday evening I detect the problem by debugging. I solve it by using a calloc instead of malloc, so that the buffer is already well terminated. So we are reaching the same problem. Thanks, Ermanno

  • Matthieu Labas Matthieu Labas posted a comment on ticket #23

    (which means I suspect the buffer you're parsing is just enough to contain the whole XML and is not null-terminated. Removing a character somewhere will make room for the null termination and make things work)

1 >