This patch fixes a bug in the original driver: write to NULL descriptor. | |
b/182179434 | |
--- a/src/wrapper.c | |
+++ b/src/wrapper.c | |
@@ -244,6 +244,9 @@ main (int argc, char *argv[]) | |
break; | |
} | |
+ if (pfp == NULL) // do not write anything if pipe is not open | |
+ break; | |
+ | |
if(first_fwrite){//最初のfwriteだけ、ページ数を送信 | |
fwrite (&pageNum, 1, 1, pfp); | |
first_fwrite = FALSE; |