diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-01-11 07:08:34 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-01-11 07:08:34 +0000 |
commit | 4e25170b7c9bc4a0790412e731d36ed28106df66 (patch) | |
tree | d31de22c8ecb6e81904a1e26369947c06987324e /Build | |
parent | bc2c2bd810d9961fe221819e8557189893a58844 (diff) |
texk/dvipdfm-x/pdfobj.c: Fix typos and memory leaks (from S. Hirata)
git-svn-id: svn://tug.org/texlive/trunk@39347 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfobj.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfobj.c b/Build/source/texk/dvipdfm-x/pdfobj.c index fa7e3cae7da..26ce1e0cb65 100644 --- a/Build/source/texk/dvipdfm-x/pdfobj.c +++ b/Build/source/texk/dvipdfm-x/pdfobj.c @@ -3313,7 +3313,7 @@ parse_xref_table (pdf_file *pf, int xref_pos) /* Object number of the first object whithin this xref subsection. */ q = parse_unsigned(&p, endptr); if (!q) { - WARN("An unsigned integer expected but counld not find. (xref)"); + WARN("An unsigned integer expected but could not find. (xref)"); return -1; } first = atoi(q); @@ -3323,7 +3323,7 @@ parse_xref_table (pdf_file *pf, int xref_pos) /* Nnumber of objects in this xref subsection. */ q = parse_unsigned(&p, endptr); if (!q) { - WARN("An unsigned integer expected but counld not find. (xref)"); + WARN("An unsigned integer expected but could not find. (xref)"); return -1; } size = atoi(q); @@ -3377,10 +3377,11 @@ parse_xref_table (pdf_file *pf, int xref_pos) /* Offset value -- 10 digits (0 padded) */ q = parse_unsigned(&p, endptr); if (!q) { - WARN("An unsigned integer expected but counld not find. (xref)"); + WARN("An unsigned integer expected but could not find. (xref)"); return -1; } else if (strlen(q) != 10) { /* exactly 10 digits */ WARN(("Offset must be a 10 digits number. (xref)")); + RELEASE(q); return -1; } /* FIXME: Possible overflow here. Consider using strtoll(). */ @@ -3391,10 +3392,11 @@ parse_xref_table (pdf_file *pf, int xref_pos) /* Generation number -- 5 digits (0 padded) */ q = parse_unsigned(&p, endptr); if (!q) { - WARN("An unsigned integer expected but counld not find. (xref)"); + WARN("An unsigned integer expected but could not find. (xref)"); return -1; } else if (strlen(q) != 5) { /* exactly 5 digits */ WARN(("Expecting a 5 digits number. (xref)")); + RELEASE(q); return -1; } obj_gen = atoi(q); |