[PATCH] DLD upload

Miika Turkia miika.turkia at gmail.com
Fri Mar 15 23:12:08 PDT 2013


Just sent a patch that should do the trick. Basically NULL terminating
the string on zip_fread() did the trick. Had me quite puzzled for a
while as proper size for the decoding function did not fix the problem
without the null termination.

miika

On Sat, Mar 16, 2013 at 8:05 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
> Definitely need to free the buffer.
> Can you run under valgrind to see if there is some uninitialized memory
> involved?
>
> /D
>
>
>
>
> On March 15, 2013 10:10:31 PM Miika Turkia <miika.turkia at gmail.com> wrote:
>>
>> On Sat, Mar 16, 2013 at 1:43 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>> > Miika Turkia <miika.turkia at gmail.com> writes:
>> >>
>> >> I have also been playing with the attached patch. The debug print
>> >> seems to indicate that the buffer is formatted properly, but then it
>> >> just does not work. I wonder if this is related to the above oddity.
>> >
>> > That attached patch finally got me to look in the right direction.
>> >
>> > Here's what I just pushed.
>> >
>> > Please test (especially Sergey as you were the person initially
>> > reporting the problem).
>>
>> Something weird is going on as sometimes this works fine, other times
>> I get errors. Also the error message seems to wary quite a bit,
>> sometimes it has content from the XSLT file, sometimes from the input
>> XML. It seems to work better when the input file does not contain any
>> truncated characters, but I still get errors every now and then.
>>
>> ---8<---
>> /home/mturkia/Downloads/mturkia(3).DLD:66: parser error : Extra
>> content at the end of the document
>> <DEPTH>17.12</DEPTH>
>> ^
>> Failed to parse '/home/mturkia/Downloads/mturkia(3).DLD'.
>> mturkia at mini:~/source/subsurface$ ./subsurface
>> ~/Downloads/mturkia\(3\).DLD
>> mturkia at mini:~/source/subsurface$ ./subsurface
>> ~/Downloads/mturkia\(3\).DLD
>> /home/mturkia/Downloads/mturkia(3).DLD:585: parser error : Extra
>> content at the end of the document
>> 8;еход на 15,0 м за 2:00 мин - рантайм 2:00 на смеси
>> ^
>> Failed to parse '/home/mturkia/Downloads/mturkia(3).DLD'.
>> /home/mturkia/Downloads/mturkia(3).DLD:66: parser error : Extra
>> content at the end of the document
>> DERSIZE != ''
>> ^
>> Failed to parse '/home/mturkia/Downloads/mturkia(3).DLD'.
>> ---8<---
>>
>> Another issue is that the string returned by
>> xmlsStringLenDecodeEntities must be freed by ourselves.
>>
>> miika
>
>
>


More information about the subsurface mailing list