зеркало из https://github.com/mozilla/gecko-dev.git
NOT YET PART OF SEAMONKEY:
* committing fixes for shaver * header pointer is now set XPT_DoHeader * fixed assertion error in CHECK_COUNT macro
This commit is contained in:
Родитель
6db99a172d
Коммит
30a0f2ae51
|
@ -97,9 +97,8 @@ XPT_DoHeader(XPTCursor *cursor, XPTHeader **headerp)
|
|||
header = PR_NEWZAP(XPTHeader);
|
||||
if (!header)
|
||||
return PR_FALSE;
|
||||
} else {
|
||||
header = *headerp;
|
||||
}
|
||||
*headerp = header;
|
||||
|
||||
if (mode == XPT_ENCODE) {
|
||||
/* IDEs appear after header, including annotations */
|
||||
|
|
|
@ -48,7 +48,8 @@
|
|||
#define CHECK_COUNT_(cursor, space) \
|
||||
/* if we're in the header, then exceeding the data_offset is illegal */ \
|
||||
((cursor)->pool == XPT_HEADER ? \
|
||||
((cursor)->offset - 1 + (space) > (cursor)->state->data_offset \
|
||||
(ENCODING(cursor) && \
|
||||
((cursor)->offset - 1 + (space) > (cursor)->state->data_offset) \
|
||||
? (DBG(("no space left in HEADER %d + %d > %d\n", (cursor)->offset, \
|
||||
(space), (cursor)->state->data_offset)), PR_FALSE) \
|
||||
: PR_TRUE) : \
|
||||
|
|
|
@ -97,9 +97,8 @@ XPT_DoHeader(XPTCursor *cursor, XPTHeader **headerp)
|
|||
header = PR_NEWZAP(XPTHeader);
|
||||
if (!header)
|
||||
return PR_FALSE;
|
||||
} else {
|
||||
header = *headerp;
|
||||
}
|
||||
*headerp = header;
|
||||
|
||||
if (mode == XPT_ENCODE) {
|
||||
/* IDEs appear after header, including annotations */
|
||||
|
|
|
@ -48,7 +48,8 @@
|
|||
#define CHECK_COUNT_(cursor, space) \
|
||||
/* if we're in the header, then exceeding the data_offset is illegal */ \
|
||||
((cursor)->pool == XPT_HEADER ? \
|
||||
((cursor)->offset - 1 + (space) > (cursor)->state->data_offset \
|
||||
(ENCODING(cursor) && \
|
||||
((cursor)->offset - 1 + (space) > (cursor)->state->data_offset) \
|
||||
? (DBG(("no space left in HEADER %d + %d > %d\n", (cursor)->offset, \
|
||||
(space), (cursor)->state->data_offset)), PR_FALSE) \
|
||||
: PR_TRUE) : \
|
||||
|
|
Загрузка…
Ссылка в новой задаче