Minor Argus Bug, XML not escaping &

Carter Bullard carter at qosient.com
Mon Mar 22 17:13:15 EDT 2010


Hey Phillip,
Try this patch.  Should do the right thing.

Carter

==== //depot/argus/clients/common/argus_util.c#190 - /home/carter/argus/clients/common/argus_util.c ====
4859c4859,4871
<       sprintf (buf, " Flags = \"%s\"", flags);
---
>       char xmlflags[64];
>       int i, len = strlen(flags);
> 
>       bzero(xmlflags, sizeof(xmlflags));
>       for (i = 0; i < len; i++) {
>          if (flags[i] == '&') {
>             sprintf(&xmlflags[strlen(xmlflags)], "&");
>          } else
>             xmlflags[strlen(xmlflags)] = *flags;
>       }
> 
>       sprintf (buf, " Flags = \"%s\"", xmlflags);
> 


On Mar 22, 2010, at 3:16 PM, Phillip G Deneault wrote:

> XML output using 'ra -M xml' properly escapes '<' and '>' in the direction field, but not the '&' which can appear in the flags field.
> 
> Running ra 3.0.2
> 
> Thanks,
> Phil
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20100322/a2b2c9e5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3815 bytes
Desc: not available
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20100322/a2b2c9e5/attachment.bin>


More information about the argus mailing list