multimedia/dvdauthor - readxml.c:utf8tolocal is not 64-bit clean
Sean McNeil
sean at mcneil.com
Sun Dec 5 20:25:05 PST 2004
This routine calls iconv with the assumption that int <-> size_t plus
has a bugus cast. The patch below makes spumux work on my FreeBSD/amd64
system.
--- dvdauthor-0.6.10/src/readxml.c.orig Fri Mar 12 23:57:39 2004
+++ dvdauthor-0.6.10/src/readxml.c Sun Dec 5 20:19:28 2004
@@ -221,13 +221,13 @@
char *utf8tolocal(const char *in)
{
iconv_t c=get_conv();
- int inlen=strlen(in);
- int outlen=inlen*5;
+ size_t inlen=strlen(in);
+ size_t outlen=inlen*5;
char *r=malloc(outlen+1);
char *out=r;
- int v;
+ size_t v;
- v=iconv(c,ICONV_CAST &in,&inlen,&out,&outlen);
+ v=iconv(c,&in,&inlen,&out,&outlen);
if(v==-1) {
fprintf(stderr,"ERR: Cannot convert UTF8 string '%s': %s\n",in,strerror(errno));
exit(1);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20041205/7361a7e6/attachment.bin
More information about the freebsd-ports
mailing list