What steps will reproduce the problem?
1. net stop spooler
2. mintty
3. menu->options->output
What is the expected output? What do you see instead?
expected: keep running
actual: SIGSEGV
What version of the product are you using? On what operating system?
mintty 0.5.8 on cygwin 1.7 on windows xp
Please provide any additional information below.
patch:
$ svn di
Index: winprint.c
===================================================================
--- winprint.c (revision 775)
+++ winprint.c (working copy)
@@ -26,7 +26,9 @@
* we'll need for the output. Discard the return value since it
* will almost certainly be a failure due to lack of space.
*/
- EnumPrinters(param, null, level, buffer + offset, 512, &needed, &nprinters);
+ if (!EnumPrinters(param, null, level, buffer + offset, 512, &needed,
&nprinters)) {
+ return NULL;
+ }
if (needed < 512)
needed = 512;
explains:
when printer spooler is stopped, EnumPrinters returns false, and i fyou
call GetLastError() you'll get 1722, net helpmsg 1722 -> 'RPC server is
unavailable'
in this case, variable "needed" is not initialized, nor does "nprinters".
so simply return NULL in this case
Original issue reported on code.google.com by xue...@gmail.com on 4 Mar 2010 at 12:12
Original issue reported on code.google.com by
xue...@gmail.com
on 4 Mar 2010 at 12:12