Bugs finding coders relative to executable

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
aberent
Posts: 2
Joined: 2011-04-08T06:38:52-07:00
Authentication code: 8675308

Bugs finding coders relative to executable

Post by aberent »

Tested on ImageMagick 6.7.1, built on and for Intel 32-bit Ubuntu 10.04, but the code appears still to be incorrect on the SVN head.

The ImageMagick resources page states that ImageMagick will search "<client path>/../lib/ImageMagick-6.7.3/modules-Q16/coders/" for coders, however ImageMagick (specifically convert) wasn't finding coders in this location. Investigating the source code I found two reasons for this:
1. magick.c line 1277 (in version 6.7.1) correctly calls GetExecutionPath, but then, unless path is blank or null, ignores the result and uses path. path will normally be arg0 (the command used to start the application) when this is called. If arg0 isn't a full path name then line 1282 won't get a useful directory location. Proposed fix, reverse the logic of lines 1278 and 1279 so that is prefers the result of GetExecutionPath:

Code: Select all

  if ((execution_path == (const char *) NULL) || (execution_path == '\0'))
    (void) CopyMagickString(execution_path,path,MaxTextExtent);
2. Modules.c line 753 is looking in a directory called "modules". It should be looking in a directory called "coders".
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Bugs finding coders relative to executable

Post by magick »

We can reproduce the problem you posted and will have a patch in ImageMagick 6.7.3-5 Beta within a day or two. Thanks.
Post Reply