Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P poppler
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 664
    • Issues 664
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 46
    • Merge requests 46
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • poppler
  • poppler
  • Issues
  • #186
Closed
Open
Issue created May 30, 2011 by Bugzilla Migration User@bugzilla-migration

Problems in file goo/GooString.cc

Submitted by fus..@..hoo.it

Assigned to poppler-bugs

Link to original bug (#37745)

Description

I'm using poppler 0.16.5. In one pdf with weird goto link entries (for example, in vi editor I see an entry "þÿ") the bsearch (row 677 of file poppler/Catalog.cc) for some value does not work correctly. I founded that the reason is a not totally correct implementation of methods "int GooString::cmp(GooString *str) const", "int GooString::cmpN(GooString *str, int n) const", "int GooString::cmp(const char *sA) const", and "int GooString::cmpN(const char *sA, int n) const". In each of these methods, the row "x = *p1 - *p2;" should be replaced with: "x = (unsigned char)*p1 - (unsigned char)*p2;"

The rows of file goo/GooString.cc that needs this replace are: 694, 711, 728, 748.

I founded that is fine too the use of strcmp and strncmp c library functions. E.g., "int GooString::cmp(GooString *str) const" could be simply implemented like this:

int GooString::cmp(GooString *str) const { return strcmp(s, str->s); }

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking