<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle">P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</style>
</head>
<body fPStyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<p>Also, I'm using your remote client, Jeremy.  It's a huge help and I recommend it to everyone.</p>
<div>
<p> </p>
<div><font size="2" face="Tahoma"></font> </div>
<div><font size="2" face="tahoma"></font> </div>
<div><font size="2" face="tahoma">Jamison Maxwell</font></div>
<div><font size="2" face="tahoma">p. 770 605 6653</font></div>
<div><font size="2" face="tahoma"><a href="mailto:jamison@newasterisk.com">jamison@newasterisk.com</a></font></div>
</div>
<div style="FONT-FAMILY: Times New Roman; COLOR: #000000; FONT-SIZE: 16px">
<hr tabindex="-1">
<div style="DIRECTION: ltr" id="divRpF916595"><font color="#000000" size="2" face="Tahoma"><b>From:</b> Jeremy Laidman [jlaidman@rebel-it.com.au]<br>
<b>Sent:</b> Thursday, May 02, 2013 11:14 PM<br>
<b>To:</b> Jamison Maxwell<br>
<b>Cc:</b> xymon@xymon.com; Henrik Størner<br>
<b>Subject:</b> Re: [Xymon] SCO OS 6 Returns Negative Memory<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div class="gmail_extra"><br>
<div class="gmail_quote">On 3 May 2013 04:11, Jamison Maxwell <span dir="ltr"><<a href="mailto:jamison@newasterisk.com" target="_blank">jamison@newasterisk.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
4294496256</blockquote>
</div>
<br>
Yes, this is bigger than what atoi() will return.  This is done in xymond/client/sco_sv.c in the function handle_sco_sv_client() in the following line of code:</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">
<div class="gmail_extra">                memphystotal = (atoi(memsizestr) / 1048576);</div>
<div><br>
</div>
<div>The variable memsizestr is a string pointer to the value in the [memsize] client data section.  The variable memphystotal is defined as a long, so it would make sense that atol() be used instead of atoi().</div>
<div><br>
</div>
<div>This is probably a bug in Xymon, but I'm not a C coder so I'm not entirely sure.  However, the [memsize] section is only parsed for (and sent by) SCO/Unixware systems, which isn't exactly the most popular OS around.  As far as I can tell, it's the only
 client parsing code that uses atoi() for memory numbers, and has probably rarely been used on SCO systems with sufficient memory size to overflow the signed integer type (about 2.1GB).</div>
<div><br>
</div>
<div>Henrik, agree that this is a bug?</div>
<div><br>
</div>
<div>Cheers</div>
<div>Jeremy</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>