help-octave
[Top][All Lists]
Advanced

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

Re: cell2csv (io package): Higher precision of floating point numbers?


From: PhilipNienhuis
Subject: Re: cell2csv (io package): Higher precision of floating point numbers?
Date: Wed, 31 Aug 2016 05:45:35 -0700 (PDT)

Martin Kunz wrote
> Am 30.08.2016 um 12:16 schrieb PhilipNienhuis:
>> IIRC C++ silently extends strings if assignments overflow the current
>> string
>> length.
> 
> I am not familiar with C++, but these two links
> 
>    
> http://stackoverflow.com/questions/10398144/does-buffer-overflow-happen-in-c-strings
> 
>     http://www.cprogramming.com/tutorial/lesson9.html
> 
> suggest that while 'std::string' buffers are automatically extended, the
> 'char tmp[20]' used in cell2csv.cc is old C-style and can overflow.
> 
> Defining the temporary variable as 'char tmp[25]' (or maybe 30
> characters long, just to be sure?) seems the right thing to do here.

OK, Done.
P.



--
View this message in context: 
http://octave.1599824.n4.nabble.com/cell2csv-io-package-Higher-precision-of-floating-point-numbers-tp4679437p4679567.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]