× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Ooops :)  Missed that part.  You are (of course :) ) correct.  Must be 
something else corrupting the descriptor when calling iconv repeatedly.

Bruce Vining




Scott Klement <c400-l@xxxxxxxxxxxxxxxx> 
Sent by: c400-l-bounces+bvining=us.ibm.com@xxxxxxxxxxxx
04/07/2006 03:34 PM
Please respond to
C programming iSeries / AS400 <c400-l@xxxxxxxxxxxx>


To
C programming iSeries / AS400 <c400-l@xxxxxxxxxxxx>
cc

Subject
Re: [C400-L] problems with iconv_open







> The conversion descriptor is reuseable.  I would check to make sure you
> aren't inadvertently writing over it somewhere in your code (like you 
seem
> to be assuming your input will never exceed 32K but don't actually 
check).

Since outleft is set to the 32k size, iconv() won't convert past 32k 
anyway, will it?  So, unless I'm very confused, the program that I posted 
as a sample (which seems to be what you're referring to) won't ever 
overwrite memory that it shouldn't....

It's true that there might be input that doesn't get translated (if the 
parameter is longer than what will fit into the output buffer) but I don't 

see how it could overwrite another area of memory...


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.