Hi!

It seems that SVN 3754 might accidentally have removed a line of code together with the preceding comment in SWCompress::setUncompressedBuf():

        if (!buf) {
buf = (char *)calloc(1,1); // be sure we at least allocate an empty buf for return;
                direct = 1;
                decode();
-//             slen = strlen(buf);
-               if (len)
                *len = slen;
        }

To be honest I must say it is difficult to understand this code, but I'm a bit puzzled about this change nevertheless. As far as I can tell, the len pointer might be null, and this check would prevent it from being dereferenced. Or does the API have a hidden contract that if !ibuf then len!=nullptr?


Best regards,
J
_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Reply via email to