Permalink
Browse files

Fix line_start annotation in debug_info_item

line_start can be > 2^31, so we have to use readBigUleb128 instead
of readSmallUleb128
  • Loading branch information...
JesusFreke committed Oct 3, 2017
1 parent 20a272d commit 38f575608f038e8b3b4b40675dd1db6ca24de217
Showing with 2 additions and 2 deletions.
  1. +2 −2 dexlib2/src/main/java/org/jf/dexlib2/dexbacked/raw/DebugInfoItem.java
@@ -52,8 +52,8 @@ public static SectionAnnotator makeAnnotator(@Nonnull DexAnnotator annotator, @N
public void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) {
DexReader reader = dexFile.readerAt(out.getCursor());
int lineStart = reader.readSmallUleb128();
out.annotateTo(reader.getOffset(), "line_start = %d", lineStart);
int lineStart = reader.readBigUleb128();
out.annotateTo(reader.getOffset(), "line_start = %d", lineStart & 0xFFFFFFFFL);
int parametersSize = reader.readSmallUleb128();
out.annotateTo(reader.getOffset(), "parameters_size = %d", parametersSize);

0 comments on commit 38f5756

Please sign in to comment.