Re: [xml] xmlOutputBufferGetSize and xmlOutputBufferGetContent

2013-06-06 Thread Breno Silva
Hello guys thank you for your attention. Let me share with you the code:
https://github.com/SpiderLabs/ModSecurity/blob/remotes/trunk/apache2/msc_crypt.c

Daniel, i think that would be the problem... there is something i'm missing
or doing wrong between the time i change the tree and start accessing the
output buffer.

In this code int the line 708 i'm changing the tree using xmlSetProp(),
then starting on line 1076 i would like to get the new tree and copy it to
my own variable.

Let me know if you have any more questions.

Thanks

Breno




On Thu, Jun 6, 2013 at 5:24 AM, Daniel Veillard  wrote:

> On Thu, Jun 06, 2013 at 02:51:19PM +1000, Callum Gibson wrote:
> > On 06Jun13 01:38, Breno Silva wrote:
> > }> I changed it to (using libxml2 2.9.0):
> > }>
> > }> memcpy(buf, xmlOutputBufferGetContent(output_buf),
> > }> xmlOutputBufferGetSize(output));
> >
> > Should that second one also be output_buf, not output?
>
>   that's one thing. The other is that I dont understand what
> you are doing between the time you modify the tree (which sounds
> correct) and the time you start accessing output_buf which I assume
> is an xmlOutputBufferPtr. An xmlOutputBuffer ought to be flushed
> before collecting data for example if there is an encoding conversion
> taking place from UTF-8. But that's all guessing without seeing the
> actual code...
>
> Daniel
>
> --
> Daniel Veillard  | Open Source and Standards, Red Hat
> veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
> http://veillard.com/ | virtualization library  http://libvirt.org/
> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml
>
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] xmlOutputBufferGetSize and xmlOutputBufferGetContent

2013-06-06 Thread Breno Silva
I think this will fix the issue.

Let me know what is the correct way to access the output content with older
libxml2:

memcpy(buffer, (char
*)xmlBufferContent(output_buf->conv), output_buf->conv->use);

or

memcpy(buffer, (char *)output_buf->conv->content, output_buf->conv->use);

Thanks you

Breno


On Thu, Jun 6, 2013 at 5:39 PM, Callum Gibson
wrote:

> On 06Jun13 09:10, Breno Silva wrote:
> }Hello guys thank you for your attention. Let me share with you the code:
> }
> https://github.com/SpiderLabs/ModSecurity/blob/remotes/trunk/apache2/msc_crypt.c
> }
> }Daniel, i think that would be the problem... there is something i'm
> missing
> }or doing wrong between the time i change the tree and start accessing the
> }output buffer.
>
> Based on Daniel's comment, I'd say you need to add a call to
> xmlOutputBufferFlush(output_buf) at line 1075, after you've written to it
> and before you try to use it.
>
> C
>
> --
>
> Callum Gibson @ home
>
> ___
> xml mailing list, project page  http://xmlsoft.org/
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml
>
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] hi

2013-06-06 Thread John Davis


 http://grupo-u.com/quepar/grbyzbp.php 
















  




































___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml