On Sat, 11 Aug 2012, Pascal Stumpf wrote:

> On Sat, 11 Aug 2012 13:52:08 +0200, Marc Balmer wrote:
>> Wouldn't it be better to avoid the multiplication in malloc here, too?
>>
>> i.e. instead of
>>
>>> sets = (std::ostrstream **)
>>> +                   malloc(sizeof(std::ostrstream *) * sets_max);
>>
>> use
>>
>>> sets = (std::ostrstream **)
>>> +                   calloc(sizeof(std::ostrstream *), sets_max);
>>
>>
>> (to avoid possible integer overflow)
>
> Indeed, but in this patch I only bothered with making it work.
> Replacing mallog(a*b) with calloc should be done as a separate effort
> across the whole tree.
>

Agreed, lets save wholesale code changes like this for some time in
the future... My goal is to get as much of CDE as possible, working on
as many platforms as possible.  Such widescale internal work can
wait.

-- 
Jon Trulson

"If the Martian rope-a-dope don't get him, he'll get himself, he'll
  come in too fast and punch himself out."
              - one of my brothers, referring to the Curiosity landing.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to