am 07718a5e: Merge "Fix: Reading invalid dictionary position."

* commit '07718a5e7d31fee7aa9bcddda38ce04fabf6c5ac':
  Fix: Reading invalid dictionary position.
This commit is contained in:
Keisuke Kuroynagi 2013-07-02 02:44:15 -07:00 committed by Android Git Automerger
commit 7d4b812275

View file

@ -76,12 +76,13 @@ class TerminalAttributes {
mNodeFlags(nodeFlags), mShortcutListSizePos(shortcutPos) {} mNodeFlags(nodeFlags), mShortcutListSizePos(shortcutPos) {}
inline ShortcutIterator getShortcutIterator() const { inline ShortcutIterator getShortcutIterator() const {
// The size of the shortcuts is stored here so that the whole shortcut chunk can be
// skipped quickly, so we ignore it.
int shortcutPos = mShortcutListSizePos; int shortcutPos = mShortcutListSizePos;
BinaryDictionaryTerminalAttributesReadingUtils::getShortcutListSizeAndForwardPointer(
mBinaryDictionaryInfo, &shortcutPos);
const bool hasShortcutList = 0 != (mNodeFlags & BinaryFormat::FLAG_HAS_SHORTCUT_TARGETS); const bool hasShortcutList = 0 != (mNodeFlags & BinaryFormat::FLAG_HAS_SHORTCUT_TARGETS);
if (hasShortcutList) {
BinaryDictionaryTerminalAttributesReadingUtils::getShortcutListSizeAndForwardPointer(
mBinaryDictionaryInfo, &shortcutPos);
}
// shortcutPos is never used if hasShortcutList is false.
return ShortcutIterator(mBinaryDictionaryInfo, shortcutPos, hasShortcutList); return ShortcutIterator(mBinaryDictionaryInfo, shortcutPos, hasShortcutList);
} }