git://project.juiblex.co.uk
/
razor2.git/.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
89d9f2c
)
Support empty scripts
author
J. Ali Harlow
<ali@juiblex.co.uk>
Thu, 2 Jul 2009 10:31:03 +0000 (11:31 +0100)
committer
J. Ali Harlow
<ali@juiblex.co.uk>
Thu, 2 Jul 2009 10:31:03 +0000 (11:31 +0100)
librazor/rpm.c
patch
|
blob
|
history
diff --git
a/librazor/rpm.c
b/librazor/rpm.c
index
a46a979
..
87f910c
100644
(file)
--- a/
librazor/rpm.c
+++ b/
librazor/rpm.c
@@
-914,7
+914,7
@@
run_script_external(const char *root, const char *program, const char *script)
if (!fp) {
perror(program);
retval = -1;
- } else if (fwrite(script, strlen(script), 1, fp) != 1) {
+ } else if (script && fwrite(script, strlen(script), 1, fp) != 1) {
perror("failed to write script to program");
retval = -1;
} else