Comments (10)
Original comment by [email protected]
on 28 May 2014 at 6:02
from pdfium.
Original comment by [email protected]
on 2 Jun 2014 at 11:05
- Changed state: Started
from pdfium.
Original comment by [email protected]
on 2 Jun 2014 at 11:06
from pdfium.
This is caused by trailing '\0' in url and affecting other pdf with text link.
Should change pdfium_page.cc, line 410 to
for (size_t j = 0; j < link.url.length()-1; ++j)
John, please confirm and commit this, thanks!
Original comment by [email protected]
on 3 Jun 2014 at 7:29
from pdfium.
ah, this is a regression. sample files that I have used to work, but not
anymore. It looks like we're adding the null terminator when we create a string
from the result of FPDFLink_GetURL, which per documentation it doesn't include.
Not sure how this worked before.
Original comment by [email protected]
on 5 Jun 2014 at 6:06
from pdfium.
Bo: I looked into this more, and I believe the problem is in fpdftext.cpp.
FPDFLink_GetURL says it returns the number of chracters excluding the
terminator. However the implementation converts from a CFX_WideString (with
length not including terminating null) to a CFX_ByteString. That conversion
adds a null terminator to the length, since CFX_WideString::UTF16LE_Encode has
a default parameter of bTerminate=true.
Original comment by [email protected]
on 6 Jun 2014 at 1:39
from pdfium.
John, the comments for FPDFLink_GetURL says "If buffer is NULL or buflen is
zero, return number of characters (not bytes and an additional terminator is
also counted) needed", so in pdfium_page.cc:390, 394, the url_length should
already include the terminator.
Going down, pdfium_page.cc:410 link.url.length() also includes the terminator.
In this regard, fpdftext.cpp should be ok.
Original comment by [email protected]
on 6 Jun 2014 at 2:19
from pdfium.
Hi Bo, I was going by
http://tickets.foxitsoftware.com/support/usermanuals/DLL311/group___f_p_d_f_t_e_
x_t.html#ga250c31057dcc3277e9f56e870e690c58. I guess that's outdated since it
doesn't mention that? I now see that the header in pdfium's repo says
otherwise, so I'll go with that instead.
Original comment by [email protected]
on 6 Jun 2014 at 3:01
from pdfium.
That document is indeed outdated, thanks for pointing out.
Original comment by [email protected]
on 6 Jun 2014 at 4:22
from pdfium.
Original comment by [email protected]
on 6 Jun 2014 at 2:42
- Changed state: Fixed
from pdfium.
Related Issues (7)
- support asan/msan in the standalone build system, set up asan/msan bots HOT 5
- No build instructions HOT 2
- Crash in PDF_DataDecode (core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp) HOT 5
- There a lot of comparisons between this and NULL in fpdf_parser_objects.cpp HOT 7
- convert pdf to text HOT 2
- support asan/msan in the standalone build system, set up asan/msan bots
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdfium.