aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-01-08 13:09:28 +0100
committerjcid <devnull@localhost>2008-01-08 13:09:28 +0100
commit445f55b9280aba6357488e2e466d71697f77e400 (patch)
tree032a8289b18f6eb0cfaf10c9bf93d457af91b9c7
parentbb5ae3f2844122e4f2878119e36ca8727cf74b9b (diff)
+ - Fixed a segfault in cookies.c when no .dillo directory exists.
-rw-r--r--ChangeLog1
-rw-r--r--src/cookies.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index cf803bc3..a4c4003a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -68,6 +68,7 @@ dillo-fltk2
- Made the stop button sensitive when loading an image.
- Added more statics in dpi, const in pixmaps, and removed redundant includes.
- Made cleanups in prefs (hiding local data/defs/symbols).
+ - Fixed a segfault in cookies.c when no .dillo directory exists.
Patches: place
+- Fixed a problem with locally-installed dpis.
- Added code for optional image loading (nice interface) very advanced!
diff --git a/src/cookies.c b/src/cookies.c
index f6002842..63b98837 100644
--- a/src/cookies.c
+++ b/src/cookies.c
@@ -101,8 +101,10 @@ static FILE *Cookies_fopen(const char *filename, char *init_str)
}
}
- /* set close on exec */
- fcntl(fileno(F_in), F_SETFD, FD_CLOEXEC | fcntl(fileno(F_in), F_GETFD));
+ if (F_in) {
+ /* set close on exec */
+ fcntl(fileno(F_in), F_SETFD, FD_CLOEXEC | fcntl(fileno(F_in), F_GETFD));
+ }
return F_in;
}