This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[dthorpe@inprise.com] libc/1840: Function result of iconv() is always zero in non-error case.



Hi glibc folks,

we've received the appended bug report.  Any comments regarding glibc
2.2?

I just looked at iconv/tst-cionv1 - the return value of the iconv
function in this example is 0.  AFAIK this is correct, isn't it?  Uli,
can you look into this, please?

Thanks,
Andreas

Subject: Topics

Topics:
   libc/1840: Function result of iconv() is always zero in non-error case.




>Number:         1840
>Category:       libc
>Synopsis:       Function result of iconv() is always zero in non-error case.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    libc-gnats
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Mon Jul 31 19:10:01 EDT 2000
>Last-Modified:
>Originator:     dthorpe@inprise.com
>Organization:
net
>Release:        2.1.3-15
>Environment:
Red Hat 6.2 default installation, PIII DELL system, en_US locale
>Description:
In glibc 2.1.2, iconv() returned the number of bytes written to the output buffer,
or -1 on error.  In glibc 2.1.3, iconv() returns zero or -1.  The 2.1.2 documentation
(in manual/charset.texi) states that iconv() is to return the number of conversions
performed.

This breaks existing code which used the function result as the indicator of 
the output data length.
>How-To-Repeat:
Change the example code in the iconv portion of the charset.texi / charset.html
 documentation to output the nconv value or otherwise use the nconv value
in the non-error condition.  In glibc 2.1.2, nconv is nonzero, in 2.1.3, it is zero.
>Fix:
>Audit-Trail:
>Unformatted:





-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]