if (howmany < flen) {
if (PRUint32(howmany) < flen) {
XPTHeader *getHeader(const char *filename, nsIAllocator *al) {    XPTState *state = NULL;    XPTCursor curs, *cursor = &curs;    XPTHeader *header = NULL;    PRFileInfo fileinfo;    PRUint32 flen;    char *whole = NULL;    PRFileDesc *in = NULL;    if (PR_GetFileInfo(filename, &fileinfo) != PR_SUCCESS) {        NS_ERROR("PR_GetFileInfo failed");        return NULL;    }    flen = fileinfo.size;    whole = (char *)al->Alloc(flen);    if (!whole) {        NS_ERROR("FAILED: allocation for whole");        return NULL;    }    in = PR_Open(filename, PR_RDONLY, 0);    if (!in) {        NS_ERROR("FAILED: fopen");        goto out;    }    if (flen > 0) {       	PRInt32 howmany = PR_Read(in, whole, flen);       	if (howmany < 0) {           	NS_ERROR("FAILED: reading typelib file");           	goto out;       	}#ifdef XP_MAC		// Mac can lie about the filesize, because it includes the resource fork		// (where our CVS information lives). So we'll just believe it if it read		// less than flen bytes.		flen = howmany;#else		if (howmany < flen) {			NS_ERROR("typelib short read");			goto out;		}#endif        state = XPT_NewXDRState(XPT_DECODE, whole, flen);        if (!XPT_MakeCursor(state, XPT_HEADER, 0, cursor)) {            NS_ERROR("MakeCursor failed\n");            goto out;        }        if (!XPT_DoHeader(cursor, &header)) {            NS_ERROR("DoHeader failed\n");            goto out;        }    } out:    if (state != NULL)        XPT_DestroyXDRState(state);    if (whole != NULL)        al->Free(whole);    if (in != NULL)        PR_Close(in);    return header;}