Re: [xml] xmlTextWriterWriteFormatElement problem



Hi everyone,

Just to follow up my post from last month (I've been on holiday!) regarding a problem with the 
xmlTextWriterWriteFormatElement call causing a seg fault when  writing strings longer than 8191 characters... 

* the code provided was just an example to highlight the problem with 8192 bytes - the real code needs to 
handle longer strings and tidies up after itself
* the code provided by Alfred Mickautsch worked fine on my machine... so no problem with the vsnprintf() or 
glibc (probably!)
* passing 8191 or less bytes worked fine - however the strings being written could be any size, so our code 
has to be able to handle longer... 

In the end, I altered our code to split any length string up into chunks of a suitable length before saving 
to disk and reconstitute the original string on reloading. Not ideal, but it worked. 

Many thanks to all those who offered help and spent time investigating the problem... sorry I wasn't able to 
add anything constructive to the cause. 

James. 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]