From f39a1394b619b81e8bfed1809a2046f914cb2c5c Mon Sep 17 00:00:00 2001 From: "dbradley%netscape.com" Date: Tue, 25 Mar 2003 07:07:48 +0000 Subject: [PATCH] Bug 189922 - Uninitialized variable in xpcom/typelib/xpt/src/xpt_struct. r=timeless, sr=jst --- xpcom/typelib/xpt/src/xpt_struct.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xpcom/typelib/xpt/src/xpt_struct.c b/xpcom/typelib/xpt/src/xpt_struct.c index b2c36881784..16116c20651 100644 --- a/xpcom/typelib/xpt/src/xpt_struct.c +++ b/xpcom/typelib/xpt/src/xpt_struct.c @@ -249,18 +249,18 @@ XPT_DoHeader(XPTArena *arena, XPTCursor *cursor, XPTHeader **headerp) if (!XPT_DoHeaderPrologue(arena, cursor, headerp, &ide_offset)) return PR_FALSE; + header = *headerp; /* * Make sure the file length reported in the header is the same size as * as our buffer unless it is zero (not set) */ - if (mode == XPT_DECODE && ((*headerp)->file_length != 0 && - cursor->state->pool->allocated < (*headerp)->file_length)) { + if (mode == XPT_DECODE && (header->file_length != 0 && + cursor->state->pool->allocated < header->file_length)) { fputs("libxpt: File length in header does not match actual length. File may be corrupt\n", stderr); goto error; } - header = *headerp; if (mode == XPT_ENCODE) XPT_DataOffset(cursor->state, &header->data_pool); if (!XPT_Do32(cursor, &header->data_pool))