aboutsummaryrefslogtreecommitdiff
path: root/system/xcdroast/io_compile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/xcdroast/io_compile.patch')
-rw-r--r--system/xcdroast/io_compile.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/system/xcdroast/io_compile.patch b/system/xcdroast/io_compile.patch
new file mode 100644
index 0000000000000..7285bd335df0c
--- /dev/null
+++ b/system/xcdroast/io_compile.patch
@@ -0,0 +1,21 @@
+--- src/io.c.org 2009-02-24 09:38:27.000000000 +0100
++++ src/io.c 2009-02-24 09:45:18.000000000 +0100
+@@ -1903,7 +1903,8 @@
+ }
+
+ strcpy(str,"");
+- fgets(str,MAXLINE,fpin);
++ if (fgets(str,MAXLINE,fpin) == NULL)
++ g_error("fgets error\n");
+
+ if (pclose(fpin) == -1) {
+ g_error("pclose error\n");
+@@ -4720,7 +4721,7 @@
+ dolog(3, "Saving extended output to %s\n", fname);
+
+ /* write to file */
+- fd = open(fname,O_WRONLY | O_CREAT);
++ fd = open(fname, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
+ if (fd < 0) {
+ g_warning("Can't open file %s for writing\n",fname);
+ return 1;