summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2010-04-22 11:48:23 +0200
committerLuc Verhaegen <libv@skynet.be>2010-04-22 11:48:23 +0200
commit0d7005b34a36b7d2b575dcfbfe5cbe7ec8bb1fee (patch)
treee520ac3defba3c0d007fa553e0fb6e56b4760498
parent9e43c3a677f2418b60e8a2f3a6e2f9b0040f17b6 (diff)
AMI_SLAB: Add mode to open() when extracting.
Spotted by: Stefan Reinauer <stepan@coresystems.de>
-rw-r--r--ami_slab.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ami_slab.c b/ami_slab.c
index 6ed6e0e..b7c9780 100644
--- a/ami_slab.c
+++ b/ami_slab.c
@@ -106,7 +106,8 @@ int slabextract(const unsigned char *buffer, int bufferlen)
has_data ? "yes" : "no");
if (has_data) {
- int outfd = open(filename, O_WRONLY | O_CREAT | O_TRUNC);
+ int outfd = open(filename, O_WRONLY | O_CREAT | O_TRUNC,
+ S_IRUSR | S_IWUSR);
if (outfd != -1) {
if (write(outfd, datapointer, len) != len)
fprintf(stderr, "Can't write %s: %s\n", filename,