File: 0003-Fix-call-to-open-with-missing-argument.patch

package info (click to toggle)
spout 1.4-7
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 356 kB
  • sloc: ansic: 5,804; makefile: 221
file content (21 lines) | stat: -rw-r--r-- 666 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Scott Leggett <scott@sl.id.au>
Date: Mon, 5 Nov 2012 03:11:01 +1100
Subject: Fix call to open with missing argument.

---
 spout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/spout.c b/spout.c
index 464e2ac..953aceb 100644
--- a/spout.c
+++ b/spout.c
@@ -148,7 +148,7 @@ void pceAppProc(int cnt)
 				int fa;
 				hiScore[0] = score;
 				hiScore[1] = height;
-				if((fa = open(score_path, O_CREAT | O_WRONLY | O_TRUNC)) != -1) {
+				if((fa = open(score_path, O_CREAT | O_WRONLY | O_TRUNC, S_IRUSR | S_IWUSR)) != -1) {
 					if(write(fa, (void *) hiScore, 8) != -1) {
                         close(fa);
                     } else {