Summary: | GS crash when executed by GSView's 'File'-'Convert' | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | SaGS <sags5495> |
Component: | General | Assignee: | Robin Watts <robin.watts> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Customer: | Word Size: | --- | |
Attachments: | Suggested patch. |
Description
SaGS
2010-04-18 08:42:39 UTC
Created attachment 6164 [details] Suggested patch. Fix: 2 ex-global variables were not initialized immediately after being allocated. Bug 691249. Not initializing io_device_table to NULL produces a crash if the 1st argument processed is an ‘@file’. This happens for example when Ghostscript is called by GSWiev’s ‘File’/ ‘Convert...’ function, or when GS_OPTIONS starts with an ‘@file’ argument. While I do not know of (and neither looked for) any adverse effect of not initializing gs_name_table early, the patch does initialize this variable too. I consider this to be good practice, as it makes the code more robust. appears to be caused by global variable removal Many thanks. Your fix looks spot on. I'm actually testing a fix now that memsets the libctx to zero on initialisation. This should be even safer than your fix as it saves us from me forgetting to initialise other newly added members in future. This was fixed 2 months 3 weeks ago in revision 11218, and I forgot to close the bug. Closing now. |