Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 373065 - app-text/xpdf-3.0.2-r4: Bug in xpdf "run" function, or it's man page
Summary: app-text/xpdf-3.0.2-r4: Bug in xpdf "run" function, or it's man page
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Printing Team
URL:
Whiteboard: masked for removal 27 Feb 2012
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2011-06-26 01:30 UTC by Chris Chan
Modified: 2012-02-28 20:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Chan 2011-06-26 01:30:12 UTC
Keybindings with the form function( args ) , where args are more than one, require ' around the entire function declaration. For example,

bind d any run(ls > /cats.txt) is incorrect 

(this is what the man page says is correct, in the "run" section, and in the bind examples)

bind d any run("ls > cats.txt") is incorrect
bind d any run(ls_to_cats.sh) is incorrect
bind d any 'run(ls > cats.txt)' is correct
bind d any 'run(ls > cats.txt)' is correct

Sample error:
Error: Invalid command syntax: 'run(ls'
Error: Invalid command syntax: '>'
Error: Invalid command syntax: '/root/-/cats)'

Xpdf is not very active (for example it is maintained by one person upstream, and there's no IRC. Whereas similar projects like Xterm has a small irc community, and thousands of contributors). It may require a gentoo patch, since maybe people use it [perhaps].

Sometimes the error is differently misleading, if you use a single arg it will say "sh: cannot find ...". This is misleading because sometimes the user will assume he must construct the command as bash -c "his && commands ...."




Reproducible: Always
Comment 1 Chris Chan 2011-06-26 02:57:34 UTC
Additionally, if you want to link multiple xpdf functions to your keybinding;

bind d "run(your commands) another_xpdf_function"       incorrect
bind d "run(your commands)" another_xpdf_function       correct

I'm not sure what the developper's intention was, but it is important not to ignore this as it could be exploitable. My tests were simple, perhaps the app is vulnerable to overflow exploits ...
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2012-02-28 20:41:06 UTC
Gone.